1 /* This file was generated by upbc (the upb compiler) from the input
2 * file:
3 *
4 * src/proto/grpc/gcp/handshaker.proto
5 *
6 * Do not edit -- your changes will be discarded when the file is
7 * regenerated. */
8
9 #ifndef SRC_PROTO_GRPC_GCP_HANDSHAKER_PROTO_UPB_H_
10 #define SRC_PROTO_GRPC_GCP_HANDSHAKER_PROTO_UPB_H_
11
12 #include "upb/msg.h"
13 #include "upb/decode.h"
14 #include "upb/decode_fast.h"
15 #include "upb/encode.h"
16
17 #include "upb/port_def.inc"
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23 struct grpc_gcp_Endpoint;
24 struct grpc_gcp_Identity;
25 struct grpc_gcp_Identity_AttributesEntry;
26 struct grpc_gcp_StartClientHandshakeReq;
27 struct grpc_gcp_ServerHandshakeParameters;
28 struct grpc_gcp_StartServerHandshakeReq;
29 struct grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry;
30 struct grpc_gcp_NextHandshakeMessageReq;
31 struct grpc_gcp_HandshakerReq;
32 struct grpc_gcp_HandshakerResult;
33 struct grpc_gcp_HandshakerStatus;
34 struct grpc_gcp_HandshakerResp;
35 typedef struct grpc_gcp_Endpoint grpc_gcp_Endpoint;
36 typedef struct grpc_gcp_Identity grpc_gcp_Identity;
37 typedef struct grpc_gcp_Identity_AttributesEntry grpc_gcp_Identity_AttributesEntry;
38 typedef struct grpc_gcp_StartClientHandshakeReq grpc_gcp_StartClientHandshakeReq;
39 typedef struct grpc_gcp_ServerHandshakeParameters grpc_gcp_ServerHandshakeParameters;
40 typedef struct grpc_gcp_StartServerHandshakeReq grpc_gcp_StartServerHandshakeReq;
41 typedef struct grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry;
42 typedef struct grpc_gcp_NextHandshakeMessageReq grpc_gcp_NextHandshakeMessageReq;
43 typedef struct grpc_gcp_HandshakerReq grpc_gcp_HandshakerReq;
44 typedef struct grpc_gcp_HandshakerResult grpc_gcp_HandshakerResult;
45 typedef struct grpc_gcp_HandshakerStatus grpc_gcp_HandshakerStatus;
46 typedef struct grpc_gcp_HandshakerResp grpc_gcp_HandshakerResp;
47 extern const upb_msglayout grpc_gcp_Endpoint_msginit;
48 extern const upb_msglayout grpc_gcp_Identity_msginit;
49 extern const upb_msglayout grpc_gcp_Identity_AttributesEntry_msginit;
50 extern const upb_msglayout grpc_gcp_StartClientHandshakeReq_msginit;
51 extern const upb_msglayout grpc_gcp_ServerHandshakeParameters_msginit;
52 extern const upb_msglayout grpc_gcp_StartServerHandshakeReq_msginit;
53 extern const upb_msglayout grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_msginit;
54 extern const upb_msglayout grpc_gcp_NextHandshakeMessageReq_msginit;
55 extern const upb_msglayout grpc_gcp_HandshakerReq_msginit;
56 extern const upb_msglayout grpc_gcp_HandshakerResult_msginit;
57 extern const upb_msglayout grpc_gcp_HandshakerStatus_msginit;
58 extern const upb_msglayout grpc_gcp_HandshakerResp_msginit;
59 struct grpc_gcp_RpcProtocolVersions;
60 extern const upb_msglayout grpc_gcp_RpcProtocolVersions_msginit;
61
62 typedef enum {
63 grpc_gcp_HANDSHAKE_PROTOCOL_UNSPECIFIED = 0,
64 grpc_gcp_TLS = 1,
65 grpc_gcp_ALTS = 2
66 } grpc_gcp_HandshakeProtocol;
67
68 typedef enum {
69 grpc_gcp_NETWORK_PROTOCOL_UNSPECIFIED = 0,
70 grpc_gcp_TCP = 1,
71 grpc_gcp_UDP = 2
72 } grpc_gcp_NetworkProtocol;
73
74
75 /* grpc.gcp.Endpoint */
76
grpc_gcp_Endpoint_new(upb_arena * arena)77 UPB_INLINE grpc_gcp_Endpoint *grpc_gcp_Endpoint_new(upb_arena *arena) {
78 return (grpc_gcp_Endpoint *)_upb_msg_new(&grpc_gcp_Endpoint_msginit, arena);
79 }
grpc_gcp_Endpoint_parse(const char * buf,size_t size,upb_arena * arena)80 UPB_INLINE grpc_gcp_Endpoint *grpc_gcp_Endpoint_parse(const char *buf, size_t size,
81 upb_arena *arena) {
82 grpc_gcp_Endpoint *ret = grpc_gcp_Endpoint_new(arena);
83 return (ret && upb_decode(buf, size, ret, &grpc_gcp_Endpoint_msginit, arena)) ? ret : NULL;
84 }
grpc_gcp_Endpoint_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)85 UPB_INLINE grpc_gcp_Endpoint *grpc_gcp_Endpoint_parse_ex(const char *buf, size_t size,
86 upb_arena *arena, int options) {
87 grpc_gcp_Endpoint *ret = grpc_gcp_Endpoint_new(arena);
88 return (ret && _upb_decode(buf, size, ret, &grpc_gcp_Endpoint_msginit, arena, options))
89 ? ret : NULL;
90 }
grpc_gcp_Endpoint_serialize(const grpc_gcp_Endpoint * msg,upb_arena * arena,size_t * len)91 UPB_INLINE char *grpc_gcp_Endpoint_serialize(const grpc_gcp_Endpoint *msg, upb_arena *arena, size_t *len) {
92 return upb_encode(msg, &grpc_gcp_Endpoint_msginit, arena, len);
93 }
94
grpc_gcp_Endpoint_ip_address(const grpc_gcp_Endpoint * msg)95 UPB_INLINE upb_strview grpc_gcp_Endpoint_ip_address(const grpc_gcp_Endpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
grpc_gcp_Endpoint_port(const grpc_gcp_Endpoint * msg)96 UPB_INLINE int32_t grpc_gcp_Endpoint_port(const grpc_gcp_Endpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
grpc_gcp_Endpoint_protocol(const grpc_gcp_Endpoint * msg)97 UPB_INLINE int32_t grpc_gcp_Endpoint_protocol(const grpc_gcp_Endpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
98
grpc_gcp_Endpoint_set_ip_address(grpc_gcp_Endpoint * msg,upb_strview value)99 UPB_INLINE void grpc_gcp_Endpoint_set_ip_address(grpc_gcp_Endpoint *msg, upb_strview value) {
100 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
101 }
grpc_gcp_Endpoint_set_port(grpc_gcp_Endpoint * msg,int32_t value)102 UPB_INLINE void grpc_gcp_Endpoint_set_port(grpc_gcp_Endpoint *msg, int32_t value) {
103 *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
104 }
grpc_gcp_Endpoint_set_protocol(grpc_gcp_Endpoint * msg,int32_t value)105 UPB_INLINE void grpc_gcp_Endpoint_set_protocol(grpc_gcp_Endpoint *msg, int32_t value) {
106 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
107 }
108
109 /* grpc.gcp.Identity */
110
grpc_gcp_Identity_new(upb_arena * arena)111 UPB_INLINE grpc_gcp_Identity *grpc_gcp_Identity_new(upb_arena *arena) {
112 return (grpc_gcp_Identity *)_upb_msg_new(&grpc_gcp_Identity_msginit, arena);
113 }
grpc_gcp_Identity_parse(const char * buf,size_t size,upb_arena * arena)114 UPB_INLINE grpc_gcp_Identity *grpc_gcp_Identity_parse(const char *buf, size_t size,
115 upb_arena *arena) {
116 grpc_gcp_Identity *ret = grpc_gcp_Identity_new(arena);
117 return (ret && upb_decode(buf, size, ret, &grpc_gcp_Identity_msginit, arena)) ? ret : NULL;
118 }
grpc_gcp_Identity_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)119 UPB_INLINE grpc_gcp_Identity *grpc_gcp_Identity_parse_ex(const char *buf, size_t size,
120 upb_arena *arena, int options) {
121 grpc_gcp_Identity *ret = grpc_gcp_Identity_new(arena);
122 return (ret && _upb_decode(buf, size, ret, &grpc_gcp_Identity_msginit, arena, options))
123 ? ret : NULL;
124 }
grpc_gcp_Identity_serialize(const grpc_gcp_Identity * msg,upb_arena * arena,size_t * len)125 UPB_INLINE char *grpc_gcp_Identity_serialize(const grpc_gcp_Identity *msg, upb_arena *arena, size_t *len) {
126 return upb_encode(msg, &grpc_gcp_Identity_msginit, arena, len);
127 }
128
129 typedef enum {
130 grpc_gcp_Identity_identity_oneof_service_account = 1,
131 grpc_gcp_Identity_identity_oneof_hostname = 2,
132 grpc_gcp_Identity_identity_oneof_NOT_SET = 0
133 } grpc_gcp_Identity_identity_oneof_oneofcases;
grpc_gcp_Identity_identity_oneof_case(const grpc_gcp_Identity * msg)134 UPB_INLINE grpc_gcp_Identity_identity_oneof_oneofcases grpc_gcp_Identity_identity_oneof_case(const grpc_gcp_Identity* msg) { return (grpc_gcp_Identity_identity_oneof_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); }
135
grpc_gcp_Identity_has_service_account(const grpc_gcp_Identity * msg)136 UPB_INLINE bool grpc_gcp_Identity_has_service_account(const grpc_gcp_Identity *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 1; }
grpc_gcp_Identity_service_account(const grpc_gcp_Identity * msg)137 UPB_INLINE upb_strview grpc_gcp_Identity_service_account(const grpc_gcp_Identity *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(4, 8), UPB_SIZE(12, 24), 1, upb_strview_make("", strlen(""))); }
grpc_gcp_Identity_has_hostname(const grpc_gcp_Identity * msg)138 UPB_INLINE bool grpc_gcp_Identity_has_hostname(const grpc_gcp_Identity *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 2; }
grpc_gcp_Identity_hostname(const grpc_gcp_Identity * msg)139 UPB_INLINE upb_strview grpc_gcp_Identity_hostname(const grpc_gcp_Identity *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(4, 8), UPB_SIZE(12, 24), 2, upb_strview_make("", strlen(""))); }
grpc_gcp_Identity_has_attributes(const grpc_gcp_Identity * msg)140 UPB_INLINE bool grpc_gcp_Identity_has_attributes(const grpc_gcp_Identity *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
grpc_gcp_Identity_attributes_size(const grpc_gcp_Identity * msg)141 UPB_INLINE size_t grpc_gcp_Identity_attributes_size(const grpc_gcp_Identity *msg) {return _upb_msg_map_size(msg, UPB_SIZE(0, 0)); }
grpc_gcp_Identity_attributes_get(const grpc_gcp_Identity * msg,upb_strview key,upb_strview * val)142 UPB_INLINE bool grpc_gcp_Identity_attributes_get(const grpc_gcp_Identity *msg, upb_strview key, upb_strview *val) { return _upb_msg_map_get(msg, UPB_SIZE(0, 0), &key, 0, val, 0); }
grpc_gcp_Identity_attributes_next(const grpc_gcp_Identity * msg,size_t * iter)143 UPB_INLINE const grpc_gcp_Identity_AttributesEntry* grpc_gcp_Identity_attributes_next(const grpc_gcp_Identity *msg, size_t* iter) { return (const grpc_gcp_Identity_AttributesEntry*)_upb_msg_map_next(msg, UPB_SIZE(0, 0), iter); }
144
grpc_gcp_Identity_set_service_account(grpc_gcp_Identity * msg,upb_strview value)145 UPB_INLINE void grpc_gcp_Identity_set_service_account(grpc_gcp_Identity *msg, upb_strview value) {
146 UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(4, 8), value, UPB_SIZE(12, 24), 1);
147 }
grpc_gcp_Identity_set_hostname(grpc_gcp_Identity * msg,upb_strview value)148 UPB_INLINE void grpc_gcp_Identity_set_hostname(grpc_gcp_Identity *msg, upb_strview value) {
149 UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(4, 8), value, UPB_SIZE(12, 24), 2);
150 }
grpc_gcp_Identity_attributes_clear(grpc_gcp_Identity * msg)151 UPB_INLINE void grpc_gcp_Identity_attributes_clear(grpc_gcp_Identity *msg) { _upb_msg_map_clear(msg, UPB_SIZE(0, 0)); }
grpc_gcp_Identity_attributes_set(grpc_gcp_Identity * msg,upb_strview key,upb_strview val,upb_arena * a)152 UPB_INLINE bool grpc_gcp_Identity_attributes_set(grpc_gcp_Identity *msg, upb_strview key, upb_strview val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(0, 0), &key, 0, &val, 0, a); }
grpc_gcp_Identity_attributes_delete(grpc_gcp_Identity * msg,upb_strview key)153 UPB_INLINE bool grpc_gcp_Identity_attributes_delete(grpc_gcp_Identity *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(0, 0), &key, 0); }
grpc_gcp_Identity_attributes_nextmutable(grpc_gcp_Identity * msg,size_t * iter)154 UPB_INLINE grpc_gcp_Identity_AttributesEntry* grpc_gcp_Identity_attributes_nextmutable(grpc_gcp_Identity *msg, size_t* iter) { return (grpc_gcp_Identity_AttributesEntry*)_upb_msg_map_next(msg, UPB_SIZE(0, 0), iter); }
155
156 /* grpc.gcp.Identity.AttributesEntry */
157
grpc_gcp_Identity_AttributesEntry_key(const grpc_gcp_Identity_AttributesEntry * msg)158 UPB_INLINE upb_strview grpc_gcp_Identity_AttributesEntry_key(const grpc_gcp_Identity_AttributesEntry *msg) {
159 upb_strview ret;
160 _upb_msg_map_key(msg, &ret, 0);
161 return ret;
162 }
grpc_gcp_Identity_AttributesEntry_value(const grpc_gcp_Identity_AttributesEntry * msg)163 UPB_INLINE upb_strview grpc_gcp_Identity_AttributesEntry_value(const grpc_gcp_Identity_AttributesEntry *msg) {
164 upb_strview ret;
165 _upb_msg_map_value(msg, &ret, 0);
166 return ret;
167 }
168
grpc_gcp_Identity_AttributesEntry_set_value(grpc_gcp_Identity_AttributesEntry * msg,upb_strview value)169 UPB_INLINE void grpc_gcp_Identity_AttributesEntry_set_value(grpc_gcp_Identity_AttributesEntry *msg, upb_strview value) {
170 _upb_msg_map_set_value(msg, &value, 0);
171 }
172
173 /* grpc.gcp.StartClientHandshakeReq */
174
grpc_gcp_StartClientHandshakeReq_new(upb_arena * arena)175 UPB_INLINE grpc_gcp_StartClientHandshakeReq *grpc_gcp_StartClientHandshakeReq_new(upb_arena *arena) {
176 return (grpc_gcp_StartClientHandshakeReq *)_upb_msg_new(&grpc_gcp_StartClientHandshakeReq_msginit, arena);
177 }
grpc_gcp_StartClientHandshakeReq_parse(const char * buf,size_t size,upb_arena * arena)178 UPB_INLINE grpc_gcp_StartClientHandshakeReq *grpc_gcp_StartClientHandshakeReq_parse(const char *buf, size_t size,
179 upb_arena *arena) {
180 grpc_gcp_StartClientHandshakeReq *ret = grpc_gcp_StartClientHandshakeReq_new(arena);
181 return (ret && upb_decode(buf, size, ret, &grpc_gcp_StartClientHandshakeReq_msginit, arena)) ? ret : NULL;
182 }
grpc_gcp_StartClientHandshakeReq_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)183 UPB_INLINE grpc_gcp_StartClientHandshakeReq *grpc_gcp_StartClientHandshakeReq_parse_ex(const char *buf, size_t size,
184 upb_arena *arena, int options) {
185 grpc_gcp_StartClientHandshakeReq *ret = grpc_gcp_StartClientHandshakeReq_new(arena);
186 return (ret && _upb_decode(buf, size, ret, &grpc_gcp_StartClientHandshakeReq_msginit, arena, options))
187 ? ret : NULL;
188 }
grpc_gcp_StartClientHandshakeReq_serialize(const grpc_gcp_StartClientHandshakeReq * msg,upb_arena * arena,size_t * len)189 UPB_INLINE char *grpc_gcp_StartClientHandshakeReq_serialize(const grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena, size_t *len) {
190 return upb_encode(msg, &grpc_gcp_StartClientHandshakeReq_msginit, arena, len);
191 }
192
grpc_gcp_StartClientHandshakeReq_handshake_security_protocol(const grpc_gcp_StartClientHandshakeReq * msg)193 UPB_INLINE int32_t grpc_gcp_StartClientHandshakeReq_handshake_security_protocol(const grpc_gcp_StartClientHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
grpc_gcp_StartClientHandshakeReq_application_protocols(const grpc_gcp_StartClientHandshakeReq * msg,size_t * len)194 UPB_INLINE upb_strview const* grpc_gcp_StartClientHandshakeReq_application_protocols(const grpc_gcp_StartClientHandshakeReq *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(36, 64), len); }
grpc_gcp_StartClientHandshakeReq_record_protocols(const grpc_gcp_StartClientHandshakeReq * msg,size_t * len)195 UPB_INLINE upb_strview const* grpc_gcp_StartClientHandshakeReq_record_protocols(const grpc_gcp_StartClientHandshakeReq *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(40, 72), len); }
grpc_gcp_StartClientHandshakeReq_has_target_identities(const grpc_gcp_StartClientHandshakeReq * msg)196 UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_has_target_identities(const grpc_gcp_StartClientHandshakeReq *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 80)); }
grpc_gcp_StartClientHandshakeReq_target_identities(const grpc_gcp_StartClientHandshakeReq * msg,size_t * len)197 UPB_INLINE const grpc_gcp_Identity* const* grpc_gcp_StartClientHandshakeReq_target_identities(const grpc_gcp_StartClientHandshakeReq *msg, size_t *len) { return (const grpc_gcp_Identity* const*)_upb_array_accessor(msg, UPB_SIZE(44, 80), len); }
grpc_gcp_StartClientHandshakeReq_has_local_identity(const grpc_gcp_StartClientHandshakeReq * msg)198 UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_has_local_identity(const grpc_gcp_StartClientHandshakeReq *msg) { return _upb_hasbit(msg, 1); }
grpc_gcp_StartClientHandshakeReq_local_identity(const grpc_gcp_StartClientHandshakeReq * msg)199 UPB_INLINE const grpc_gcp_Identity* grpc_gcp_StartClientHandshakeReq_local_identity(const grpc_gcp_StartClientHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const grpc_gcp_Identity*); }
grpc_gcp_StartClientHandshakeReq_has_local_endpoint(const grpc_gcp_StartClientHandshakeReq * msg)200 UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_has_local_endpoint(const grpc_gcp_StartClientHandshakeReq *msg) { return _upb_hasbit(msg, 2); }
grpc_gcp_StartClientHandshakeReq_local_endpoint(const grpc_gcp_StartClientHandshakeReq * msg)201 UPB_INLINE const grpc_gcp_Endpoint* grpc_gcp_StartClientHandshakeReq_local_endpoint(const grpc_gcp_StartClientHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const grpc_gcp_Endpoint*); }
grpc_gcp_StartClientHandshakeReq_has_remote_endpoint(const grpc_gcp_StartClientHandshakeReq * msg)202 UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_has_remote_endpoint(const grpc_gcp_StartClientHandshakeReq *msg) { return _upb_hasbit(msg, 3); }
grpc_gcp_StartClientHandshakeReq_remote_endpoint(const grpc_gcp_StartClientHandshakeReq * msg)203 UPB_INLINE const grpc_gcp_Endpoint* grpc_gcp_StartClientHandshakeReq_remote_endpoint(const grpc_gcp_StartClientHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const grpc_gcp_Endpoint*); }
grpc_gcp_StartClientHandshakeReq_target_name(const grpc_gcp_StartClientHandshakeReq * msg)204 UPB_INLINE upb_strview grpc_gcp_StartClientHandshakeReq_target_name(const grpc_gcp_StartClientHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview); }
grpc_gcp_StartClientHandshakeReq_has_rpc_versions(const grpc_gcp_StartClientHandshakeReq * msg)205 UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_has_rpc_versions(const grpc_gcp_StartClientHandshakeReq *msg) { return _upb_hasbit(msg, 4); }
grpc_gcp_StartClientHandshakeReq_rpc_versions(const grpc_gcp_StartClientHandshakeReq * msg)206 UPB_INLINE const struct grpc_gcp_RpcProtocolVersions* grpc_gcp_StartClientHandshakeReq_rpc_versions(const grpc_gcp_StartClientHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 56), const struct grpc_gcp_RpcProtocolVersions*); }
grpc_gcp_StartClientHandshakeReq_max_frame_size(const grpc_gcp_StartClientHandshakeReq * msg)207 UPB_INLINE uint32_t grpc_gcp_StartClientHandshakeReq_max_frame_size(const grpc_gcp_StartClientHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t); }
208
grpc_gcp_StartClientHandshakeReq_set_handshake_security_protocol(grpc_gcp_StartClientHandshakeReq * msg,int32_t value)209 UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_handshake_security_protocol(grpc_gcp_StartClientHandshakeReq *msg, int32_t value) {
210 *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
211 }
grpc_gcp_StartClientHandshakeReq_mutable_application_protocols(grpc_gcp_StartClientHandshakeReq * msg,size_t * len)212 UPB_INLINE upb_strview* grpc_gcp_StartClientHandshakeReq_mutable_application_protocols(grpc_gcp_StartClientHandshakeReq *msg, size_t *len) {
213 return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 64), len);
214 }
grpc_gcp_StartClientHandshakeReq_resize_application_protocols(grpc_gcp_StartClientHandshakeReq * msg,size_t len,upb_arena * arena)215 UPB_INLINE upb_strview* grpc_gcp_StartClientHandshakeReq_resize_application_protocols(grpc_gcp_StartClientHandshakeReq *msg, size_t len, upb_arena *arena) {
216 return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(36, 64), len, UPB_SIZE(3, 4), arena);
217 }
grpc_gcp_StartClientHandshakeReq_add_application_protocols(grpc_gcp_StartClientHandshakeReq * msg,upb_strview val,upb_arena * arena)218 UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_add_application_protocols(grpc_gcp_StartClientHandshakeReq *msg, upb_strview val, upb_arena *arena) {
219 return _upb_array_append_accessor2(msg, UPB_SIZE(36, 64), UPB_SIZE(3, 4), &val,
220 arena);
221 }
grpc_gcp_StartClientHandshakeReq_mutable_record_protocols(grpc_gcp_StartClientHandshakeReq * msg,size_t * len)222 UPB_INLINE upb_strview* grpc_gcp_StartClientHandshakeReq_mutable_record_protocols(grpc_gcp_StartClientHandshakeReq *msg, size_t *len) {
223 return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 72), len);
224 }
grpc_gcp_StartClientHandshakeReq_resize_record_protocols(grpc_gcp_StartClientHandshakeReq * msg,size_t len,upb_arena * arena)225 UPB_INLINE upb_strview* grpc_gcp_StartClientHandshakeReq_resize_record_protocols(grpc_gcp_StartClientHandshakeReq *msg, size_t len, upb_arena *arena) {
226 return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(40, 72), len, UPB_SIZE(3, 4), arena);
227 }
grpc_gcp_StartClientHandshakeReq_add_record_protocols(grpc_gcp_StartClientHandshakeReq * msg,upb_strview val,upb_arena * arena)228 UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_add_record_protocols(grpc_gcp_StartClientHandshakeReq *msg, upb_strview val, upb_arena *arena) {
229 return _upb_array_append_accessor2(msg, UPB_SIZE(40, 72), UPB_SIZE(3, 4), &val,
230 arena);
231 }
grpc_gcp_StartClientHandshakeReq_mutable_target_identities(grpc_gcp_StartClientHandshakeReq * msg,size_t * len)232 UPB_INLINE grpc_gcp_Identity** grpc_gcp_StartClientHandshakeReq_mutable_target_identities(grpc_gcp_StartClientHandshakeReq *msg, size_t *len) {
233 return (grpc_gcp_Identity**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 80), len);
234 }
grpc_gcp_StartClientHandshakeReq_resize_target_identities(grpc_gcp_StartClientHandshakeReq * msg,size_t len,upb_arena * arena)235 UPB_INLINE grpc_gcp_Identity** grpc_gcp_StartClientHandshakeReq_resize_target_identities(grpc_gcp_StartClientHandshakeReq *msg, size_t len, upb_arena *arena) {
236 return (grpc_gcp_Identity**)_upb_array_resize_accessor2(msg, UPB_SIZE(44, 80), len, UPB_SIZE(2, 3), arena);
237 }
grpc_gcp_StartClientHandshakeReq_add_target_identities(grpc_gcp_StartClientHandshakeReq * msg,upb_arena * arena)238 UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_StartClientHandshakeReq_add_target_identities(grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena) {
239 struct grpc_gcp_Identity* sub = (struct grpc_gcp_Identity*)_upb_msg_new(&grpc_gcp_Identity_msginit, arena);
240 bool ok = _upb_array_append_accessor2(
241 msg, UPB_SIZE(44, 80), UPB_SIZE(2, 3), &sub, arena);
242 if (!ok) return NULL;
243 return sub;
244 }
grpc_gcp_StartClientHandshakeReq_set_local_identity(grpc_gcp_StartClientHandshakeReq * msg,grpc_gcp_Identity * value)245 UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_local_identity(grpc_gcp_StartClientHandshakeReq *msg, grpc_gcp_Identity* value) {
246 _upb_sethas(msg, 1);
247 *UPB_PTR_AT(msg, UPB_SIZE(20, 32), grpc_gcp_Identity*) = value;
248 }
grpc_gcp_StartClientHandshakeReq_mutable_local_identity(grpc_gcp_StartClientHandshakeReq * msg,upb_arena * arena)249 UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_StartClientHandshakeReq_mutable_local_identity(grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena) {
250 struct grpc_gcp_Identity* sub = (struct grpc_gcp_Identity*)grpc_gcp_StartClientHandshakeReq_local_identity(msg);
251 if (sub == NULL) {
252 sub = (struct grpc_gcp_Identity*)_upb_msg_new(&grpc_gcp_Identity_msginit, arena);
253 if (!sub) return NULL;
254 grpc_gcp_StartClientHandshakeReq_set_local_identity(msg, sub);
255 }
256 return sub;
257 }
grpc_gcp_StartClientHandshakeReq_set_local_endpoint(grpc_gcp_StartClientHandshakeReq * msg,grpc_gcp_Endpoint * value)258 UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_local_endpoint(grpc_gcp_StartClientHandshakeReq *msg, grpc_gcp_Endpoint* value) {
259 _upb_sethas(msg, 2);
260 *UPB_PTR_AT(msg, UPB_SIZE(24, 40), grpc_gcp_Endpoint*) = value;
261 }
grpc_gcp_StartClientHandshakeReq_mutable_local_endpoint(grpc_gcp_StartClientHandshakeReq * msg,upb_arena * arena)262 UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartClientHandshakeReq_mutable_local_endpoint(grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena) {
263 struct grpc_gcp_Endpoint* sub = (struct grpc_gcp_Endpoint*)grpc_gcp_StartClientHandshakeReq_local_endpoint(msg);
264 if (sub == NULL) {
265 sub = (struct grpc_gcp_Endpoint*)_upb_msg_new(&grpc_gcp_Endpoint_msginit, arena);
266 if (!sub) return NULL;
267 grpc_gcp_StartClientHandshakeReq_set_local_endpoint(msg, sub);
268 }
269 return sub;
270 }
grpc_gcp_StartClientHandshakeReq_set_remote_endpoint(grpc_gcp_StartClientHandshakeReq * msg,grpc_gcp_Endpoint * value)271 UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_remote_endpoint(grpc_gcp_StartClientHandshakeReq *msg, grpc_gcp_Endpoint* value) {
272 _upb_sethas(msg, 3);
273 *UPB_PTR_AT(msg, UPB_SIZE(28, 48), grpc_gcp_Endpoint*) = value;
274 }
grpc_gcp_StartClientHandshakeReq_mutable_remote_endpoint(grpc_gcp_StartClientHandshakeReq * msg,upb_arena * arena)275 UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartClientHandshakeReq_mutable_remote_endpoint(grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena) {
276 struct grpc_gcp_Endpoint* sub = (struct grpc_gcp_Endpoint*)grpc_gcp_StartClientHandshakeReq_remote_endpoint(msg);
277 if (sub == NULL) {
278 sub = (struct grpc_gcp_Endpoint*)_upb_msg_new(&grpc_gcp_Endpoint_msginit, arena);
279 if (!sub) return NULL;
280 grpc_gcp_StartClientHandshakeReq_set_remote_endpoint(msg, sub);
281 }
282 return sub;
283 }
grpc_gcp_StartClientHandshakeReq_set_target_name(grpc_gcp_StartClientHandshakeReq * msg,upb_strview value)284 UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_target_name(grpc_gcp_StartClientHandshakeReq *msg, upb_strview value) {
285 *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview) = value;
286 }
grpc_gcp_StartClientHandshakeReq_set_rpc_versions(grpc_gcp_StartClientHandshakeReq * msg,struct grpc_gcp_RpcProtocolVersions * value)287 UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_rpc_versions(grpc_gcp_StartClientHandshakeReq *msg, struct grpc_gcp_RpcProtocolVersions* value) {
288 _upb_sethas(msg, 4);
289 *UPB_PTR_AT(msg, UPB_SIZE(32, 56), struct grpc_gcp_RpcProtocolVersions*) = value;
290 }
grpc_gcp_StartClientHandshakeReq_mutable_rpc_versions(grpc_gcp_StartClientHandshakeReq * msg,upb_arena * arena)291 UPB_INLINE struct grpc_gcp_RpcProtocolVersions* grpc_gcp_StartClientHandshakeReq_mutable_rpc_versions(grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena) {
292 struct grpc_gcp_RpcProtocolVersions* sub = (struct grpc_gcp_RpcProtocolVersions*)grpc_gcp_StartClientHandshakeReq_rpc_versions(msg);
293 if (sub == NULL) {
294 sub = (struct grpc_gcp_RpcProtocolVersions*)_upb_msg_new(&grpc_gcp_RpcProtocolVersions_msginit, arena);
295 if (!sub) return NULL;
296 grpc_gcp_StartClientHandshakeReq_set_rpc_versions(msg, sub);
297 }
298 return sub;
299 }
grpc_gcp_StartClientHandshakeReq_set_max_frame_size(grpc_gcp_StartClientHandshakeReq * msg,uint32_t value)300 UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_max_frame_size(grpc_gcp_StartClientHandshakeReq *msg, uint32_t value) {
301 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t) = value;
302 }
303
304 /* grpc.gcp.ServerHandshakeParameters */
305
grpc_gcp_ServerHandshakeParameters_new(upb_arena * arena)306 UPB_INLINE grpc_gcp_ServerHandshakeParameters *grpc_gcp_ServerHandshakeParameters_new(upb_arena *arena) {
307 return (grpc_gcp_ServerHandshakeParameters *)_upb_msg_new(&grpc_gcp_ServerHandshakeParameters_msginit, arena);
308 }
grpc_gcp_ServerHandshakeParameters_parse(const char * buf,size_t size,upb_arena * arena)309 UPB_INLINE grpc_gcp_ServerHandshakeParameters *grpc_gcp_ServerHandshakeParameters_parse(const char *buf, size_t size,
310 upb_arena *arena) {
311 grpc_gcp_ServerHandshakeParameters *ret = grpc_gcp_ServerHandshakeParameters_new(arena);
312 return (ret && upb_decode(buf, size, ret, &grpc_gcp_ServerHandshakeParameters_msginit, arena)) ? ret : NULL;
313 }
grpc_gcp_ServerHandshakeParameters_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)314 UPB_INLINE grpc_gcp_ServerHandshakeParameters *grpc_gcp_ServerHandshakeParameters_parse_ex(const char *buf, size_t size,
315 upb_arena *arena, int options) {
316 grpc_gcp_ServerHandshakeParameters *ret = grpc_gcp_ServerHandshakeParameters_new(arena);
317 return (ret && _upb_decode(buf, size, ret, &grpc_gcp_ServerHandshakeParameters_msginit, arena, options))
318 ? ret : NULL;
319 }
grpc_gcp_ServerHandshakeParameters_serialize(const grpc_gcp_ServerHandshakeParameters * msg,upb_arena * arena,size_t * len)320 UPB_INLINE char *grpc_gcp_ServerHandshakeParameters_serialize(const grpc_gcp_ServerHandshakeParameters *msg, upb_arena *arena, size_t *len) {
321 return upb_encode(msg, &grpc_gcp_ServerHandshakeParameters_msginit, arena, len);
322 }
323
grpc_gcp_ServerHandshakeParameters_record_protocols(const grpc_gcp_ServerHandshakeParameters * msg,size_t * len)324 UPB_INLINE upb_strview const* grpc_gcp_ServerHandshakeParameters_record_protocols(const grpc_gcp_ServerHandshakeParameters *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
grpc_gcp_ServerHandshakeParameters_has_local_identities(const grpc_gcp_ServerHandshakeParameters * msg)325 UPB_INLINE bool grpc_gcp_ServerHandshakeParameters_has_local_identities(const grpc_gcp_ServerHandshakeParameters *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
grpc_gcp_ServerHandshakeParameters_local_identities(const grpc_gcp_ServerHandshakeParameters * msg,size_t * len)326 UPB_INLINE const grpc_gcp_Identity* const* grpc_gcp_ServerHandshakeParameters_local_identities(const grpc_gcp_ServerHandshakeParameters *msg, size_t *len) { return (const grpc_gcp_Identity* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); }
327
grpc_gcp_ServerHandshakeParameters_mutable_record_protocols(grpc_gcp_ServerHandshakeParameters * msg,size_t * len)328 UPB_INLINE upb_strview* grpc_gcp_ServerHandshakeParameters_mutable_record_protocols(grpc_gcp_ServerHandshakeParameters *msg, size_t *len) {
329 return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
330 }
grpc_gcp_ServerHandshakeParameters_resize_record_protocols(grpc_gcp_ServerHandshakeParameters * msg,size_t len,upb_arena * arena)331 UPB_INLINE upb_strview* grpc_gcp_ServerHandshakeParameters_resize_record_protocols(grpc_gcp_ServerHandshakeParameters *msg, size_t len, upb_arena *arena) {
332 return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(3, 4), arena);
333 }
grpc_gcp_ServerHandshakeParameters_add_record_protocols(grpc_gcp_ServerHandshakeParameters * msg,upb_strview val,upb_arena * arena)334 UPB_INLINE bool grpc_gcp_ServerHandshakeParameters_add_record_protocols(grpc_gcp_ServerHandshakeParameters *msg, upb_strview val, upb_arena *arena) {
335 return _upb_array_append_accessor2(msg, UPB_SIZE(0, 0), UPB_SIZE(3, 4), &val,
336 arena);
337 }
grpc_gcp_ServerHandshakeParameters_mutable_local_identities(grpc_gcp_ServerHandshakeParameters * msg,size_t * len)338 UPB_INLINE grpc_gcp_Identity** grpc_gcp_ServerHandshakeParameters_mutable_local_identities(grpc_gcp_ServerHandshakeParameters *msg, size_t *len) {
339 return (grpc_gcp_Identity**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
340 }
grpc_gcp_ServerHandshakeParameters_resize_local_identities(grpc_gcp_ServerHandshakeParameters * msg,size_t len,upb_arena * arena)341 UPB_INLINE grpc_gcp_Identity** grpc_gcp_ServerHandshakeParameters_resize_local_identities(grpc_gcp_ServerHandshakeParameters *msg, size_t len, upb_arena *arena) {
342 return (grpc_gcp_Identity**)_upb_array_resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena);
343 }
grpc_gcp_ServerHandshakeParameters_add_local_identities(grpc_gcp_ServerHandshakeParameters * msg,upb_arena * arena)344 UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_ServerHandshakeParameters_add_local_identities(grpc_gcp_ServerHandshakeParameters *msg, upb_arena *arena) {
345 struct grpc_gcp_Identity* sub = (struct grpc_gcp_Identity*)_upb_msg_new(&grpc_gcp_Identity_msginit, arena);
346 bool ok = _upb_array_append_accessor2(
347 msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena);
348 if (!ok) return NULL;
349 return sub;
350 }
351
352 /* grpc.gcp.StartServerHandshakeReq */
353
grpc_gcp_StartServerHandshakeReq_new(upb_arena * arena)354 UPB_INLINE grpc_gcp_StartServerHandshakeReq *grpc_gcp_StartServerHandshakeReq_new(upb_arena *arena) {
355 return (grpc_gcp_StartServerHandshakeReq *)_upb_msg_new(&grpc_gcp_StartServerHandshakeReq_msginit, arena);
356 }
grpc_gcp_StartServerHandshakeReq_parse(const char * buf,size_t size,upb_arena * arena)357 UPB_INLINE grpc_gcp_StartServerHandshakeReq *grpc_gcp_StartServerHandshakeReq_parse(const char *buf, size_t size,
358 upb_arena *arena) {
359 grpc_gcp_StartServerHandshakeReq *ret = grpc_gcp_StartServerHandshakeReq_new(arena);
360 return (ret && upb_decode(buf, size, ret, &grpc_gcp_StartServerHandshakeReq_msginit, arena)) ? ret : NULL;
361 }
grpc_gcp_StartServerHandshakeReq_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)362 UPB_INLINE grpc_gcp_StartServerHandshakeReq *grpc_gcp_StartServerHandshakeReq_parse_ex(const char *buf, size_t size,
363 upb_arena *arena, int options) {
364 grpc_gcp_StartServerHandshakeReq *ret = grpc_gcp_StartServerHandshakeReq_new(arena);
365 return (ret && _upb_decode(buf, size, ret, &grpc_gcp_StartServerHandshakeReq_msginit, arena, options))
366 ? ret : NULL;
367 }
grpc_gcp_StartServerHandshakeReq_serialize(const grpc_gcp_StartServerHandshakeReq * msg,upb_arena * arena,size_t * len)368 UPB_INLINE char *grpc_gcp_StartServerHandshakeReq_serialize(const grpc_gcp_StartServerHandshakeReq *msg, upb_arena *arena, size_t *len) {
369 return upb_encode(msg, &grpc_gcp_StartServerHandshakeReq_msginit, arena, len);
370 }
371
grpc_gcp_StartServerHandshakeReq_application_protocols(const grpc_gcp_StartServerHandshakeReq * msg,size_t * len)372 UPB_INLINE upb_strview const* grpc_gcp_StartServerHandshakeReq_application_protocols(const grpc_gcp_StartServerHandshakeReq *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 48), len); }
grpc_gcp_StartServerHandshakeReq_has_handshake_parameters(const grpc_gcp_StartServerHandshakeReq * msg)373 UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_has_handshake_parameters(const grpc_gcp_StartServerHandshakeReq *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 56)); }
grpc_gcp_StartServerHandshakeReq_handshake_parameters_size(const grpc_gcp_StartServerHandshakeReq * msg)374 UPB_INLINE size_t grpc_gcp_StartServerHandshakeReq_handshake_parameters_size(const grpc_gcp_StartServerHandshakeReq *msg) {return _upb_msg_map_size(msg, UPB_SIZE(32, 56)); }
grpc_gcp_StartServerHandshakeReq_handshake_parameters_get(const grpc_gcp_StartServerHandshakeReq * msg,int32_t key,grpc_gcp_ServerHandshakeParameters ** val)375 UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_handshake_parameters_get(const grpc_gcp_StartServerHandshakeReq *msg, int32_t key, grpc_gcp_ServerHandshakeParameters* *val) { return _upb_msg_map_get(msg, UPB_SIZE(32, 56), &key, sizeof(key), val, sizeof(*val)); }
grpc_gcp_StartServerHandshakeReq_handshake_parameters_next(const grpc_gcp_StartServerHandshakeReq * msg,size_t * iter)376 UPB_INLINE const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry* grpc_gcp_StartServerHandshakeReq_handshake_parameters_next(const grpc_gcp_StartServerHandshakeReq *msg, size_t* iter) { return (const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry*)_upb_msg_map_next(msg, UPB_SIZE(32, 56), iter); }
grpc_gcp_StartServerHandshakeReq_in_bytes(const grpc_gcp_StartServerHandshakeReq * msg)377 UPB_INLINE upb_strview grpc_gcp_StartServerHandshakeReq_in_bytes(const grpc_gcp_StartServerHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
grpc_gcp_StartServerHandshakeReq_has_local_endpoint(const grpc_gcp_StartServerHandshakeReq * msg)378 UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_has_local_endpoint(const grpc_gcp_StartServerHandshakeReq *msg) { return _upb_hasbit(msg, 1); }
grpc_gcp_StartServerHandshakeReq_local_endpoint(const grpc_gcp_StartServerHandshakeReq * msg)379 UPB_INLINE const grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_local_endpoint(const grpc_gcp_StartServerHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const grpc_gcp_Endpoint*); }
grpc_gcp_StartServerHandshakeReq_has_remote_endpoint(const grpc_gcp_StartServerHandshakeReq * msg)380 UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_has_remote_endpoint(const grpc_gcp_StartServerHandshakeReq *msg) { return _upb_hasbit(msg, 2); }
grpc_gcp_StartServerHandshakeReq_remote_endpoint(const grpc_gcp_StartServerHandshakeReq * msg)381 UPB_INLINE const grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_remote_endpoint(const grpc_gcp_StartServerHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const grpc_gcp_Endpoint*); }
grpc_gcp_StartServerHandshakeReq_has_rpc_versions(const grpc_gcp_StartServerHandshakeReq * msg)382 UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_has_rpc_versions(const grpc_gcp_StartServerHandshakeReq *msg) { return _upb_hasbit(msg, 3); }
grpc_gcp_StartServerHandshakeReq_rpc_versions(const grpc_gcp_StartServerHandshakeReq * msg)383 UPB_INLINE const struct grpc_gcp_RpcProtocolVersions* grpc_gcp_StartServerHandshakeReq_rpc_versions(const grpc_gcp_StartServerHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const struct grpc_gcp_RpcProtocolVersions*); }
grpc_gcp_StartServerHandshakeReq_max_frame_size(const grpc_gcp_StartServerHandshakeReq * msg)384 UPB_INLINE uint32_t grpc_gcp_StartServerHandshakeReq_max_frame_size(const grpc_gcp_StartServerHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t); }
385
grpc_gcp_StartServerHandshakeReq_mutable_application_protocols(grpc_gcp_StartServerHandshakeReq * msg,size_t * len)386 UPB_INLINE upb_strview* grpc_gcp_StartServerHandshakeReq_mutable_application_protocols(grpc_gcp_StartServerHandshakeReq *msg, size_t *len) {
387 return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 48), len);
388 }
grpc_gcp_StartServerHandshakeReq_resize_application_protocols(grpc_gcp_StartServerHandshakeReq * msg,size_t len,upb_arena * arena)389 UPB_INLINE upb_strview* grpc_gcp_StartServerHandshakeReq_resize_application_protocols(grpc_gcp_StartServerHandshakeReq *msg, size_t len, upb_arena *arena) {
390 return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 48), len, UPB_SIZE(3, 4), arena);
391 }
grpc_gcp_StartServerHandshakeReq_add_application_protocols(grpc_gcp_StartServerHandshakeReq * msg,upb_strview val,upb_arena * arena)392 UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_add_application_protocols(grpc_gcp_StartServerHandshakeReq *msg, upb_strview val, upb_arena *arena) {
393 return _upb_array_append_accessor2(msg, UPB_SIZE(28, 48), UPB_SIZE(3, 4), &val,
394 arena);
395 }
grpc_gcp_StartServerHandshakeReq_handshake_parameters_clear(grpc_gcp_StartServerHandshakeReq * msg)396 UPB_INLINE void grpc_gcp_StartServerHandshakeReq_handshake_parameters_clear(grpc_gcp_StartServerHandshakeReq *msg) { _upb_msg_map_clear(msg, UPB_SIZE(32, 56)); }
grpc_gcp_StartServerHandshakeReq_handshake_parameters_set(grpc_gcp_StartServerHandshakeReq * msg,int32_t key,grpc_gcp_ServerHandshakeParameters * val,upb_arena * a)397 UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_handshake_parameters_set(grpc_gcp_StartServerHandshakeReq *msg, int32_t key, grpc_gcp_ServerHandshakeParameters* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(32, 56), &key, sizeof(key), &val, sizeof(val), a); }
grpc_gcp_StartServerHandshakeReq_handshake_parameters_delete(grpc_gcp_StartServerHandshakeReq * msg,int32_t key)398 UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_handshake_parameters_delete(grpc_gcp_StartServerHandshakeReq *msg, int32_t key) { return _upb_msg_map_delete(msg, UPB_SIZE(32, 56), &key, sizeof(key)); }
grpc_gcp_StartServerHandshakeReq_handshake_parameters_nextmutable(grpc_gcp_StartServerHandshakeReq * msg,size_t * iter)399 UPB_INLINE grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry* grpc_gcp_StartServerHandshakeReq_handshake_parameters_nextmutable(grpc_gcp_StartServerHandshakeReq *msg, size_t* iter) { return (grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry*)_upb_msg_map_next(msg, UPB_SIZE(32, 56), iter); }
grpc_gcp_StartServerHandshakeReq_set_in_bytes(grpc_gcp_StartServerHandshakeReq * msg,upb_strview value)400 UPB_INLINE void grpc_gcp_StartServerHandshakeReq_set_in_bytes(grpc_gcp_StartServerHandshakeReq *msg, upb_strview value) {
401 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
402 }
grpc_gcp_StartServerHandshakeReq_set_local_endpoint(grpc_gcp_StartServerHandshakeReq * msg,grpc_gcp_Endpoint * value)403 UPB_INLINE void grpc_gcp_StartServerHandshakeReq_set_local_endpoint(grpc_gcp_StartServerHandshakeReq *msg, grpc_gcp_Endpoint* value) {
404 _upb_sethas(msg, 1);
405 *UPB_PTR_AT(msg, UPB_SIZE(16, 24), grpc_gcp_Endpoint*) = value;
406 }
grpc_gcp_StartServerHandshakeReq_mutable_local_endpoint(grpc_gcp_StartServerHandshakeReq * msg,upb_arena * arena)407 UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_mutable_local_endpoint(grpc_gcp_StartServerHandshakeReq *msg, upb_arena *arena) {
408 struct grpc_gcp_Endpoint* sub = (struct grpc_gcp_Endpoint*)grpc_gcp_StartServerHandshakeReq_local_endpoint(msg);
409 if (sub == NULL) {
410 sub = (struct grpc_gcp_Endpoint*)_upb_msg_new(&grpc_gcp_Endpoint_msginit, arena);
411 if (!sub) return NULL;
412 grpc_gcp_StartServerHandshakeReq_set_local_endpoint(msg, sub);
413 }
414 return sub;
415 }
grpc_gcp_StartServerHandshakeReq_set_remote_endpoint(grpc_gcp_StartServerHandshakeReq * msg,grpc_gcp_Endpoint * value)416 UPB_INLINE void grpc_gcp_StartServerHandshakeReq_set_remote_endpoint(grpc_gcp_StartServerHandshakeReq *msg, grpc_gcp_Endpoint* value) {
417 _upb_sethas(msg, 2);
418 *UPB_PTR_AT(msg, UPB_SIZE(20, 32), grpc_gcp_Endpoint*) = value;
419 }
grpc_gcp_StartServerHandshakeReq_mutable_remote_endpoint(grpc_gcp_StartServerHandshakeReq * msg,upb_arena * arena)420 UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_mutable_remote_endpoint(grpc_gcp_StartServerHandshakeReq *msg, upb_arena *arena) {
421 struct grpc_gcp_Endpoint* sub = (struct grpc_gcp_Endpoint*)grpc_gcp_StartServerHandshakeReq_remote_endpoint(msg);
422 if (sub == NULL) {
423 sub = (struct grpc_gcp_Endpoint*)_upb_msg_new(&grpc_gcp_Endpoint_msginit, arena);
424 if (!sub) return NULL;
425 grpc_gcp_StartServerHandshakeReq_set_remote_endpoint(msg, sub);
426 }
427 return sub;
428 }
grpc_gcp_StartServerHandshakeReq_set_rpc_versions(grpc_gcp_StartServerHandshakeReq * msg,struct grpc_gcp_RpcProtocolVersions * value)429 UPB_INLINE void grpc_gcp_StartServerHandshakeReq_set_rpc_versions(grpc_gcp_StartServerHandshakeReq *msg, struct grpc_gcp_RpcProtocolVersions* value) {
430 _upb_sethas(msg, 3);
431 *UPB_PTR_AT(msg, UPB_SIZE(24, 40), struct grpc_gcp_RpcProtocolVersions*) = value;
432 }
grpc_gcp_StartServerHandshakeReq_mutable_rpc_versions(grpc_gcp_StartServerHandshakeReq * msg,upb_arena * arena)433 UPB_INLINE struct grpc_gcp_RpcProtocolVersions* grpc_gcp_StartServerHandshakeReq_mutable_rpc_versions(grpc_gcp_StartServerHandshakeReq *msg, upb_arena *arena) {
434 struct grpc_gcp_RpcProtocolVersions* sub = (struct grpc_gcp_RpcProtocolVersions*)grpc_gcp_StartServerHandshakeReq_rpc_versions(msg);
435 if (sub == NULL) {
436 sub = (struct grpc_gcp_RpcProtocolVersions*)_upb_msg_new(&grpc_gcp_RpcProtocolVersions_msginit, arena);
437 if (!sub) return NULL;
438 grpc_gcp_StartServerHandshakeReq_set_rpc_versions(msg, sub);
439 }
440 return sub;
441 }
grpc_gcp_StartServerHandshakeReq_set_max_frame_size(grpc_gcp_StartServerHandshakeReq * msg,uint32_t value)442 UPB_INLINE void grpc_gcp_StartServerHandshakeReq_set_max_frame_size(grpc_gcp_StartServerHandshakeReq *msg, uint32_t value) {
443 *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t) = value;
444 }
445
446 /* grpc.gcp.StartServerHandshakeReq.HandshakeParametersEntry */
447
grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_key(const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry * msg)448 UPB_INLINE int32_t grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_key(const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry *msg) {
449 int32_t ret;
450 _upb_msg_map_key(msg, &ret, sizeof(ret));
451 return ret;
452 }
grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_has_value(const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry * msg)453 UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_has_value(const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_value(const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry * msg)454 UPB_INLINE const grpc_gcp_ServerHandshakeParameters* grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_value(const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry *msg) {
455 grpc_gcp_ServerHandshakeParameters* ret;
456 _upb_msg_map_value(msg, &ret, sizeof(ret));
457 return ret;
458 }
459
grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_set_value(grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry * msg,grpc_gcp_ServerHandshakeParameters * value)460 UPB_INLINE void grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_set_value(grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry *msg, grpc_gcp_ServerHandshakeParameters* value) {
461 _upb_msg_map_set_value(msg, &value, sizeof(grpc_gcp_ServerHandshakeParameters*));
462 }
463
464 /* grpc.gcp.NextHandshakeMessageReq */
465
grpc_gcp_NextHandshakeMessageReq_new(upb_arena * arena)466 UPB_INLINE grpc_gcp_NextHandshakeMessageReq *grpc_gcp_NextHandshakeMessageReq_new(upb_arena *arena) {
467 return (grpc_gcp_NextHandshakeMessageReq *)_upb_msg_new(&grpc_gcp_NextHandshakeMessageReq_msginit, arena);
468 }
grpc_gcp_NextHandshakeMessageReq_parse(const char * buf,size_t size,upb_arena * arena)469 UPB_INLINE grpc_gcp_NextHandshakeMessageReq *grpc_gcp_NextHandshakeMessageReq_parse(const char *buf, size_t size,
470 upb_arena *arena) {
471 grpc_gcp_NextHandshakeMessageReq *ret = grpc_gcp_NextHandshakeMessageReq_new(arena);
472 return (ret && upb_decode(buf, size, ret, &grpc_gcp_NextHandshakeMessageReq_msginit, arena)) ? ret : NULL;
473 }
grpc_gcp_NextHandshakeMessageReq_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)474 UPB_INLINE grpc_gcp_NextHandshakeMessageReq *grpc_gcp_NextHandshakeMessageReq_parse_ex(const char *buf, size_t size,
475 upb_arena *arena, int options) {
476 grpc_gcp_NextHandshakeMessageReq *ret = grpc_gcp_NextHandshakeMessageReq_new(arena);
477 return (ret && _upb_decode(buf, size, ret, &grpc_gcp_NextHandshakeMessageReq_msginit, arena, options))
478 ? ret : NULL;
479 }
grpc_gcp_NextHandshakeMessageReq_serialize(const grpc_gcp_NextHandshakeMessageReq * msg,upb_arena * arena,size_t * len)480 UPB_INLINE char *grpc_gcp_NextHandshakeMessageReq_serialize(const grpc_gcp_NextHandshakeMessageReq *msg, upb_arena *arena, size_t *len) {
481 return upb_encode(msg, &grpc_gcp_NextHandshakeMessageReq_msginit, arena, len);
482 }
483
grpc_gcp_NextHandshakeMessageReq_in_bytes(const grpc_gcp_NextHandshakeMessageReq * msg)484 UPB_INLINE upb_strview grpc_gcp_NextHandshakeMessageReq_in_bytes(const grpc_gcp_NextHandshakeMessageReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
485
grpc_gcp_NextHandshakeMessageReq_set_in_bytes(grpc_gcp_NextHandshakeMessageReq * msg,upb_strview value)486 UPB_INLINE void grpc_gcp_NextHandshakeMessageReq_set_in_bytes(grpc_gcp_NextHandshakeMessageReq *msg, upb_strview value) {
487 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
488 }
489
490 /* grpc.gcp.HandshakerReq */
491
grpc_gcp_HandshakerReq_new(upb_arena * arena)492 UPB_INLINE grpc_gcp_HandshakerReq *grpc_gcp_HandshakerReq_new(upb_arena *arena) {
493 return (grpc_gcp_HandshakerReq *)_upb_msg_new(&grpc_gcp_HandshakerReq_msginit, arena);
494 }
grpc_gcp_HandshakerReq_parse(const char * buf,size_t size,upb_arena * arena)495 UPB_INLINE grpc_gcp_HandshakerReq *grpc_gcp_HandshakerReq_parse(const char *buf, size_t size,
496 upb_arena *arena) {
497 grpc_gcp_HandshakerReq *ret = grpc_gcp_HandshakerReq_new(arena);
498 return (ret && upb_decode(buf, size, ret, &grpc_gcp_HandshakerReq_msginit, arena)) ? ret : NULL;
499 }
grpc_gcp_HandshakerReq_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)500 UPB_INLINE grpc_gcp_HandshakerReq *grpc_gcp_HandshakerReq_parse_ex(const char *buf, size_t size,
501 upb_arena *arena, int options) {
502 grpc_gcp_HandshakerReq *ret = grpc_gcp_HandshakerReq_new(arena);
503 return (ret && _upb_decode(buf, size, ret, &grpc_gcp_HandshakerReq_msginit, arena, options))
504 ? ret : NULL;
505 }
grpc_gcp_HandshakerReq_serialize(const grpc_gcp_HandshakerReq * msg,upb_arena * arena,size_t * len)506 UPB_INLINE char *grpc_gcp_HandshakerReq_serialize(const grpc_gcp_HandshakerReq *msg, upb_arena *arena, size_t *len) {
507 return upb_encode(msg, &grpc_gcp_HandshakerReq_msginit, arena, len);
508 }
509
510 typedef enum {
511 grpc_gcp_HandshakerReq_req_oneof_client_start = 1,
512 grpc_gcp_HandshakerReq_req_oneof_server_start = 2,
513 grpc_gcp_HandshakerReq_req_oneof_next = 3,
514 grpc_gcp_HandshakerReq_req_oneof_NOT_SET = 0
515 } grpc_gcp_HandshakerReq_req_oneof_oneofcases;
grpc_gcp_HandshakerReq_req_oneof_case(const grpc_gcp_HandshakerReq * msg)516 UPB_INLINE grpc_gcp_HandshakerReq_req_oneof_oneofcases grpc_gcp_HandshakerReq_req_oneof_case(const grpc_gcp_HandshakerReq* msg) { return (grpc_gcp_HandshakerReq_req_oneof_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); }
517
grpc_gcp_HandshakerReq_has_client_start(const grpc_gcp_HandshakerReq * msg)518 UPB_INLINE bool grpc_gcp_HandshakerReq_has_client_start(const grpc_gcp_HandshakerReq *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; }
grpc_gcp_HandshakerReq_client_start(const grpc_gcp_HandshakerReq * msg)519 UPB_INLINE const grpc_gcp_StartClientHandshakeReq* grpc_gcp_HandshakerReq_client_start(const grpc_gcp_HandshakerReq *msg) { return UPB_READ_ONEOF(msg, const grpc_gcp_StartClientHandshakeReq*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); }
grpc_gcp_HandshakerReq_has_server_start(const grpc_gcp_HandshakerReq * msg)520 UPB_INLINE bool grpc_gcp_HandshakerReq_has_server_start(const grpc_gcp_HandshakerReq *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 2; }
grpc_gcp_HandshakerReq_server_start(const grpc_gcp_HandshakerReq * msg)521 UPB_INLINE const grpc_gcp_StartServerHandshakeReq* grpc_gcp_HandshakerReq_server_start(const grpc_gcp_HandshakerReq *msg) { return UPB_READ_ONEOF(msg, const grpc_gcp_StartServerHandshakeReq*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); }
grpc_gcp_HandshakerReq_has_next(const grpc_gcp_HandshakerReq * msg)522 UPB_INLINE bool grpc_gcp_HandshakerReq_has_next(const grpc_gcp_HandshakerReq *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 3; }
grpc_gcp_HandshakerReq_next(const grpc_gcp_HandshakerReq * msg)523 UPB_INLINE const grpc_gcp_NextHandshakeMessageReq* grpc_gcp_HandshakerReq_next(const grpc_gcp_HandshakerReq *msg) { return UPB_READ_ONEOF(msg, const grpc_gcp_NextHandshakeMessageReq*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 3, NULL); }
524
grpc_gcp_HandshakerReq_set_client_start(grpc_gcp_HandshakerReq * msg,grpc_gcp_StartClientHandshakeReq * value)525 UPB_INLINE void grpc_gcp_HandshakerReq_set_client_start(grpc_gcp_HandshakerReq *msg, grpc_gcp_StartClientHandshakeReq* value) {
526 UPB_WRITE_ONEOF(msg, grpc_gcp_StartClientHandshakeReq*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1);
527 }
grpc_gcp_HandshakerReq_mutable_client_start(grpc_gcp_HandshakerReq * msg,upb_arena * arena)528 UPB_INLINE struct grpc_gcp_StartClientHandshakeReq* grpc_gcp_HandshakerReq_mutable_client_start(grpc_gcp_HandshakerReq *msg, upb_arena *arena) {
529 struct grpc_gcp_StartClientHandshakeReq* sub = (struct grpc_gcp_StartClientHandshakeReq*)grpc_gcp_HandshakerReq_client_start(msg);
530 if (sub == NULL) {
531 sub = (struct grpc_gcp_StartClientHandshakeReq*)_upb_msg_new(&grpc_gcp_StartClientHandshakeReq_msginit, arena);
532 if (!sub) return NULL;
533 grpc_gcp_HandshakerReq_set_client_start(msg, sub);
534 }
535 return sub;
536 }
grpc_gcp_HandshakerReq_set_server_start(grpc_gcp_HandshakerReq * msg,grpc_gcp_StartServerHandshakeReq * value)537 UPB_INLINE void grpc_gcp_HandshakerReq_set_server_start(grpc_gcp_HandshakerReq *msg, grpc_gcp_StartServerHandshakeReq* value) {
538 UPB_WRITE_ONEOF(msg, grpc_gcp_StartServerHandshakeReq*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2);
539 }
grpc_gcp_HandshakerReq_mutable_server_start(grpc_gcp_HandshakerReq * msg,upb_arena * arena)540 UPB_INLINE struct grpc_gcp_StartServerHandshakeReq* grpc_gcp_HandshakerReq_mutable_server_start(grpc_gcp_HandshakerReq *msg, upb_arena *arena) {
541 struct grpc_gcp_StartServerHandshakeReq* sub = (struct grpc_gcp_StartServerHandshakeReq*)grpc_gcp_HandshakerReq_server_start(msg);
542 if (sub == NULL) {
543 sub = (struct grpc_gcp_StartServerHandshakeReq*)_upb_msg_new(&grpc_gcp_StartServerHandshakeReq_msginit, arena);
544 if (!sub) return NULL;
545 grpc_gcp_HandshakerReq_set_server_start(msg, sub);
546 }
547 return sub;
548 }
grpc_gcp_HandshakerReq_set_next(grpc_gcp_HandshakerReq * msg,grpc_gcp_NextHandshakeMessageReq * value)549 UPB_INLINE void grpc_gcp_HandshakerReq_set_next(grpc_gcp_HandshakerReq *msg, grpc_gcp_NextHandshakeMessageReq* value) {
550 UPB_WRITE_ONEOF(msg, grpc_gcp_NextHandshakeMessageReq*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 3);
551 }
grpc_gcp_HandshakerReq_mutable_next(grpc_gcp_HandshakerReq * msg,upb_arena * arena)552 UPB_INLINE struct grpc_gcp_NextHandshakeMessageReq* grpc_gcp_HandshakerReq_mutable_next(grpc_gcp_HandshakerReq *msg, upb_arena *arena) {
553 struct grpc_gcp_NextHandshakeMessageReq* sub = (struct grpc_gcp_NextHandshakeMessageReq*)grpc_gcp_HandshakerReq_next(msg);
554 if (sub == NULL) {
555 sub = (struct grpc_gcp_NextHandshakeMessageReq*)_upb_msg_new(&grpc_gcp_NextHandshakeMessageReq_msginit, arena);
556 if (!sub) return NULL;
557 grpc_gcp_HandshakerReq_set_next(msg, sub);
558 }
559 return sub;
560 }
561
562 /* grpc.gcp.HandshakerResult */
563
grpc_gcp_HandshakerResult_new(upb_arena * arena)564 UPB_INLINE grpc_gcp_HandshakerResult *grpc_gcp_HandshakerResult_new(upb_arena *arena) {
565 return (grpc_gcp_HandshakerResult *)_upb_msg_new(&grpc_gcp_HandshakerResult_msginit, arena);
566 }
grpc_gcp_HandshakerResult_parse(const char * buf,size_t size,upb_arena * arena)567 UPB_INLINE grpc_gcp_HandshakerResult *grpc_gcp_HandshakerResult_parse(const char *buf, size_t size,
568 upb_arena *arena) {
569 grpc_gcp_HandshakerResult *ret = grpc_gcp_HandshakerResult_new(arena);
570 return (ret && upb_decode(buf, size, ret, &grpc_gcp_HandshakerResult_msginit, arena)) ? ret : NULL;
571 }
grpc_gcp_HandshakerResult_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)572 UPB_INLINE grpc_gcp_HandshakerResult *grpc_gcp_HandshakerResult_parse_ex(const char *buf, size_t size,
573 upb_arena *arena, int options) {
574 grpc_gcp_HandshakerResult *ret = grpc_gcp_HandshakerResult_new(arena);
575 return (ret && _upb_decode(buf, size, ret, &grpc_gcp_HandshakerResult_msginit, arena, options))
576 ? ret : NULL;
577 }
grpc_gcp_HandshakerResult_serialize(const grpc_gcp_HandshakerResult * msg,upb_arena * arena,size_t * len)578 UPB_INLINE char *grpc_gcp_HandshakerResult_serialize(const grpc_gcp_HandshakerResult *msg, upb_arena *arena, size_t *len) {
579 return upb_encode(msg, &grpc_gcp_HandshakerResult_msginit, arena, len);
580 }
581
grpc_gcp_HandshakerResult_application_protocol(const grpc_gcp_HandshakerResult * msg)582 UPB_INLINE upb_strview grpc_gcp_HandshakerResult_application_protocol(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview); }
grpc_gcp_HandshakerResult_record_protocol(const grpc_gcp_HandshakerResult * msg)583 UPB_INLINE upb_strview grpc_gcp_HandshakerResult_record_protocol(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), upb_strview); }
grpc_gcp_HandshakerResult_key_data(const grpc_gcp_HandshakerResult * msg)584 UPB_INLINE upb_strview grpc_gcp_HandshakerResult_key_data(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), upb_strview); }
grpc_gcp_HandshakerResult_has_peer_identity(const grpc_gcp_HandshakerResult * msg)585 UPB_INLINE bool grpc_gcp_HandshakerResult_has_peer_identity(const grpc_gcp_HandshakerResult *msg) { return _upb_hasbit(msg, 1); }
grpc_gcp_HandshakerResult_peer_identity(const grpc_gcp_HandshakerResult * msg)586 UPB_INLINE const grpc_gcp_Identity* grpc_gcp_HandshakerResult_peer_identity(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 64), const grpc_gcp_Identity*); }
grpc_gcp_HandshakerResult_has_local_identity(const grpc_gcp_HandshakerResult * msg)587 UPB_INLINE bool grpc_gcp_HandshakerResult_has_local_identity(const grpc_gcp_HandshakerResult *msg) { return _upb_hasbit(msg, 2); }
grpc_gcp_HandshakerResult_local_identity(const grpc_gcp_HandshakerResult * msg)588 UPB_INLINE const grpc_gcp_Identity* grpc_gcp_HandshakerResult_local_identity(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 72), const grpc_gcp_Identity*); }
grpc_gcp_HandshakerResult_keep_channel_open(const grpc_gcp_HandshakerResult * msg)589 UPB_INLINE bool grpc_gcp_HandshakerResult_keep_channel_open(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); }
grpc_gcp_HandshakerResult_has_peer_rpc_versions(const grpc_gcp_HandshakerResult * msg)590 UPB_INLINE bool grpc_gcp_HandshakerResult_has_peer_rpc_versions(const grpc_gcp_HandshakerResult *msg) { return _upb_hasbit(msg, 3); }
grpc_gcp_HandshakerResult_peer_rpc_versions(const grpc_gcp_HandshakerResult * msg)591 UPB_INLINE const struct grpc_gcp_RpcProtocolVersions* grpc_gcp_HandshakerResult_peer_rpc_versions(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 80), const struct grpc_gcp_RpcProtocolVersions*); }
grpc_gcp_HandshakerResult_max_frame_size(const grpc_gcp_HandshakerResult * msg)592 UPB_INLINE uint32_t grpc_gcp_HandshakerResult_max_frame_size(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t); }
593
grpc_gcp_HandshakerResult_set_application_protocol(grpc_gcp_HandshakerResult * msg,upb_strview value)594 UPB_INLINE void grpc_gcp_HandshakerResult_set_application_protocol(grpc_gcp_HandshakerResult *msg, upb_strview value) {
595 *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview) = value;
596 }
grpc_gcp_HandshakerResult_set_record_protocol(grpc_gcp_HandshakerResult * msg,upb_strview value)597 UPB_INLINE void grpc_gcp_HandshakerResult_set_record_protocol(grpc_gcp_HandshakerResult *msg, upb_strview value) {
598 *UPB_PTR_AT(msg, UPB_SIZE(20, 32), upb_strview) = value;
599 }
grpc_gcp_HandshakerResult_set_key_data(grpc_gcp_HandshakerResult * msg,upb_strview value)600 UPB_INLINE void grpc_gcp_HandshakerResult_set_key_data(grpc_gcp_HandshakerResult *msg, upb_strview value) {
601 *UPB_PTR_AT(msg, UPB_SIZE(28, 48), upb_strview) = value;
602 }
grpc_gcp_HandshakerResult_set_peer_identity(grpc_gcp_HandshakerResult * msg,grpc_gcp_Identity * value)603 UPB_INLINE void grpc_gcp_HandshakerResult_set_peer_identity(grpc_gcp_HandshakerResult *msg, grpc_gcp_Identity* value) {
604 _upb_sethas(msg, 1);
605 *UPB_PTR_AT(msg, UPB_SIZE(36, 64), grpc_gcp_Identity*) = value;
606 }
grpc_gcp_HandshakerResult_mutable_peer_identity(grpc_gcp_HandshakerResult * msg,upb_arena * arena)607 UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_HandshakerResult_mutable_peer_identity(grpc_gcp_HandshakerResult *msg, upb_arena *arena) {
608 struct grpc_gcp_Identity* sub = (struct grpc_gcp_Identity*)grpc_gcp_HandshakerResult_peer_identity(msg);
609 if (sub == NULL) {
610 sub = (struct grpc_gcp_Identity*)_upb_msg_new(&grpc_gcp_Identity_msginit, arena);
611 if (!sub) return NULL;
612 grpc_gcp_HandshakerResult_set_peer_identity(msg, sub);
613 }
614 return sub;
615 }
grpc_gcp_HandshakerResult_set_local_identity(grpc_gcp_HandshakerResult * msg,grpc_gcp_Identity * value)616 UPB_INLINE void grpc_gcp_HandshakerResult_set_local_identity(grpc_gcp_HandshakerResult *msg, grpc_gcp_Identity* value) {
617 _upb_sethas(msg, 2);
618 *UPB_PTR_AT(msg, UPB_SIZE(40, 72), grpc_gcp_Identity*) = value;
619 }
grpc_gcp_HandshakerResult_mutable_local_identity(grpc_gcp_HandshakerResult * msg,upb_arena * arena)620 UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_HandshakerResult_mutable_local_identity(grpc_gcp_HandshakerResult *msg, upb_arena *arena) {
621 struct grpc_gcp_Identity* sub = (struct grpc_gcp_Identity*)grpc_gcp_HandshakerResult_local_identity(msg);
622 if (sub == NULL) {
623 sub = (struct grpc_gcp_Identity*)_upb_msg_new(&grpc_gcp_Identity_msginit, arena);
624 if (!sub) return NULL;
625 grpc_gcp_HandshakerResult_set_local_identity(msg, sub);
626 }
627 return sub;
628 }
grpc_gcp_HandshakerResult_set_keep_channel_open(grpc_gcp_HandshakerResult * msg,bool value)629 UPB_INLINE void grpc_gcp_HandshakerResult_set_keep_channel_open(grpc_gcp_HandshakerResult *msg, bool value) {
630 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value;
631 }
grpc_gcp_HandshakerResult_set_peer_rpc_versions(grpc_gcp_HandshakerResult * msg,struct grpc_gcp_RpcProtocolVersions * value)632 UPB_INLINE void grpc_gcp_HandshakerResult_set_peer_rpc_versions(grpc_gcp_HandshakerResult *msg, struct grpc_gcp_RpcProtocolVersions* value) {
633 _upb_sethas(msg, 3);
634 *UPB_PTR_AT(msg, UPB_SIZE(44, 80), struct grpc_gcp_RpcProtocolVersions*) = value;
635 }
grpc_gcp_HandshakerResult_mutable_peer_rpc_versions(grpc_gcp_HandshakerResult * msg,upb_arena * arena)636 UPB_INLINE struct grpc_gcp_RpcProtocolVersions* grpc_gcp_HandshakerResult_mutable_peer_rpc_versions(grpc_gcp_HandshakerResult *msg, upb_arena *arena) {
637 struct grpc_gcp_RpcProtocolVersions* sub = (struct grpc_gcp_RpcProtocolVersions*)grpc_gcp_HandshakerResult_peer_rpc_versions(msg);
638 if (sub == NULL) {
639 sub = (struct grpc_gcp_RpcProtocolVersions*)_upb_msg_new(&grpc_gcp_RpcProtocolVersions_msginit, arena);
640 if (!sub) return NULL;
641 grpc_gcp_HandshakerResult_set_peer_rpc_versions(msg, sub);
642 }
643 return sub;
644 }
grpc_gcp_HandshakerResult_set_max_frame_size(grpc_gcp_HandshakerResult * msg,uint32_t value)645 UPB_INLINE void grpc_gcp_HandshakerResult_set_max_frame_size(grpc_gcp_HandshakerResult *msg, uint32_t value) {
646 *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t) = value;
647 }
648
649 /* grpc.gcp.HandshakerStatus */
650
grpc_gcp_HandshakerStatus_new(upb_arena * arena)651 UPB_INLINE grpc_gcp_HandshakerStatus *grpc_gcp_HandshakerStatus_new(upb_arena *arena) {
652 return (grpc_gcp_HandshakerStatus *)_upb_msg_new(&grpc_gcp_HandshakerStatus_msginit, arena);
653 }
grpc_gcp_HandshakerStatus_parse(const char * buf,size_t size,upb_arena * arena)654 UPB_INLINE grpc_gcp_HandshakerStatus *grpc_gcp_HandshakerStatus_parse(const char *buf, size_t size,
655 upb_arena *arena) {
656 grpc_gcp_HandshakerStatus *ret = grpc_gcp_HandshakerStatus_new(arena);
657 return (ret && upb_decode(buf, size, ret, &grpc_gcp_HandshakerStatus_msginit, arena)) ? ret : NULL;
658 }
grpc_gcp_HandshakerStatus_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)659 UPB_INLINE grpc_gcp_HandshakerStatus *grpc_gcp_HandshakerStatus_parse_ex(const char *buf, size_t size,
660 upb_arena *arena, int options) {
661 grpc_gcp_HandshakerStatus *ret = grpc_gcp_HandshakerStatus_new(arena);
662 return (ret && _upb_decode(buf, size, ret, &grpc_gcp_HandshakerStatus_msginit, arena, options))
663 ? ret : NULL;
664 }
grpc_gcp_HandshakerStatus_serialize(const grpc_gcp_HandshakerStatus * msg,upb_arena * arena,size_t * len)665 UPB_INLINE char *grpc_gcp_HandshakerStatus_serialize(const grpc_gcp_HandshakerStatus *msg, upb_arena *arena, size_t *len) {
666 return upb_encode(msg, &grpc_gcp_HandshakerStatus_msginit, arena, len);
667 }
668
grpc_gcp_HandshakerStatus_code(const grpc_gcp_HandshakerStatus * msg)669 UPB_INLINE uint32_t grpc_gcp_HandshakerStatus_code(const grpc_gcp_HandshakerStatus *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); }
grpc_gcp_HandshakerStatus_details(const grpc_gcp_HandshakerStatus * msg)670 UPB_INLINE upb_strview grpc_gcp_HandshakerStatus_details(const grpc_gcp_HandshakerStatus *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
671
grpc_gcp_HandshakerStatus_set_code(grpc_gcp_HandshakerStatus * msg,uint32_t value)672 UPB_INLINE void grpc_gcp_HandshakerStatus_set_code(grpc_gcp_HandshakerStatus *msg, uint32_t value) {
673 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value;
674 }
grpc_gcp_HandshakerStatus_set_details(grpc_gcp_HandshakerStatus * msg,upb_strview value)675 UPB_INLINE void grpc_gcp_HandshakerStatus_set_details(grpc_gcp_HandshakerStatus *msg, upb_strview value) {
676 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
677 }
678
679 /* grpc.gcp.HandshakerResp */
680
grpc_gcp_HandshakerResp_new(upb_arena * arena)681 UPB_INLINE grpc_gcp_HandshakerResp *grpc_gcp_HandshakerResp_new(upb_arena *arena) {
682 return (grpc_gcp_HandshakerResp *)_upb_msg_new(&grpc_gcp_HandshakerResp_msginit, arena);
683 }
grpc_gcp_HandshakerResp_parse(const char * buf,size_t size,upb_arena * arena)684 UPB_INLINE grpc_gcp_HandshakerResp *grpc_gcp_HandshakerResp_parse(const char *buf, size_t size,
685 upb_arena *arena) {
686 grpc_gcp_HandshakerResp *ret = grpc_gcp_HandshakerResp_new(arena);
687 return (ret && upb_decode(buf, size, ret, &grpc_gcp_HandshakerResp_msginit, arena)) ? ret : NULL;
688 }
grpc_gcp_HandshakerResp_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)689 UPB_INLINE grpc_gcp_HandshakerResp *grpc_gcp_HandshakerResp_parse_ex(const char *buf, size_t size,
690 upb_arena *arena, int options) {
691 grpc_gcp_HandshakerResp *ret = grpc_gcp_HandshakerResp_new(arena);
692 return (ret && _upb_decode(buf, size, ret, &grpc_gcp_HandshakerResp_msginit, arena, options))
693 ? ret : NULL;
694 }
grpc_gcp_HandshakerResp_serialize(const grpc_gcp_HandshakerResp * msg,upb_arena * arena,size_t * len)695 UPB_INLINE char *grpc_gcp_HandshakerResp_serialize(const grpc_gcp_HandshakerResp *msg, upb_arena *arena, size_t *len) {
696 return upb_encode(msg, &grpc_gcp_HandshakerResp_msginit, arena, len);
697 }
698
grpc_gcp_HandshakerResp_out_frames(const grpc_gcp_HandshakerResp * msg)699 UPB_INLINE upb_strview grpc_gcp_HandshakerResp_out_frames(const grpc_gcp_HandshakerResp *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
grpc_gcp_HandshakerResp_bytes_consumed(const grpc_gcp_HandshakerResp * msg)700 UPB_INLINE uint32_t grpc_gcp_HandshakerResp_bytes_consumed(const grpc_gcp_HandshakerResp *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t); }
grpc_gcp_HandshakerResp_has_result(const grpc_gcp_HandshakerResp * msg)701 UPB_INLINE bool grpc_gcp_HandshakerResp_has_result(const grpc_gcp_HandshakerResp *msg) { return _upb_hasbit(msg, 1); }
grpc_gcp_HandshakerResp_result(const grpc_gcp_HandshakerResp * msg)702 UPB_INLINE const grpc_gcp_HandshakerResult* grpc_gcp_HandshakerResp_result(const grpc_gcp_HandshakerResp *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const grpc_gcp_HandshakerResult*); }
grpc_gcp_HandshakerResp_has_status(const grpc_gcp_HandshakerResp * msg)703 UPB_INLINE bool grpc_gcp_HandshakerResp_has_status(const grpc_gcp_HandshakerResp *msg) { return _upb_hasbit(msg, 2); }
grpc_gcp_HandshakerResp_status(const grpc_gcp_HandshakerResp * msg)704 UPB_INLINE const grpc_gcp_HandshakerStatus* grpc_gcp_HandshakerResp_status(const grpc_gcp_HandshakerResp *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const grpc_gcp_HandshakerStatus*); }
705
grpc_gcp_HandshakerResp_set_out_frames(grpc_gcp_HandshakerResp * msg,upb_strview value)706 UPB_INLINE void grpc_gcp_HandshakerResp_set_out_frames(grpc_gcp_HandshakerResp *msg, upb_strview value) {
707 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
708 }
grpc_gcp_HandshakerResp_set_bytes_consumed(grpc_gcp_HandshakerResp * msg,uint32_t value)709 UPB_INLINE void grpc_gcp_HandshakerResp_set_bytes_consumed(grpc_gcp_HandshakerResp *msg, uint32_t value) {
710 *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t) = value;
711 }
grpc_gcp_HandshakerResp_set_result(grpc_gcp_HandshakerResp * msg,grpc_gcp_HandshakerResult * value)712 UPB_INLINE void grpc_gcp_HandshakerResp_set_result(grpc_gcp_HandshakerResp *msg, grpc_gcp_HandshakerResult* value) {
713 _upb_sethas(msg, 1);
714 *UPB_PTR_AT(msg, UPB_SIZE(16, 24), grpc_gcp_HandshakerResult*) = value;
715 }
grpc_gcp_HandshakerResp_mutable_result(grpc_gcp_HandshakerResp * msg,upb_arena * arena)716 UPB_INLINE struct grpc_gcp_HandshakerResult* grpc_gcp_HandshakerResp_mutable_result(grpc_gcp_HandshakerResp *msg, upb_arena *arena) {
717 struct grpc_gcp_HandshakerResult* sub = (struct grpc_gcp_HandshakerResult*)grpc_gcp_HandshakerResp_result(msg);
718 if (sub == NULL) {
719 sub = (struct grpc_gcp_HandshakerResult*)_upb_msg_new(&grpc_gcp_HandshakerResult_msginit, arena);
720 if (!sub) return NULL;
721 grpc_gcp_HandshakerResp_set_result(msg, sub);
722 }
723 return sub;
724 }
grpc_gcp_HandshakerResp_set_status(grpc_gcp_HandshakerResp * msg,grpc_gcp_HandshakerStatus * value)725 UPB_INLINE void grpc_gcp_HandshakerResp_set_status(grpc_gcp_HandshakerResp *msg, grpc_gcp_HandshakerStatus* value) {
726 _upb_sethas(msg, 2);
727 *UPB_PTR_AT(msg, UPB_SIZE(20, 32), grpc_gcp_HandshakerStatus*) = value;
728 }
grpc_gcp_HandshakerResp_mutable_status(grpc_gcp_HandshakerResp * msg,upb_arena * arena)729 UPB_INLINE struct grpc_gcp_HandshakerStatus* grpc_gcp_HandshakerResp_mutable_status(grpc_gcp_HandshakerResp *msg, upb_arena *arena) {
730 struct grpc_gcp_HandshakerStatus* sub = (struct grpc_gcp_HandshakerStatus*)grpc_gcp_HandshakerResp_status(msg);
731 if (sub == NULL) {
732 sub = (struct grpc_gcp_HandshakerStatus*)_upb_msg_new(&grpc_gcp_HandshakerStatus_msginit, arena);
733 if (!sub) return NULL;
734 grpc_gcp_HandshakerResp_set_status(msg, sub);
735 }
736 return sub;
737 }
738
739 #ifdef __cplusplus
740 } /* extern "C" */
741 #endif
742
743 #include "upb/port_undef.inc"
744
745 #endif /* SRC_PROTO_GRPC_GCP_HANDSHAKER_PROTO_UPB_H_ */
746