1 /* This file was generated by upbc (the upb compiler) from the input
4 * src/proto/grpc/gcp/handshaker.proto
6 * Do not edit -- your changes will be discarded when the file is
9 #ifndef SRC_PROTO_GRPC_GCP_HANDSHAKER_PROTO_UPB_H_
10 #define SRC_PROTO_GRPC_GCP_HANDSHAKER_PROTO_UPB_H_
12 #include "upb/msg_internal.h"
13 #include "upb/decode.h"
14 #include "upb/decode_fast.h"
15 #include "upb/encode.h"
17 #include "upb/port_def.inc"
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;
63 grpc_gcp_HANDSHAKE_PROTOCOL_UNSPECIFIED = 0,
66 } grpc_gcp_HandshakeProtocol;
69 grpc_gcp_NETWORK_PROTOCOL_UNSPECIFIED = 0,
72 } grpc_gcp_NetworkProtocol;
75 /* grpc.gcp.Endpoint */
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);
80 UPB_INLINE grpc_gcp_Endpoint *grpc_gcp_Endpoint_parse(const char *buf, size_t size,
82 grpc_gcp_Endpoint *ret = grpc_gcp_Endpoint_new(arena);
83 if (!ret) return NULL;
84 if (!upb_decode(buf, size, ret, &grpc_gcp_Endpoint_msginit, arena)) return NULL;
87 UPB_INLINE grpc_gcp_Endpoint *grpc_gcp_Endpoint_parse_ex(const char *buf, size_t size,
88 const upb_extreg *extreg, int options,
90 grpc_gcp_Endpoint *ret = grpc_gcp_Endpoint_new(arena);
91 if (!ret) return NULL;
92 if (!_upb_decode(buf, size, ret, &grpc_gcp_Endpoint_msginit, extreg, options, arena)) {
97 UPB_INLINE char *grpc_gcp_Endpoint_serialize(const grpc_gcp_Endpoint *msg, upb_arena *arena, size_t *len) {
98 return upb_encode(msg, &grpc_gcp_Endpoint_msginit, arena, len);
101 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); }
102 UPB_INLINE int32_t grpc_gcp_Endpoint_port(const grpc_gcp_Endpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
103 UPB_INLINE int32_t grpc_gcp_Endpoint_protocol(const grpc_gcp_Endpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
105 UPB_INLINE void grpc_gcp_Endpoint_set_ip_address(grpc_gcp_Endpoint *msg, upb_strview value) {
106 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
108 UPB_INLINE void grpc_gcp_Endpoint_set_port(grpc_gcp_Endpoint *msg, int32_t value) {
109 *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
111 UPB_INLINE void grpc_gcp_Endpoint_set_protocol(grpc_gcp_Endpoint *msg, int32_t value) {
112 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
115 /* grpc.gcp.Identity */
117 UPB_INLINE grpc_gcp_Identity *grpc_gcp_Identity_new(upb_arena *arena) {
118 return (grpc_gcp_Identity *)_upb_msg_new(&grpc_gcp_Identity_msginit, arena);
120 UPB_INLINE grpc_gcp_Identity *grpc_gcp_Identity_parse(const char *buf, size_t size,
122 grpc_gcp_Identity *ret = grpc_gcp_Identity_new(arena);
123 if (!ret) return NULL;
124 if (!upb_decode(buf, size, ret, &grpc_gcp_Identity_msginit, arena)) return NULL;
127 UPB_INLINE grpc_gcp_Identity *grpc_gcp_Identity_parse_ex(const char *buf, size_t size,
128 const upb_extreg *extreg, int options,
130 grpc_gcp_Identity *ret = grpc_gcp_Identity_new(arena);
131 if (!ret) return NULL;
132 if (!_upb_decode(buf, size, ret, &grpc_gcp_Identity_msginit, extreg, options, arena)) {
137 UPB_INLINE char *grpc_gcp_Identity_serialize(const grpc_gcp_Identity *msg, upb_arena *arena, size_t *len) {
138 return upb_encode(msg, &grpc_gcp_Identity_msginit, arena, len);
142 grpc_gcp_Identity_identity_oneof_service_account = 1,
143 grpc_gcp_Identity_identity_oneof_hostname = 2,
144 grpc_gcp_Identity_identity_oneof_NOT_SET = 0
145 } grpc_gcp_Identity_identity_oneof_oneofcases;
146 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); }
148 UPB_INLINE bool grpc_gcp_Identity_has_service_account(const grpc_gcp_Identity *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 1; }
149 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(""))); }
150 UPB_INLINE bool grpc_gcp_Identity_has_hostname(const grpc_gcp_Identity *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 2; }
151 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(""))); }
152 UPB_INLINE bool grpc_gcp_Identity_has_attributes(const grpc_gcp_Identity *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
153 UPB_INLINE size_t grpc_gcp_Identity_attributes_size(const grpc_gcp_Identity *msg) {return _upb_msg_map_size(msg, UPB_SIZE(0, 0)); }
154 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); }
155 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); }
157 UPB_INLINE void grpc_gcp_Identity_set_service_account(grpc_gcp_Identity *msg, upb_strview value) {
158 UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(4, 8), value, UPB_SIZE(12, 24), 1);
160 UPB_INLINE void grpc_gcp_Identity_set_hostname(grpc_gcp_Identity *msg, upb_strview value) {
161 UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(4, 8), value, UPB_SIZE(12, 24), 2);
163 UPB_INLINE void grpc_gcp_Identity_attributes_clear(grpc_gcp_Identity *msg) { _upb_msg_map_clear(msg, UPB_SIZE(0, 0)); }
164 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); }
165 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); }
166 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); }
168 /* grpc.gcp.Identity.AttributesEntry */
170 UPB_INLINE upb_strview grpc_gcp_Identity_AttributesEntry_key(const grpc_gcp_Identity_AttributesEntry *msg) {
172 _upb_msg_map_key(msg, &ret, 0);
175 UPB_INLINE upb_strview grpc_gcp_Identity_AttributesEntry_value(const grpc_gcp_Identity_AttributesEntry *msg) {
177 _upb_msg_map_value(msg, &ret, 0);
181 UPB_INLINE void grpc_gcp_Identity_AttributesEntry_set_value(grpc_gcp_Identity_AttributesEntry *msg, upb_strview value) {
182 _upb_msg_map_set_value(msg, &value, 0);
185 /* grpc.gcp.StartClientHandshakeReq */
187 UPB_INLINE grpc_gcp_StartClientHandshakeReq *grpc_gcp_StartClientHandshakeReq_new(upb_arena *arena) {
188 return (grpc_gcp_StartClientHandshakeReq *)_upb_msg_new(&grpc_gcp_StartClientHandshakeReq_msginit, arena);
190 UPB_INLINE grpc_gcp_StartClientHandshakeReq *grpc_gcp_StartClientHandshakeReq_parse(const char *buf, size_t size,
192 grpc_gcp_StartClientHandshakeReq *ret = grpc_gcp_StartClientHandshakeReq_new(arena);
193 if (!ret) return NULL;
194 if (!upb_decode(buf, size, ret, &grpc_gcp_StartClientHandshakeReq_msginit, arena)) return NULL;
197 UPB_INLINE grpc_gcp_StartClientHandshakeReq *grpc_gcp_StartClientHandshakeReq_parse_ex(const char *buf, size_t size,
198 const upb_extreg *extreg, int options,
200 grpc_gcp_StartClientHandshakeReq *ret = grpc_gcp_StartClientHandshakeReq_new(arena);
201 if (!ret) return NULL;
202 if (!_upb_decode(buf, size, ret, &grpc_gcp_StartClientHandshakeReq_msginit, extreg, options, arena)) {
207 UPB_INLINE char *grpc_gcp_StartClientHandshakeReq_serialize(const grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena, size_t *len) {
208 return upb_encode(msg, &grpc_gcp_StartClientHandshakeReq_msginit, arena, len);
211 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); }
212 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); }
213 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); }
214 UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_has_target_identities(const grpc_gcp_StartClientHandshakeReq *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 80)); }
215 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); }
216 UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_has_local_identity(const grpc_gcp_StartClientHandshakeReq *msg) { return _upb_hasbit(msg, 1); }
217 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*); }
218 UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_has_local_endpoint(const grpc_gcp_StartClientHandshakeReq *msg) { return _upb_hasbit(msg, 2); }
219 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*); }
220 UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_has_remote_endpoint(const grpc_gcp_StartClientHandshakeReq *msg) { return _upb_hasbit(msg, 3); }
221 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*); }
222 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); }
223 UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_has_rpc_versions(const grpc_gcp_StartClientHandshakeReq *msg) { return _upb_hasbit(msg, 4); }
224 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*); }
225 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); }
227 UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_handshake_security_protocol(grpc_gcp_StartClientHandshakeReq *msg, int32_t value) {
228 *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
230 UPB_INLINE upb_strview* grpc_gcp_StartClientHandshakeReq_mutable_application_protocols(grpc_gcp_StartClientHandshakeReq *msg, size_t *len) {
231 return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 64), len);
233 UPB_INLINE upb_strview* grpc_gcp_StartClientHandshakeReq_resize_application_protocols(grpc_gcp_StartClientHandshakeReq *msg, size_t len, upb_arena *arena) {
234 return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(36, 64), len, UPB_SIZE(3, 4), arena);
236 UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_add_application_protocols(grpc_gcp_StartClientHandshakeReq *msg, upb_strview val, upb_arena *arena) {
237 return _upb_array_append_accessor2(msg, UPB_SIZE(36, 64), UPB_SIZE(3, 4), &val,
240 UPB_INLINE upb_strview* grpc_gcp_StartClientHandshakeReq_mutable_record_protocols(grpc_gcp_StartClientHandshakeReq *msg, size_t *len) {
241 return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 72), len);
243 UPB_INLINE upb_strview* grpc_gcp_StartClientHandshakeReq_resize_record_protocols(grpc_gcp_StartClientHandshakeReq *msg, size_t len, upb_arena *arena) {
244 return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(40, 72), len, UPB_SIZE(3, 4), arena);
246 UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_add_record_protocols(grpc_gcp_StartClientHandshakeReq *msg, upb_strview val, upb_arena *arena) {
247 return _upb_array_append_accessor2(msg, UPB_SIZE(40, 72), UPB_SIZE(3, 4), &val,
250 UPB_INLINE grpc_gcp_Identity** grpc_gcp_StartClientHandshakeReq_mutable_target_identities(grpc_gcp_StartClientHandshakeReq *msg, size_t *len) {
251 return (grpc_gcp_Identity**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 80), len);
253 UPB_INLINE grpc_gcp_Identity** grpc_gcp_StartClientHandshakeReq_resize_target_identities(grpc_gcp_StartClientHandshakeReq *msg, size_t len, upb_arena *arena) {
254 return (grpc_gcp_Identity**)_upb_array_resize_accessor2(msg, UPB_SIZE(44, 80), len, UPB_SIZE(2, 3), arena);
256 UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_StartClientHandshakeReq_add_target_identities(grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena) {
257 struct grpc_gcp_Identity* sub = (struct grpc_gcp_Identity*)_upb_msg_new(&grpc_gcp_Identity_msginit, arena);
258 bool ok = _upb_array_append_accessor2(
259 msg, UPB_SIZE(44, 80), UPB_SIZE(2, 3), &sub, arena);
260 if (!ok) return NULL;
263 UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_local_identity(grpc_gcp_StartClientHandshakeReq *msg, grpc_gcp_Identity* value) {
265 *UPB_PTR_AT(msg, UPB_SIZE(20, 32), grpc_gcp_Identity*) = value;
267 UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_StartClientHandshakeReq_mutable_local_identity(grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena) {
268 struct grpc_gcp_Identity* sub = (struct grpc_gcp_Identity*)grpc_gcp_StartClientHandshakeReq_local_identity(msg);
270 sub = (struct grpc_gcp_Identity*)_upb_msg_new(&grpc_gcp_Identity_msginit, arena);
271 if (!sub) return NULL;
272 grpc_gcp_StartClientHandshakeReq_set_local_identity(msg, sub);
276 UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_local_endpoint(grpc_gcp_StartClientHandshakeReq *msg, grpc_gcp_Endpoint* value) {
278 *UPB_PTR_AT(msg, UPB_SIZE(24, 40), grpc_gcp_Endpoint*) = value;
280 UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartClientHandshakeReq_mutable_local_endpoint(grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena) {
281 struct grpc_gcp_Endpoint* sub = (struct grpc_gcp_Endpoint*)grpc_gcp_StartClientHandshakeReq_local_endpoint(msg);
283 sub = (struct grpc_gcp_Endpoint*)_upb_msg_new(&grpc_gcp_Endpoint_msginit, arena);
284 if (!sub) return NULL;
285 grpc_gcp_StartClientHandshakeReq_set_local_endpoint(msg, sub);
289 UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_remote_endpoint(grpc_gcp_StartClientHandshakeReq *msg, grpc_gcp_Endpoint* value) {
291 *UPB_PTR_AT(msg, UPB_SIZE(28, 48), grpc_gcp_Endpoint*) = value;
293 UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartClientHandshakeReq_mutable_remote_endpoint(grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena) {
294 struct grpc_gcp_Endpoint* sub = (struct grpc_gcp_Endpoint*)grpc_gcp_StartClientHandshakeReq_remote_endpoint(msg);
296 sub = (struct grpc_gcp_Endpoint*)_upb_msg_new(&grpc_gcp_Endpoint_msginit, arena);
297 if (!sub) return NULL;
298 grpc_gcp_StartClientHandshakeReq_set_remote_endpoint(msg, sub);
302 UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_target_name(grpc_gcp_StartClientHandshakeReq *msg, upb_strview value) {
303 *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview) = value;
305 UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_rpc_versions(grpc_gcp_StartClientHandshakeReq *msg, struct grpc_gcp_RpcProtocolVersions* value) {
307 *UPB_PTR_AT(msg, UPB_SIZE(32, 56), struct grpc_gcp_RpcProtocolVersions*) = value;
309 UPB_INLINE struct grpc_gcp_RpcProtocolVersions* grpc_gcp_StartClientHandshakeReq_mutable_rpc_versions(grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena) {
310 struct grpc_gcp_RpcProtocolVersions* sub = (struct grpc_gcp_RpcProtocolVersions*)grpc_gcp_StartClientHandshakeReq_rpc_versions(msg);
312 sub = (struct grpc_gcp_RpcProtocolVersions*)_upb_msg_new(&grpc_gcp_RpcProtocolVersions_msginit, arena);
313 if (!sub) return NULL;
314 grpc_gcp_StartClientHandshakeReq_set_rpc_versions(msg, sub);
318 UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_max_frame_size(grpc_gcp_StartClientHandshakeReq *msg, uint32_t value) {
319 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t) = value;
322 /* grpc.gcp.ServerHandshakeParameters */
324 UPB_INLINE grpc_gcp_ServerHandshakeParameters *grpc_gcp_ServerHandshakeParameters_new(upb_arena *arena) {
325 return (grpc_gcp_ServerHandshakeParameters *)_upb_msg_new(&grpc_gcp_ServerHandshakeParameters_msginit, arena);
327 UPB_INLINE grpc_gcp_ServerHandshakeParameters *grpc_gcp_ServerHandshakeParameters_parse(const char *buf, size_t size,
329 grpc_gcp_ServerHandshakeParameters *ret = grpc_gcp_ServerHandshakeParameters_new(arena);
330 if (!ret) return NULL;
331 if (!upb_decode(buf, size, ret, &grpc_gcp_ServerHandshakeParameters_msginit, arena)) return NULL;
334 UPB_INLINE grpc_gcp_ServerHandshakeParameters *grpc_gcp_ServerHandshakeParameters_parse_ex(const char *buf, size_t size,
335 const upb_extreg *extreg, int options,
337 grpc_gcp_ServerHandshakeParameters *ret = grpc_gcp_ServerHandshakeParameters_new(arena);
338 if (!ret) return NULL;
339 if (!_upb_decode(buf, size, ret, &grpc_gcp_ServerHandshakeParameters_msginit, extreg, options, arena)) {
344 UPB_INLINE char *grpc_gcp_ServerHandshakeParameters_serialize(const grpc_gcp_ServerHandshakeParameters *msg, upb_arena *arena, size_t *len) {
345 return upb_encode(msg, &grpc_gcp_ServerHandshakeParameters_msginit, arena, len);
348 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); }
349 UPB_INLINE bool grpc_gcp_ServerHandshakeParameters_has_local_identities(const grpc_gcp_ServerHandshakeParameters *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
350 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); }
352 UPB_INLINE upb_strview* grpc_gcp_ServerHandshakeParameters_mutable_record_protocols(grpc_gcp_ServerHandshakeParameters *msg, size_t *len) {
353 return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
355 UPB_INLINE upb_strview* grpc_gcp_ServerHandshakeParameters_resize_record_protocols(grpc_gcp_ServerHandshakeParameters *msg, size_t len, upb_arena *arena) {
356 return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(3, 4), arena);
358 UPB_INLINE bool grpc_gcp_ServerHandshakeParameters_add_record_protocols(grpc_gcp_ServerHandshakeParameters *msg, upb_strview val, upb_arena *arena) {
359 return _upb_array_append_accessor2(msg, UPB_SIZE(0, 0), UPB_SIZE(3, 4), &val,
362 UPB_INLINE grpc_gcp_Identity** grpc_gcp_ServerHandshakeParameters_mutable_local_identities(grpc_gcp_ServerHandshakeParameters *msg, size_t *len) {
363 return (grpc_gcp_Identity**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
365 UPB_INLINE grpc_gcp_Identity** grpc_gcp_ServerHandshakeParameters_resize_local_identities(grpc_gcp_ServerHandshakeParameters *msg, size_t len, upb_arena *arena) {
366 return (grpc_gcp_Identity**)_upb_array_resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena);
368 UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_ServerHandshakeParameters_add_local_identities(grpc_gcp_ServerHandshakeParameters *msg, upb_arena *arena) {
369 struct grpc_gcp_Identity* sub = (struct grpc_gcp_Identity*)_upb_msg_new(&grpc_gcp_Identity_msginit, arena);
370 bool ok = _upb_array_append_accessor2(
371 msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena);
372 if (!ok) return NULL;
376 /* grpc.gcp.StartServerHandshakeReq */
378 UPB_INLINE grpc_gcp_StartServerHandshakeReq *grpc_gcp_StartServerHandshakeReq_new(upb_arena *arena) {
379 return (grpc_gcp_StartServerHandshakeReq *)_upb_msg_new(&grpc_gcp_StartServerHandshakeReq_msginit, arena);
381 UPB_INLINE grpc_gcp_StartServerHandshakeReq *grpc_gcp_StartServerHandshakeReq_parse(const char *buf, size_t size,
383 grpc_gcp_StartServerHandshakeReq *ret = grpc_gcp_StartServerHandshakeReq_new(arena);
384 if (!ret) return NULL;
385 if (!upb_decode(buf, size, ret, &grpc_gcp_StartServerHandshakeReq_msginit, arena)) return NULL;
388 UPB_INLINE grpc_gcp_StartServerHandshakeReq *grpc_gcp_StartServerHandshakeReq_parse_ex(const char *buf, size_t size,
389 const upb_extreg *extreg, int options,
391 grpc_gcp_StartServerHandshakeReq *ret = grpc_gcp_StartServerHandshakeReq_new(arena);
392 if (!ret) return NULL;
393 if (!_upb_decode(buf, size, ret, &grpc_gcp_StartServerHandshakeReq_msginit, extreg, options, arena)) {
398 UPB_INLINE char *grpc_gcp_StartServerHandshakeReq_serialize(const grpc_gcp_StartServerHandshakeReq *msg, upb_arena *arena, size_t *len) {
399 return upb_encode(msg, &grpc_gcp_StartServerHandshakeReq_msginit, arena, len);
402 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); }
403 UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_has_handshake_parameters(const grpc_gcp_StartServerHandshakeReq *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 56)); }
404 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)); }
405 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)); }
406 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); }
407 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); }
408 UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_has_local_endpoint(const grpc_gcp_StartServerHandshakeReq *msg) { return _upb_hasbit(msg, 1); }
409 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*); }
410 UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_has_remote_endpoint(const grpc_gcp_StartServerHandshakeReq *msg) { return _upb_hasbit(msg, 2); }
411 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*); }
412 UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_has_rpc_versions(const grpc_gcp_StartServerHandshakeReq *msg) { return _upb_hasbit(msg, 3); }
413 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*); }
414 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); }
416 UPB_INLINE upb_strview* grpc_gcp_StartServerHandshakeReq_mutable_application_protocols(grpc_gcp_StartServerHandshakeReq *msg, size_t *len) {
417 return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 48), len);
419 UPB_INLINE upb_strview* grpc_gcp_StartServerHandshakeReq_resize_application_protocols(grpc_gcp_StartServerHandshakeReq *msg, size_t len, upb_arena *arena) {
420 return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 48), len, UPB_SIZE(3, 4), arena);
422 UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_add_application_protocols(grpc_gcp_StartServerHandshakeReq *msg, upb_strview val, upb_arena *arena) {
423 return _upb_array_append_accessor2(msg, UPB_SIZE(28, 48), UPB_SIZE(3, 4), &val,
426 UPB_INLINE void grpc_gcp_StartServerHandshakeReq_handshake_parameters_clear(grpc_gcp_StartServerHandshakeReq *msg) { _upb_msg_map_clear(msg, UPB_SIZE(32, 56)); }
427 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); }
428 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)); }
429 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); }
430 UPB_INLINE void grpc_gcp_StartServerHandshakeReq_set_in_bytes(grpc_gcp_StartServerHandshakeReq *msg, upb_strview value) {
431 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
433 UPB_INLINE void grpc_gcp_StartServerHandshakeReq_set_local_endpoint(grpc_gcp_StartServerHandshakeReq *msg, grpc_gcp_Endpoint* value) {
435 *UPB_PTR_AT(msg, UPB_SIZE(16, 24), grpc_gcp_Endpoint*) = value;
437 UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_mutable_local_endpoint(grpc_gcp_StartServerHandshakeReq *msg, upb_arena *arena) {
438 struct grpc_gcp_Endpoint* sub = (struct grpc_gcp_Endpoint*)grpc_gcp_StartServerHandshakeReq_local_endpoint(msg);
440 sub = (struct grpc_gcp_Endpoint*)_upb_msg_new(&grpc_gcp_Endpoint_msginit, arena);
441 if (!sub) return NULL;
442 grpc_gcp_StartServerHandshakeReq_set_local_endpoint(msg, sub);
446 UPB_INLINE void grpc_gcp_StartServerHandshakeReq_set_remote_endpoint(grpc_gcp_StartServerHandshakeReq *msg, grpc_gcp_Endpoint* value) {
448 *UPB_PTR_AT(msg, UPB_SIZE(20, 32), grpc_gcp_Endpoint*) = value;
450 UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_mutable_remote_endpoint(grpc_gcp_StartServerHandshakeReq *msg, upb_arena *arena) {
451 struct grpc_gcp_Endpoint* sub = (struct grpc_gcp_Endpoint*)grpc_gcp_StartServerHandshakeReq_remote_endpoint(msg);
453 sub = (struct grpc_gcp_Endpoint*)_upb_msg_new(&grpc_gcp_Endpoint_msginit, arena);
454 if (!sub) return NULL;
455 grpc_gcp_StartServerHandshakeReq_set_remote_endpoint(msg, sub);
459 UPB_INLINE void grpc_gcp_StartServerHandshakeReq_set_rpc_versions(grpc_gcp_StartServerHandshakeReq *msg, struct grpc_gcp_RpcProtocolVersions* value) {
461 *UPB_PTR_AT(msg, UPB_SIZE(24, 40), struct grpc_gcp_RpcProtocolVersions*) = value;
463 UPB_INLINE struct grpc_gcp_RpcProtocolVersions* grpc_gcp_StartServerHandshakeReq_mutable_rpc_versions(grpc_gcp_StartServerHandshakeReq *msg, upb_arena *arena) {
464 struct grpc_gcp_RpcProtocolVersions* sub = (struct grpc_gcp_RpcProtocolVersions*)grpc_gcp_StartServerHandshakeReq_rpc_versions(msg);
466 sub = (struct grpc_gcp_RpcProtocolVersions*)_upb_msg_new(&grpc_gcp_RpcProtocolVersions_msginit, arena);
467 if (!sub) return NULL;
468 grpc_gcp_StartServerHandshakeReq_set_rpc_versions(msg, sub);
472 UPB_INLINE void grpc_gcp_StartServerHandshakeReq_set_max_frame_size(grpc_gcp_StartServerHandshakeReq *msg, uint32_t value) {
473 *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t) = value;
476 /* grpc.gcp.StartServerHandshakeReq.HandshakeParametersEntry */
478 UPB_INLINE int32_t grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_key(const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry *msg) {
480 _upb_msg_map_key(msg, &ret, sizeof(ret));
483 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)); }
484 UPB_INLINE const grpc_gcp_ServerHandshakeParameters* grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_value(const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry *msg) {
485 grpc_gcp_ServerHandshakeParameters* ret;
486 _upb_msg_map_value(msg, &ret, sizeof(ret));
490 UPB_INLINE void grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_set_value(grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry *msg, grpc_gcp_ServerHandshakeParameters* value) {
491 _upb_msg_map_set_value(msg, &value, sizeof(grpc_gcp_ServerHandshakeParameters*));
494 /* grpc.gcp.NextHandshakeMessageReq */
496 UPB_INLINE grpc_gcp_NextHandshakeMessageReq *grpc_gcp_NextHandshakeMessageReq_new(upb_arena *arena) {
497 return (grpc_gcp_NextHandshakeMessageReq *)_upb_msg_new(&grpc_gcp_NextHandshakeMessageReq_msginit, arena);
499 UPB_INLINE grpc_gcp_NextHandshakeMessageReq *grpc_gcp_NextHandshakeMessageReq_parse(const char *buf, size_t size,
501 grpc_gcp_NextHandshakeMessageReq *ret = grpc_gcp_NextHandshakeMessageReq_new(arena);
502 if (!ret) return NULL;
503 if (!upb_decode(buf, size, ret, &grpc_gcp_NextHandshakeMessageReq_msginit, arena)) return NULL;
506 UPB_INLINE grpc_gcp_NextHandshakeMessageReq *grpc_gcp_NextHandshakeMessageReq_parse_ex(const char *buf, size_t size,
507 const upb_extreg *extreg, int options,
509 grpc_gcp_NextHandshakeMessageReq *ret = grpc_gcp_NextHandshakeMessageReq_new(arena);
510 if (!ret) return NULL;
511 if (!_upb_decode(buf, size, ret, &grpc_gcp_NextHandshakeMessageReq_msginit, extreg, options, arena)) {
516 UPB_INLINE char *grpc_gcp_NextHandshakeMessageReq_serialize(const grpc_gcp_NextHandshakeMessageReq *msg, upb_arena *arena, size_t *len) {
517 return upb_encode(msg, &grpc_gcp_NextHandshakeMessageReq_msginit, arena, len);
520 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); }
522 UPB_INLINE void grpc_gcp_NextHandshakeMessageReq_set_in_bytes(grpc_gcp_NextHandshakeMessageReq *msg, upb_strview value) {
523 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
526 /* grpc.gcp.HandshakerReq */
528 UPB_INLINE grpc_gcp_HandshakerReq *grpc_gcp_HandshakerReq_new(upb_arena *arena) {
529 return (grpc_gcp_HandshakerReq *)_upb_msg_new(&grpc_gcp_HandshakerReq_msginit, arena);
531 UPB_INLINE grpc_gcp_HandshakerReq *grpc_gcp_HandshakerReq_parse(const char *buf, size_t size,
533 grpc_gcp_HandshakerReq *ret = grpc_gcp_HandshakerReq_new(arena);
534 if (!ret) return NULL;
535 if (!upb_decode(buf, size, ret, &grpc_gcp_HandshakerReq_msginit, arena)) return NULL;
538 UPB_INLINE grpc_gcp_HandshakerReq *grpc_gcp_HandshakerReq_parse_ex(const char *buf, size_t size,
539 const upb_extreg *extreg, int options,
541 grpc_gcp_HandshakerReq *ret = grpc_gcp_HandshakerReq_new(arena);
542 if (!ret) return NULL;
543 if (!_upb_decode(buf, size, ret, &grpc_gcp_HandshakerReq_msginit, extreg, options, arena)) {
548 UPB_INLINE char *grpc_gcp_HandshakerReq_serialize(const grpc_gcp_HandshakerReq *msg, upb_arena *arena, size_t *len) {
549 return upb_encode(msg, &grpc_gcp_HandshakerReq_msginit, arena, len);
553 grpc_gcp_HandshakerReq_req_oneof_client_start = 1,
554 grpc_gcp_HandshakerReq_req_oneof_server_start = 2,
555 grpc_gcp_HandshakerReq_req_oneof_next = 3,
556 grpc_gcp_HandshakerReq_req_oneof_NOT_SET = 0
557 } grpc_gcp_HandshakerReq_req_oneof_oneofcases;
558 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); }
560 UPB_INLINE bool grpc_gcp_HandshakerReq_has_client_start(const grpc_gcp_HandshakerReq *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; }
561 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); }
562 UPB_INLINE bool grpc_gcp_HandshakerReq_has_server_start(const grpc_gcp_HandshakerReq *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 2; }
563 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); }
564 UPB_INLINE bool grpc_gcp_HandshakerReq_has_next(const grpc_gcp_HandshakerReq *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 3; }
565 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); }
567 UPB_INLINE void grpc_gcp_HandshakerReq_set_client_start(grpc_gcp_HandshakerReq *msg, grpc_gcp_StartClientHandshakeReq* value) {
568 UPB_WRITE_ONEOF(msg, grpc_gcp_StartClientHandshakeReq*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1);
570 UPB_INLINE struct grpc_gcp_StartClientHandshakeReq* grpc_gcp_HandshakerReq_mutable_client_start(grpc_gcp_HandshakerReq *msg, upb_arena *arena) {
571 struct grpc_gcp_StartClientHandshakeReq* sub = (struct grpc_gcp_StartClientHandshakeReq*)grpc_gcp_HandshakerReq_client_start(msg);
573 sub = (struct grpc_gcp_StartClientHandshakeReq*)_upb_msg_new(&grpc_gcp_StartClientHandshakeReq_msginit, arena);
574 if (!sub) return NULL;
575 grpc_gcp_HandshakerReq_set_client_start(msg, sub);
579 UPB_INLINE void grpc_gcp_HandshakerReq_set_server_start(grpc_gcp_HandshakerReq *msg, grpc_gcp_StartServerHandshakeReq* value) {
580 UPB_WRITE_ONEOF(msg, grpc_gcp_StartServerHandshakeReq*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2);
582 UPB_INLINE struct grpc_gcp_StartServerHandshakeReq* grpc_gcp_HandshakerReq_mutable_server_start(grpc_gcp_HandshakerReq *msg, upb_arena *arena) {
583 struct grpc_gcp_StartServerHandshakeReq* sub = (struct grpc_gcp_StartServerHandshakeReq*)grpc_gcp_HandshakerReq_server_start(msg);
585 sub = (struct grpc_gcp_StartServerHandshakeReq*)_upb_msg_new(&grpc_gcp_StartServerHandshakeReq_msginit, arena);
586 if (!sub) return NULL;
587 grpc_gcp_HandshakerReq_set_server_start(msg, sub);
591 UPB_INLINE void grpc_gcp_HandshakerReq_set_next(grpc_gcp_HandshakerReq *msg, grpc_gcp_NextHandshakeMessageReq* value) {
592 UPB_WRITE_ONEOF(msg, grpc_gcp_NextHandshakeMessageReq*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 3);
594 UPB_INLINE struct grpc_gcp_NextHandshakeMessageReq* grpc_gcp_HandshakerReq_mutable_next(grpc_gcp_HandshakerReq *msg, upb_arena *arena) {
595 struct grpc_gcp_NextHandshakeMessageReq* sub = (struct grpc_gcp_NextHandshakeMessageReq*)grpc_gcp_HandshakerReq_next(msg);
597 sub = (struct grpc_gcp_NextHandshakeMessageReq*)_upb_msg_new(&grpc_gcp_NextHandshakeMessageReq_msginit, arena);
598 if (!sub) return NULL;
599 grpc_gcp_HandshakerReq_set_next(msg, sub);
604 /* grpc.gcp.HandshakerResult */
606 UPB_INLINE grpc_gcp_HandshakerResult *grpc_gcp_HandshakerResult_new(upb_arena *arena) {
607 return (grpc_gcp_HandshakerResult *)_upb_msg_new(&grpc_gcp_HandshakerResult_msginit, arena);
609 UPB_INLINE grpc_gcp_HandshakerResult *grpc_gcp_HandshakerResult_parse(const char *buf, size_t size,
611 grpc_gcp_HandshakerResult *ret = grpc_gcp_HandshakerResult_new(arena);
612 if (!ret) return NULL;
613 if (!upb_decode(buf, size, ret, &grpc_gcp_HandshakerResult_msginit, arena)) return NULL;
616 UPB_INLINE grpc_gcp_HandshakerResult *grpc_gcp_HandshakerResult_parse_ex(const char *buf, size_t size,
617 const upb_extreg *extreg, int options,
619 grpc_gcp_HandshakerResult *ret = grpc_gcp_HandshakerResult_new(arena);
620 if (!ret) return NULL;
621 if (!_upb_decode(buf, size, ret, &grpc_gcp_HandshakerResult_msginit, extreg, options, arena)) {
626 UPB_INLINE char *grpc_gcp_HandshakerResult_serialize(const grpc_gcp_HandshakerResult *msg, upb_arena *arena, size_t *len) {
627 return upb_encode(msg, &grpc_gcp_HandshakerResult_msginit, arena, len);
630 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); }
631 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); }
632 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); }
633 UPB_INLINE bool grpc_gcp_HandshakerResult_has_peer_identity(const grpc_gcp_HandshakerResult *msg) { return _upb_hasbit(msg, 1); }
634 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*); }
635 UPB_INLINE bool grpc_gcp_HandshakerResult_has_local_identity(const grpc_gcp_HandshakerResult *msg) { return _upb_hasbit(msg, 2); }
636 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*); }
637 UPB_INLINE bool grpc_gcp_HandshakerResult_keep_channel_open(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); }
638 UPB_INLINE bool grpc_gcp_HandshakerResult_has_peer_rpc_versions(const grpc_gcp_HandshakerResult *msg) { return _upb_hasbit(msg, 3); }
639 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*); }
640 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); }
642 UPB_INLINE void grpc_gcp_HandshakerResult_set_application_protocol(grpc_gcp_HandshakerResult *msg, upb_strview value) {
643 *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview) = value;
645 UPB_INLINE void grpc_gcp_HandshakerResult_set_record_protocol(grpc_gcp_HandshakerResult *msg, upb_strview value) {
646 *UPB_PTR_AT(msg, UPB_SIZE(20, 32), upb_strview) = value;
648 UPB_INLINE void grpc_gcp_HandshakerResult_set_key_data(grpc_gcp_HandshakerResult *msg, upb_strview value) {
649 *UPB_PTR_AT(msg, UPB_SIZE(28, 48), upb_strview) = value;
651 UPB_INLINE void grpc_gcp_HandshakerResult_set_peer_identity(grpc_gcp_HandshakerResult *msg, grpc_gcp_Identity* value) {
653 *UPB_PTR_AT(msg, UPB_SIZE(36, 64), grpc_gcp_Identity*) = value;
655 UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_HandshakerResult_mutable_peer_identity(grpc_gcp_HandshakerResult *msg, upb_arena *arena) {
656 struct grpc_gcp_Identity* sub = (struct grpc_gcp_Identity*)grpc_gcp_HandshakerResult_peer_identity(msg);
658 sub = (struct grpc_gcp_Identity*)_upb_msg_new(&grpc_gcp_Identity_msginit, arena);
659 if (!sub) return NULL;
660 grpc_gcp_HandshakerResult_set_peer_identity(msg, sub);
664 UPB_INLINE void grpc_gcp_HandshakerResult_set_local_identity(grpc_gcp_HandshakerResult *msg, grpc_gcp_Identity* value) {
666 *UPB_PTR_AT(msg, UPB_SIZE(40, 72), grpc_gcp_Identity*) = value;
668 UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_HandshakerResult_mutable_local_identity(grpc_gcp_HandshakerResult *msg, upb_arena *arena) {
669 struct grpc_gcp_Identity* sub = (struct grpc_gcp_Identity*)grpc_gcp_HandshakerResult_local_identity(msg);
671 sub = (struct grpc_gcp_Identity*)_upb_msg_new(&grpc_gcp_Identity_msginit, arena);
672 if (!sub) return NULL;
673 grpc_gcp_HandshakerResult_set_local_identity(msg, sub);
677 UPB_INLINE void grpc_gcp_HandshakerResult_set_keep_channel_open(grpc_gcp_HandshakerResult *msg, bool value) {
678 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value;
680 UPB_INLINE void grpc_gcp_HandshakerResult_set_peer_rpc_versions(grpc_gcp_HandshakerResult *msg, struct grpc_gcp_RpcProtocolVersions* value) {
682 *UPB_PTR_AT(msg, UPB_SIZE(44, 80), struct grpc_gcp_RpcProtocolVersions*) = value;
684 UPB_INLINE struct grpc_gcp_RpcProtocolVersions* grpc_gcp_HandshakerResult_mutable_peer_rpc_versions(grpc_gcp_HandshakerResult *msg, upb_arena *arena) {
685 struct grpc_gcp_RpcProtocolVersions* sub = (struct grpc_gcp_RpcProtocolVersions*)grpc_gcp_HandshakerResult_peer_rpc_versions(msg);
687 sub = (struct grpc_gcp_RpcProtocolVersions*)_upb_msg_new(&grpc_gcp_RpcProtocolVersions_msginit, arena);
688 if (!sub) return NULL;
689 grpc_gcp_HandshakerResult_set_peer_rpc_versions(msg, sub);
693 UPB_INLINE void grpc_gcp_HandshakerResult_set_max_frame_size(grpc_gcp_HandshakerResult *msg, uint32_t value) {
694 *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t) = value;
697 /* grpc.gcp.HandshakerStatus */
699 UPB_INLINE grpc_gcp_HandshakerStatus *grpc_gcp_HandshakerStatus_new(upb_arena *arena) {
700 return (grpc_gcp_HandshakerStatus *)_upb_msg_new(&grpc_gcp_HandshakerStatus_msginit, arena);
702 UPB_INLINE grpc_gcp_HandshakerStatus *grpc_gcp_HandshakerStatus_parse(const char *buf, size_t size,
704 grpc_gcp_HandshakerStatus *ret = grpc_gcp_HandshakerStatus_new(arena);
705 if (!ret) return NULL;
706 if (!upb_decode(buf, size, ret, &grpc_gcp_HandshakerStatus_msginit, arena)) return NULL;
709 UPB_INLINE grpc_gcp_HandshakerStatus *grpc_gcp_HandshakerStatus_parse_ex(const char *buf, size_t size,
710 const upb_extreg *extreg, int options,
712 grpc_gcp_HandshakerStatus *ret = grpc_gcp_HandshakerStatus_new(arena);
713 if (!ret) return NULL;
714 if (!_upb_decode(buf, size, ret, &grpc_gcp_HandshakerStatus_msginit, extreg, options, arena)) {
719 UPB_INLINE char *grpc_gcp_HandshakerStatus_serialize(const grpc_gcp_HandshakerStatus *msg, upb_arena *arena, size_t *len) {
720 return upb_encode(msg, &grpc_gcp_HandshakerStatus_msginit, arena, len);
723 UPB_INLINE uint32_t grpc_gcp_HandshakerStatus_code(const grpc_gcp_HandshakerStatus *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); }
724 UPB_INLINE upb_strview grpc_gcp_HandshakerStatus_details(const grpc_gcp_HandshakerStatus *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
726 UPB_INLINE void grpc_gcp_HandshakerStatus_set_code(grpc_gcp_HandshakerStatus *msg, uint32_t value) {
727 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value;
729 UPB_INLINE void grpc_gcp_HandshakerStatus_set_details(grpc_gcp_HandshakerStatus *msg, upb_strview value) {
730 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
733 /* grpc.gcp.HandshakerResp */
735 UPB_INLINE grpc_gcp_HandshakerResp *grpc_gcp_HandshakerResp_new(upb_arena *arena) {
736 return (grpc_gcp_HandshakerResp *)_upb_msg_new(&grpc_gcp_HandshakerResp_msginit, arena);
738 UPB_INLINE grpc_gcp_HandshakerResp *grpc_gcp_HandshakerResp_parse(const char *buf, size_t size,
740 grpc_gcp_HandshakerResp *ret = grpc_gcp_HandshakerResp_new(arena);
741 if (!ret) return NULL;
742 if (!upb_decode(buf, size, ret, &grpc_gcp_HandshakerResp_msginit, arena)) return NULL;
745 UPB_INLINE grpc_gcp_HandshakerResp *grpc_gcp_HandshakerResp_parse_ex(const char *buf, size_t size,
746 const upb_extreg *extreg, int options,
748 grpc_gcp_HandshakerResp *ret = grpc_gcp_HandshakerResp_new(arena);
749 if (!ret) return NULL;
750 if (!_upb_decode(buf, size, ret, &grpc_gcp_HandshakerResp_msginit, extreg, options, arena)) {
755 UPB_INLINE char *grpc_gcp_HandshakerResp_serialize(const grpc_gcp_HandshakerResp *msg, upb_arena *arena, size_t *len) {
756 return upb_encode(msg, &grpc_gcp_HandshakerResp_msginit, arena, len);
759 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); }
760 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); }
761 UPB_INLINE bool grpc_gcp_HandshakerResp_has_result(const grpc_gcp_HandshakerResp *msg) { return _upb_hasbit(msg, 1); }
762 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*); }
763 UPB_INLINE bool grpc_gcp_HandshakerResp_has_status(const grpc_gcp_HandshakerResp *msg) { return _upb_hasbit(msg, 2); }
764 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*); }
766 UPB_INLINE void grpc_gcp_HandshakerResp_set_out_frames(grpc_gcp_HandshakerResp *msg, upb_strview value) {
767 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
769 UPB_INLINE void grpc_gcp_HandshakerResp_set_bytes_consumed(grpc_gcp_HandshakerResp *msg, uint32_t value) {
770 *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t) = value;
772 UPB_INLINE void grpc_gcp_HandshakerResp_set_result(grpc_gcp_HandshakerResp *msg, grpc_gcp_HandshakerResult* value) {
774 *UPB_PTR_AT(msg, UPB_SIZE(16, 24), grpc_gcp_HandshakerResult*) = value;
776 UPB_INLINE struct grpc_gcp_HandshakerResult* grpc_gcp_HandshakerResp_mutable_result(grpc_gcp_HandshakerResp *msg, upb_arena *arena) {
777 struct grpc_gcp_HandshakerResult* sub = (struct grpc_gcp_HandshakerResult*)grpc_gcp_HandshakerResp_result(msg);
779 sub = (struct grpc_gcp_HandshakerResult*)_upb_msg_new(&grpc_gcp_HandshakerResult_msginit, arena);
780 if (!sub) return NULL;
781 grpc_gcp_HandshakerResp_set_result(msg, sub);
785 UPB_INLINE void grpc_gcp_HandshakerResp_set_status(grpc_gcp_HandshakerResp *msg, grpc_gcp_HandshakerStatus* value) {
787 *UPB_PTR_AT(msg, UPB_SIZE(20, 32), grpc_gcp_HandshakerStatus*) = value;
789 UPB_INLINE struct grpc_gcp_HandshakerStatus* grpc_gcp_HandshakerResp_mutable_status(grpc_gcp_HandshakerResp *msg, upb_arena *arena) {
790 struct grpc_gcp_HandshakerStatus* sub = (struct grpc_gcp_HandshakerStatus*)grpc_gcp_HandshakerResp_status(msg);
792 sub = (struct grpc_gcp_HandshakerStatus*)_upb_msg_new(&grpc_gcp_HandshakerStatus_msginit, arena);
793 if (!sub) return NULL;
794 grpc_gcp_HandshakerResp_set_status(msg, sub);
803 #include "upb/port_undef.inc"
805 #endif /* SRC_PROTO_GRPC_GCP_HANDSHAKER_PROTO_UPB_H_ */