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