Imported Upstream version 1.41.0
[platform/upstream/grpc.git] / src / core / ext / upb-generated / src / proto / grpc / lb / v1 / load_balancer.upb.h
1 /* This file was generated by upbc (the upb compiler) from the input
2  * file:
3  *
4  *     src/proto/grpc/lb/v1/load_balancer.proto
5  *
6  * Do not edit -- your changes will be discarded when the file is
7  * regenerated. */
8
9 #ifndef SRC_PROTO_GRPC_LB_V1_LOAD_BALANCER_PROTO_UPB_H_
10 #define SRC_PROTO_GRPC_LB_V1_LOAD_BALANCER_PROTO_UPB_H_
11
12 #include "upb/msg_internal.h"
13 #include "upb/decode.h"
14 #include "upb/decode_fast.h"
15 #include "upb/encode.h"
16
17 #include "upb/port_def.inc"
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23 struct grpc_lb_v1_LoadBalanceRequest;
24 struct grpc_lb_v1_InitialLoadBalanceRequest;
25 struct grpc_lb_v1_ClientStatsPerToken;
26 struct grpc_lb_v1_ClientStats;
27 struct grpc_lb_v1_LoadBalanceResponse;
28 struct grpc_lb_v1_InitialLoadBalanceResponse;
29 struct grpc_lb_v1_ServerList;
30 struct grpc_lb_v1_Server;
31 struct grpc_lb_v1_FallbackResponse;
32 typedef struct grpc_lb_v1_LoadBalanceRequest grpc_lb_v1_LoadBalanceRequest;
33 typedef struct grpc_lb_v1_InitialLoadBalanceRequest grpc_lb_v1_InitialLoadBalanceRequest;
34 typedef struct grpc_lb_v1_ClientStatsPerToken grpc_lb_v1_ClientStatsPerToken;
35 typedef struct grpc_lb_v1_ClientStats grpc_lb_v1_ClientStats;
36 typedef struct grpc_lb_v1_LoadBalanceResponse grpc_lb_v1_LoadBalanceResponse;
37 typedef struct grpc_lb_v1_InitialLoadBalanceResponse grpc_lb_v1_InitialLoadBalanceResponse;
38 typedef struct grpc_lb_v1_ServerList grpc_lb_v1_ServerList;
39 typedef struct grpc_lb_v1_Server grpc_lb_v1_Server;
40 typedef struct grpc_lb_v1_FallbackResponse grpc_lb_v1_FallbackResponse;
41 extern const upb_msglayout grpc_lb_v1_LoadBalanceRequest_msginit;
42 extern const upb_msglayout grpc_lb_v1_InitialLoadBalanceRequest_msginit;
43 extern const upb_msglayout grpc_lb_v1_ClientStatsPerToken_msginit;
44 extern const upb_msglayout grpc_lb_v1_ClientStats_msginit;
45 extern const upb_msglayout grpc_lb_v1_LoadBalanceResponse_msginit;
46 extern const upb_msglayout grpc_lb_v1_InitialLoadBalanceResponse_msginit;
47 extern const upb_msglayout grpc_lb_v1_ServerList_msginit;
48 extern const upb_msglayout grpc_lb_v1_Server_msginit;
49 extern const upb_msglayout grpc_lb_v1_FallbackResponse_msginit;
50 struct google_protobuf_Duration;
51 struct google_protobuf_Timestamp;
52 extern const upb_msglayout google_protobuf_Duration_msginit;
53 extern const upb_msglayout google_protobuf_Timestamp_msginit;
54
55
56 /* grpc.lb.v1.LoadBalanceRequest */
57
58 UPB_INLINE grpc_lb_v1_LoadBalanceRequest *grpc_lb_v1_LoadBalanceRequest_new(upb_arena *arena) {
59   return (grpc_lb_v1_LoadBalanceRequest *)_upb_msg_new(&grpc_lb_v1_LoadBalanceRequest_msginit, arena);
60 }
61 UPB_INLINE grpc_lb_v1_LoadBalanceRequest *grpc_lb_v1_LoadBalanceRequest_parse(const char *buf, size_t size,
62                         upb_arena *arena) {
63   grpc_lb_v1_LoadBalanceRequest *ret = grpc_lb_v1_LoadBalanceRequest_new(arena);
64   if (!ret) return NULL;
65   if (!upb_decode(buf, size, ret, &grpc_lb_v1_LoadBalanceRequest_msginit, arena)) return NULL;
66   return ret;
67 }
68 UPB_INLINE grpc_lb_v1_LoadBalanceRequest *grpc_lb_v1_LoadBalanceRequest_parse_ex(const char *buf, size_t size,
69                            const upb_extreg *extreg, int options,
70                            upb_arena *arena) {
71   grpc_lb_v1_LoadBalanceRequest *ret = grpc_lb_v1_LoadBalanceRequest_new(arena);
72   if (!ret) return NULL;
73   if (!_upb_decode(buf, size, ret, &grpc_lb_v1_LoadBalanceRequest_msginit, extreg, options, arena)) {
74     return NULL;
75   }
76   return ret;
77 }
78 UPB_INLINE char *grpc_lb_v1_LoadBalanceRequest_serialize(const grpc_lb_v1_LoadBalanceRequest *msg, upb_arena *arena, size_t *len) {
79   return upb_encode(msg, &grpc_lb_v1_LoadBalanceRequest_msginit, arena, len);
80 }
81
82 typedef enum {
83   grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_initial_request = 1,
84   grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_client_stats = 2,
85   grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_NOT_SET = 0
86 } grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_oneofcases;
87 UPB_INLINE grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_oneofcases grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_case(const grpc_lb_v1_LoadBalanceRequest* msg) { return (grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); }
88
89 UPB_INLINE bool grpc_lb_v1_LoadBalanceRequest_has_initial_request(const grpc_lb_v1_LoadBalanceRequest *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; }
90 UPB_INLINE const grpc_lb_v1_InitialLoadBalanceRequest* grpc_lb_v1_LoadBalanceRequest_initial_request(const grpc_lb_v1_LoadBalanceRequest *msg) { return UPB_READ_ONEOF(msg, const grpc_lb_v1_InitialLoadBalanceRequest*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); }
91 UPB_INLINE bool grpc_lb_v1_LoadBalanceRequest_has_client_stats(const grpc_lb_v1_LoadBalanceRequest *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 2; }
92 UPB_INLINE const grpc_lb_v1_ClientStats* grpc_lb_v1_LoadBalanceRequest_client_stats(const grpc_lb_v1_LoadBalanceRequest *msg) { return UPB_READ_ONEOF(msg, const grpc_lb_v1_ClientStats*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); }
93
94 UPB_INLINE void grpc_lb_v1_LoadBalanceRequest_set_initial_request(grpc_lb_v1_LoadBalanceRequest *msg, grpc_lb_v1_InitialLoadBalanceRequest* value) {
95   UPB_WRITE_ONEOF(msg, grpc_lb_v1_InitialLoadBalanceRequest*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1);
96 }
97 UPB_INLINE struct grpc_lb_v1_InitialLoadBalanceRequest* grpc_lb_v1_LoadBalanceRequest_mutable_initial_request(grpc_lb_v1_LoadBalanceRequest *msg, upb_arena *arena) {
98   struct grpc_lb_v1_InitialLoadBalanceRequest* sub = (struct grpc_lb_v1_InitialLoadBalanceRequest*)grpc_lb_v1_LoadBalanceRequest_initial_request(msg);
99   if (sub == NULL) {
100     sub = (struct grpc_lb_v1_InitialLoadBalanceRequest*)_upb_msg_new(&grpc_lb_v1_InitialLoadBalanceRequest_msginit, arena);
101     if (!sub) return NULL;
102     grpc_lb_v1_LoadBalanceRequest_set_initial_request(msg, sub);
103   }
104   return sub;
105 }
106 UPB_INLINE void grpc_lb_v1_LoadBalanceRequest_set_client_stats(grpc_lb_v1_LoadBalanceRequest *msg, grpc_lb_v1_ClientStats* value) {
107   UPB_WRITE_ONEOF(msg, grpc_lb_v1_ClientStats*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2);
108 }
109 UPB_INLINE struct grpc_lb_v1_ClientStats* grpc_lb_v1_LoadBalanceRequest_mutable_client_stats(grpc_lb_v1_LoadBalanceRequest *msg, upb_arena *arena) {
110   struct grpc_lb_v1_ClientStats* sub = (struct grpc_lb_v1_ClientStats*)grpc_lb_v1_LoadBalanceRequest_client_stats(msg);
111   if (sub == NULL) {
112     sub = (struct grpc_lb_v1_ClientStats*)_upb_msg_new(&grpc_lb_v1_ClientStats_msginit, arena);
113     if (!sub) return NULL;
114     grpc_lb_v1_LoadBalanceRequest_set_client_stats(msg, sub);
115   }
116   return sub;
117 }
118
119 /* grpc.lb.v1.InitialLoadBalanceRequest */
120
121 UPB_INLINE grpc_lb_v1_InitialLoadBalanceRequest *grpc_lb_v1_InitialLoadBalanceRequest_new(upb_arena *arena) {
122   return (grpc_lb_v1_InitialLoadBalanceRequest *)_upb_msg_new(&grpc_lb_v1_InitialLoadBalanceRequest_msginit, arena);
123 }
124 UPB_INLINE grpc_lb_v1_InitialLoadBalanceRequest *grpc_lb_v1_InitialLoadBalanceRequest_parse(const char *buf, size_t size,
125                         upb_arena *arena) {
126   grpc_lb_v1_InitialLoadBalanceRequest *ret = grpc_lb_v1_InitialLoadBalanceRequest_new(arena);
127   if (!ret) return NULL;
128   if (!upb_decode(buf, size, ret, &grpc_lb_v1_InitialLoadBalanceRequest_msginit, arena)) return NULL;
129   return ret;
130 }
131 UPB_INLINE grpc_lb_v1_InitialLoadBalanceRequest *grpc_lb_v1_InitialLoadBalanceRequest_parse_ex(const char *buf, size_t size,
132                            const upb_extreg *extreg, int options,
133                            upb_arena *arena) {
134   grpc_lb_v1_InitialLoadBalanceRequest *ret = grpc_lb_v1_InitialLoadBalanceRequest_new(arena);
135   if (!ret) return NULL;
136   if (!_upb_decode(buf, size, ret, &grpc_lb_v1_InitialLoadBalanceRequest_msginit, extreg, options, arena)) {
137     return NULL;
138   }
139   return ret;
140 }
141 UPB_INLINE char *grpc_lb_v1_InitialLoadBalanceRequest_serialize(const grpc_lb_v1_InitialLoadBalanceRequest *msg, upb_arena *arena, size_t *len) {
142   return upb_encode(msg, &grpc_lb_v1_InitialLoadBalanceRequest_msginit, arena, len);
143 }
144
145 UPB_INLINE upb_strview grpc_lb_v1_InitialLoadBalanceRequest_name(const grpc_lb_v1_InitialLoadBalanceRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
146
147 UPB_INLINE void grpc_lb_v1_InitialLoadBalanceRequest_set_name(grpc_lb_v1_InitialLoadBalanceRequest *msg, upb_strview value) {
148   *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
149 }
150
151 /* grpc.lb.v1.ClientStatsPerToken */
152
153 UPB_INLINE grpc_lb_v1_ClientStatsPerToken *grpc_lb_v1_ClientStatsPerToken_new(upb_arena *arena) {
154   return (grpc_lb_v1_ClientStatsPerToken *)_upb_msg_new(&grpc_lb_v1_ClientStatsPerToken_msginit, arena);
155 }
156 UPB_INLINE grpc_lb_v1_ClientStatsPerToken *grpc_lb_v1_ClientStatsPerToken_parse(const char *buf, size_t size,
157                         upb_arena *arena) {
158   grpc_lb_v1_ClientStatsPerToken *ret = grpc_lb_v1_ClientStatsPerToken_new(arena);
159   if (!ret) return NULL;
160   if (!upb_decode(buf, size, ret, &grpc_lb_v1_ClientStatsPerToken_msginit, arena)) return NULL;
161   return ret;
162 }
163 UPB_INLINE grpc_lb_v1_ClientStatsPerToken *grpc_lb_v1_ClientStatsPerToken_parse_ex(const char *buf, size_t size,
164                            const upb_extreg *extreg, int options,
165                            upb_arena *arena) {
166   grpc_lb_v1_ClientStatsPerToken *ret = grpc_lb_v1_ClientStatsPerToken_new(arena);
167   if (!ret) return NULL;
168   if (!_upb_decode(buf, size, ret, &grpc_lb_v1_ClientStatsPerToken_msginit, extreg, options, arena)) {
169     return NULL;
170   }
171   return ret;
172 }
173 UPB_INLINE char *grpc_lb_v1_ClientStatsPerToken_serialize(const grpc_lb_v1_ClientStatsPerToken *msg, upb_arena *arena, size_t *len) {
174   return upb_encode(msg, &grpc_lb_v1_ClientStatsPerToken_msginit, arena, len);
175 }
176
177 UPB_INLINE upb_strview grpc_lb_v1_ClientStatsPerToken_load_balance_token(const grpc_lb_v1_ClientStatsPerToken *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
178 UPB_INLINE int64_t grpc_lb_v1_ClientStatsPerToken_num_calls(const grpc_lb_v1_ClientStatsPerToken *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t); }
179
180 UPB_INLINE void grpc_lb_v1_ClientStatsPerToken_set_load_balance_token(grpc_lb_v1_ClientStatsPerToken *msg, upb_strview value) {
181   *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
182 }
183 UPB_INLINE void grpc_lb_v1_ClientStatsPerToken_set_num_calls(grpc_lb_v1_ClientStatsPerToken *msg, int64_t value) {
184   *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t) = value;
185 }
186
187 /* grpc.lb.v1.ClientStats */
188
189 UPB_INLINE grpc_lb_v1_ClientStats *grpc_lb_v1_ClientStats_new(upb_arena *arena) {
190   return (grpc_lb_v1_ClientStats *)_upb_msg_new(&grpc_lb_v1_ClientStats_msginit, arena);
191 }
192 UPB_INLINE grpc_lb_v1_ClientStats *grpc_lb_v1_ClientStats_parse(const char *buf, size_t size,
193                         upb_arena *arena) {
194   grpc_lb_v1_ClientStats *ret = grpc_lb_v1_ClientStats_new(arena);
195   if (!ret) return NULL;
196   if (!upb_decode(buf, size, ret, &grpc_lb_v1_ClientStats_msginit, arena)) return NULL;
197   return ret;
198 }
199 UPB_INLINE grpc_lb_v1_ClientStats *grpc_lb_v1_ClientStats_parse_ex(const char *buf, size_t size,
200                            const upb_extreg *extreg, int options,
201                            upb_arena *arena) {
202   grpc_lb_v1_ClientStats *ret = grpc_lb_v1_ClientStats_new(arena);
203   if (!ret) return NULL;
204   if (!_upb_decode(buf, size, ret, &grpc_lb_v1_ClientStats_msginit, extreg, options, arena)) {
205     return NULL;
206   }
207   return ret;
208 }
209 UPB_INLINE char *grpc_lb_v1_ClientStats_serialize(const grpc_lb_v1_ClientStats *msg, upb_arena *arena, size_t *len) {
210   return upb_encode(msg, &grpc_lb_v1_ClientStats_msginit, arena, len);
211 }
212
213 UPB_INLINE bool grpc_lb_v1_ClientStats_has_timestamp(const grpc_lb_v1_ClientStats *msg) { return _upb_hasbit(msg, 1); }
214 UPB_INLINE const struct google_protobuf_Timestamp* grpc_lb_v1_ClientStats_timestamp(const grpc_lb_v1_ClientStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 40), const struct google_protobuf_Timestamp*); }
215 UPB_INLINE int64_t grpc_lb_v1_ClientStats_num_calls_started(const grpc_lb_v1_ClientStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t); }
216 UPB_INLINE int64_t grpc_lb_v1_ClientStats_num_calls_finished(const grpc_lb_v1_ClientStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t); }
217 UPB_INLINE int64_t grpc_lb_v1_ClientStats_num_calls_finished_with_client_failed_to_send(const grpc_lb_v1_ClientStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int64_t); }
218 UPB_INLINE int64_t grpc_lb_v1_ClientStats_num_calls_finished_known_received(const grpc_lb_v1_ClientStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), int64_t); }
219 UPB_INLINE bool grpc_lb_v1_ClientStats_has_calls_finished_with_drop(const grpc_lb_v1_ClientStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 48)); }
220 UPB_INLINE const grpc_lb_v1_ClientStatsPerToken* const* grpc_lb_v1_ClientStats_calls_finished_with_drop(const grpc_lb_v1_ClientStats *msg, size_t *len) { return (const grpc_lb_v1_ClientStatsPerToken* const*)_upb_array_accessor(msg, UPB_SIZE(44, 48), len); }
221
222 UPB_INLINE void grpc_lb_v1_ClientStats_set_timestamp(grpc_lb_v1_ClientStats *msg, struct google_protobuf_Timestamp* value) {
223   _upb_sethas(msg, 1);
224   *UPB_PTR_AT(msg, UPB_SIZE(40, 40), struct google_protobuf_Timestamp*) = value;
225 }
226 UPB_INLINE struct google_protobuf_Timestamp* grpc_lb_v1_ClientStats_mutable_timestamp(grpc_lb_v1_ClientStats *msg, upb_arena *arena) {
227   struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)grpc_lb_v1_ClientStats_timestamp(msg);
228   if (sub == NULL) {
229     sub = (struct google_protobuf_Timestamp*)_upb_msg_new(&google_protobuf_Timestamp_msginit, arena);
230     if (!sub) return NULL;
231     grpc_lb_v1_ClientStats_set_timestamp(msg, sub);
232   }
233   return sub;
234 }
235 UPB_INLINE void grpc_lb_v1_ClientStats_set_num_calls_started(grpc_lb_v1_ClientStats *msg, int64_t value) {
236   *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t) = value;
237 }
238 UPB_INLINE void grpc_lb_v1_ClientStats_set_num_calls_finished(grpc_lb_v1_ClientStats *msg, int64_t value) {
239   *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t) = value;
240 }
241 UPB_INLINE void grpc_lb_v1_ClientStats_set_num_calls_finished_with_client_failed_to_send(grpc_lb_v1_ClientStats *msg, int64_t value) {
242   *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int64_t) = value;
243 }
244 UPB_INLINE void grpc_lb_v1_ClientStats_set_num_calls_finished_known_received(grpc_lb_v1_ClientStats *msg, int64_t value) {
245   *UPB_PTR_AT(msg, UPB_SIZE(32, 32), int64_t) = value;
246 }
247 UPB_INLINE grpc_lb_v1_ClientStatsPerToken** grpc_lb_v1_ClientStats_mutable_calls_finished_with_drop(grpc_lb_v1_ClientStats *msg, size_t *len) {
248   return (grpc_lb_v1_ClientStatsPerToken**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 48), len);
249 }
250 UPB_INLINE grpc_lb_v1_ClientStatsPerToken** grpc_lb_v1_ClientStats_resize_calls_finished_with_drop(grpc_lb_v1_ClientStats *msg, size_t len, upb_arena *arena) {
251   return (grpc_lb_v1_ClientStatsPerToken**)_upb_array_resize_accessor2(msg, UPB_SIZE(44, 48), len, UPB_SIZE(2, 3), arena);
252 }
253 UPB_INLINE struct grpc_lb_v1_ClientStatsPerToken* grpc_lb_v1_ClientStats_add_calls_finished_with_drop(grpc_lb_v1_ClientStats *msg, upb_arena *arena) {
254   struct grpc_lb_v1_ClientStatsPerToken* sub = (struct grpc_lb_v1_ClientStatsPerToken*)_upb_msg_new(&grpc_lb_v1_ClientStatsPerToken_msginit, arena);
255   bool ok = _upb_array_append_accessor2(
256       msg, UPB_SIZE(44, 48), UPB_SIZE(2, 3), &sub, arena);
257   if (!ok) return NULL;
258   return sub;
259 }
260
261 /* grpc.lb.v1.LoadBalanceResponse */
262
263 UPB_INLINE grpc_lb_v1_LoadBalanceResponse *grpc_lb_v1_LoadBalanceResponse_new(upb_arena *arena) {
264   return (grpc_lb_v1_LoadBalanceResponse *)_upb_msg_new(&grpc_lb_v1_LoadBalanceResponse_msginit, arena);
265 }
266 UPB_INLINE grpc_lb_v1_LoadBalanceResponse *grpc_lb_v1_LoadBalanceResponse_parse(const char *buf, size_t size,
267                         upb_arena *arena) {
268   grpc_lb_v1_LoadBalanceResponse *ret = grpc_lb_v1_LoadBalanceResponse_new(arena);
269   if (!ret) return NULL;
270   if (!upb_decode(buf, size, ret, &grpc_lb_v1_LoadBalanceResponse_msginit, arena)) return NULL;
271   return ret;
272 }
273 UPB_INLINE grpc_lb_v1_LoadBalanceResponse *grpc_lb_v1_LoadBalanceResponse_parse_ex(const char *buf, size_t size,
274                            const upb_extreg *extreg, int options,
275                            upb_arena *arena) {
276   grpc_lb_v1_LoadBalanceResponse *ret = grpc_lb_v1_LoadBalanceResponse_new(arena);
277   if (!ret) return NULL;
278   if (!_upb_decode(buf, size, ret, &grpc_lb_v1_LoadBalanceResponse_msginit, extreg, options, arena)) {
279     return NULL;
280   }
281   return ret;
282 }
283 UPB_INLINE char *grpc_lb_v1_LoadBalanceResponse_serialize(const grpc_lb_v1_LoadBalanceResponse *msg, upb_arena *arena, size_t *len) {
284   return upb_encode(msg, &grpc_lb_v1_LoadBalanceResponse_msginit, arena, len);
285 }
286
287 typedef enum {
288   grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_initial_response = 1,
289   grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_server_list = 2,
290   grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_fallback_response = 3,
291   grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_NOT_SET = 0
292 } grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_oneofcases;
293 UPB_INLINE grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_oneofcases grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_case(const grpc_lb_v1_LoadBalanceResponse* msg) { return (grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); }
294
295 UPB_INLINE bool grpc_lb_v1_LoadBalanceResponse_has_initial_response(const grpc_lb_v1_LoadBalanceResponse *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; }
296 UPB_INLINE const grpc_lb_v1_InitialLoadBalanceResponse* grpc_lb_v1_LoadBalanceResponse_initial_response(const grpc_lb_v1_LoadBalanceResponse *msg) { return UPB_READ_ONEOF(msg, const grpc_lb_v1_InitialLoadBalanceResponse*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); }
297 UPB_INLINE bool grpc_lb_v1_LoadBalanceResponse_has_server_list(const grpc_lb_v1_LoadBalanceResponse *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 2; }
298 UPB_INLINE const grpc_lb_v1_ServerList* grpc_lb_v1_LoadBalanceResponse_server_list(const grpc_lb_v1_LoadBalanceResponse *msg) { return UPB_READ_ONEOF(msg, const grpc_lb_v1_ServerList*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); }
299 UPB_INLINE bool grpc_lb_v1_LoadBalanceResponse_has_fallback_response(const grpc_lb_v1_LoadBalanceResponse *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 3; }
300 UPB_INLINE const grpc_lb_v1_FallbackResponse* grpc_lb_v1_LoadBalanceResponse_fallback_response(const grpc_lb_v1_LoadBalanceResponse *msg) { return UPB_READ_ONEOF(msg, const grpc_lb_v1_FallbackResponse*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 3, NULL); }
301
302 UPB_INLINE void grpc_lb_v1_LoadBalanceResponse_set_initial_response(grpc_lb_v1_LoadBalanceResponse *msg, grpc_lb_v1_InitialLoadBalanceResponse* value) {
303   UPB_WRITE_ONEOF(msg, grpc_lb_v1_InitialLoadBalanceResponse*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1);
304 }
305 UPB_INLINE struct grpc_lb_v1_InitialLoadBalanceResponse* grpc_lb_v1_LoadBalanceResponse_mutable_initial_response(grpc_lb_v1_LoadBalanceResponse *msg, upb_arena *arena) {
306   struct grpc_lb_v1_InitialLoadBalanceResponse* sub = (struct grpc_lb_v1_InitialLoadBalanceResponse*)grpc_lb_v1_LoadBalanceResponse_initial_response(msg);
307   if (sub == NULL) {
308     sub = (struct grpc_lb_v1_InitialLoadBalanceResponse*)_upb_msg_new(&grpc_lb_v1_InitialLoadBalanceResponse_msginit, arena);
309     if (!sub) return NULL;
310     grpc_lb_v1_LoadBalanceResponse_set_initial_response(msg, sub);
311   }
312   return sub;
313 }
314 UPB_INLINE void grpc_lb_v1_LoadBalanceResponse_set_server_list(grpc_lb_v1_LoadBalanceResponse *msg, grpc_lb_v1_ServerList* value) {
315   UPB_WRITE_ONEOF(msg, grpc_lb_v1_ServerList*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2);
316 }
317 UPB_INLINE struct grpc_lb_v1_ServerList* grpc_lb_v1_LoadBalanceResponse_mutable_server_list(grpc_lb_v1_LoadBalanceResponse *msg, upb_arena *arena) {
318   struct grpc_lb_v1_ServerList* sub = (struct grpc_lb_v1_ServerList*)grpc_lb_v1_LoadBalanceResponse_server_list(msg);
319   if (sub == NULL) {
320     sub = (struct grpc_lb_v1_ServerList*)_upb_msg_new(&grpc_lb_v1_ServerList_msginit, arena);
321     if (!sub) return NULL;
322     grpc_lb_v1_LoadBalanceResponse_set_server_list(msg, sub);
323   }
324   return sub;
325 }
326 UPB_INLINE void grpc_lb_v1_LoadBalanceResponse_set_fallback_response(grpc_lb_v1_LoadBalanceResponse *msg, grpc_lb_v1_FallbackResponse* value) {
327   UPB_WRITE_ONEOF(msg, grpc_lb_v1_FallbackResponse*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 3);
328 }
329 UPB_INLINE struct grpc_lb_v1_FallbackResponse* grpc_lb_v1_LoadBalanceResponse_mutable_fallback_response(grpc_lb_v1_LoadBalanceResponse *msg, upb_arena *arena) {
330   struct grpc_lb_v1_FallbackResponse* sub = (struct grpc_lb_v1_FallbackResponse*)grpc_lb_v1_LoadBalanceResponse_fallback_response(msg);
331   if (sub == NULL) {
332     sub = (struct grpc_lb_v1_FallbackResponse*)_upb_msg_new(&grpc_lb_v1_FallbackResponse_msginit, arena);
333     if (!sub) return NULL;
334     grpc_lb_v1_LoadBalanceResponse_set_fallback_response(msg, sub);
335   }
336   return sub;
337 }
338
339 /* grpc.lb.v1.InitialLoadBalanceResponse */
340
341 UPB_INLINE grpc_lb_v1_InitialLoadBalanceResponse *grpc_lb_v1_InitialLoadBalanceResponse_new(upb_arena *arena) {
342   return (grpc_lb_v1_InitialLoadBalanceResponse *)_upb_msg_new(&grpc_lb_v1_InitialLoadBalanceResponse_msginit, arena);
343 }
344 UPB_INLINE grpc_lb_v1_InitialLoadBalanceResponse *grpc_lb_v1_InitialLoadBalanceResponse_parse(const char *buf, size_t size,
345                         upb_arena *arena) {
346   grpc_lb_v1_InitialLoadBalanceResponse *ret = grpc_lb_v1_InitialLoadBalanceResponse_new(arena);
347   if (!ret) return NULL;
348   if (!upb_decode(buf, size, ret, &grpc_lb_v1_InitialLoadBalanceResponse_msginit, arena)) return NULL;
349   return ret;
350 }
351 UPB_INLINE grpc_lb_v1_InitialLoadBalanceResponse *grpc_lb_v1_InitialLoadBalanceResponse_parse_ex(const char *buf, size_t size,
352                            const upb_extreg *extreg, int options,
353                            upb_arena *arena) {
354   grpc_lb_v1_InitialLoadBalanceResponse *ret = grpc_lb_v1_InitialLoadBalanceResponse_new(arena);
355   if (!ret) return NULL;
356   if (!_upb_decode(buf, size, ret, &grpc_lb_v1_InitialLoadBalanceResponse_msginit, extreg, options, arena)) {
357     return NULL;
358   }
359   return ret;
360 }
361 UPB_INLINE char *grpc_lb_v1_InitialLoadBalanceResponse_serialize(const grpc_lb_v1_InitialLoadBalanceResponse *msg, upb_arena *arena, size_t *len) {
362   return upb_encode(msg, &grpc_lb_v1_InitialLoadBalanceResponse_msginit, arena, len);
363 }
364
365 UPB_INLINE upb_strview grpc_lb_v1_InitialLoadBalanceResponse_load_balancer_delegate(const grpc_lb_v1_InitialLoadBalanceResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
366 UPB_INLINE bool grpc_lb_v1_InitialLoadBalanceResponse_has_client_stats_report_interval(const grpc_lb_v1_InitialLoadBalanceResponse *msg) { return _upb_hasbit(msg, 1); }
367 UPB_INLINE const struct google_protobuf_Duration* grpc_lb_v1_InitialLoadBalanceResponse_client_stats_report_interval(const grpc_lb_v1_InitialLoadBalanceResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Duration*); }
368
369 UPB_INLINE void grpc_lb_v1_InitialLoadBalanceResponse_set_load_balancer_delegate(grpc_lb_v1_InitialLoadBalanceResponse *msg, upb_strview value) {
370   *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
371 }
372 UPB_INLINE void grpc_lb_v1_InitialLoadBalanceResponse_set_client_stats_report_interval(grpc_lb_v1_InitialLoadBalanceResponse *msg, struct google_protobuf_Duration* value) {
373   _upb_sethas(msg, 1);
374   *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Duration*) = value;
375 }
376 UPB_INLINE struct google_protobuf_Duration* grpc_lb_v1_InitialLoadBalanceResponse_mutable_client_stats_report_interval(grpc_lb_v1_InitialLoadBalanceResponse *msg, upb_arena *arena) {
377   struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)grpc_lb_v1_InitialLoadBalanceResponse_client_stats_report_interval(msg);
378   if (sub == NULL) {
379     sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
380     if (!sub) return NULL;
381     grpc_lb_v1_InitialLoadBalanceResponse_set_client_stats_report_interval(msg, sub);
382   }
383   return sub;
384 }
385
386 /* grpc.lb.v1.ServerList */
387
388 UPB_INLINE grpc_lb_v1_ServerList *grpc_lb_v1_ServerList_new(upb_arena *arena) {
389   return (grpc_lb_v1_ServerList *)_upb_msg_new(&grpc_lb_v1_ServerList_msginit, arena);
390 }
391 UPB_INLINE grpc_lb_v1_ServerList *grpc_lb_v1_ServerList_parse(const char *buf, size_t size,
392                         upb_arena *arena) {
393   grpc_lb_v1_ServerList *ret = grpc_lb_v1_ServerList_new(arena);
394   if (!ret) return NULL;
395   if (!upb_decode(buf, size, ret, &grpc_lb_v1_ServerList_msginit, arena)) return NULL;
396   return ret;
397 }
398 UPB_INLINE grpc_lb_v1_ServerList *grpc_lb_v1_ServerList_parse_ex(const char *buf, size_t size,
399                            const upb_extreg *extreg, int options,
400                            upb_arena *arena) {
401   grpc_lb_v1_ServerList *ret = grpc_lb_v1_ServerList_new(arena);
402   if (!ret) return NULL;
403   if (!_upb_decode(buf, size, ret, &grpc_lb_v1_ServerList_msginit, extreg, options, arena)) {
404     return NULL;
405   }
406   return ret;
407 }
408 UPB_INLINE char *grpc_lb_v1_ServerList_serialize(const grpc_lb_v1_ServerList *msg, upb_arena *arena, size_t *len) {
409   return upb_encode(msg, &grpc_lb_v1_ServerList_msginit, arena, len);
410 }
411
412 UPB_INLINE bool grpc_lb_v1_ServerList_has_servers(const grpc_lb_v1_ServerList *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
413 UPB_INLINE const grpc_lb_v1_Server* const* grpc_lb_v1_ServerList_servers(const grpc_lb_v1_ServerList *msg, size_t *len) { return (const grpc_lb_v1_Server* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
414
415 UPB_INLINE grpc_lb_v1_Server** grpc_lb_v1_ServerList_mutable_servers(grpc_lb_v1_ServerList *msg, size_t *len) {
416   return (grpc_lb_v1_Server**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
417 }
418 UPB_INLINE grpc_lb_v1_Server** grpc_lb_v1_ServerList_resize_servers(grpc_lb_v1_ServerList *msg, size_t len, upb_arena *arena) {
419   return (grpc_lb_v1_Server**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
420 }
421 UPB_INLINE struct grpc_lb_v1_Server* grpc_lb_v1_ServerList_add_servers(grpc_lb_v1_ServerList *msg, upb_arena *arena) {
422   struct grpc_lb_v1_Server* sub = (struct grpc_lb_v1_Server*)_upb_msg_new(&grpc_lb_v1_Server_msginit, arena);
423   bool ok = _upb_array_append_accessor2(
424       msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
425   if (!ok) return NULL;
426   return sub;
427 }
428
429 /* grpc.lb.v1.Server */
430
431 UPB_INLINE grpc_lb_v1_Server *grpc_lb_v1_Server_new(upb_arena *arena) {
432   return (grpc_lb_v1_Server *)_upb_msg_new(&grpc_lb_v1_Server_msginit, arena);
433 }
434 UPB_INLINE grpc_lb_v1_Server *grpc_lb_v1_Server_parse(const char *buf, size_t size,
435                         upb_arena *arena) {
436   grpc_lb_v1_Server *ret = grpc_lb_v1_Server_new(arena);
437   if (!ret) return NULL;
438   if (!upb_decode(buf, size, ret, &grpc_lb_v1_Server_msginit, arena)) return NULL;
439   return ret;
440 }
441 UPB_INLINE grpc_lb_v1_Server *grpc_lb_v1_Server_parse_ex(const char *buf, size_t size,
442                            const upb_extreg *extreg, int options,
443                            upb_arena *arena) {
444   grpc_lb_v1_Server *ret = grpc_lb_v1_Server_new(arena);
445   if (!ret) return NULL;
446   if (!_upb_decode(buf, size, ret, &grpc_lb_v1_Server_msginit, extreg, options, arena)) {
447     return NULL;
448   }
449   return ret;
450 }
451 UPB_INLINE char *grpc_lb_v1_Server_serialize(const grpc_lb_v1_Server *msg, upb_arena *arena, size_t *len) {
452   return upb_encode(msg, &grpc_lb_v1_Server_msginit, arena, len);
453 }
454
455 UPB_INLINE upb_strview grpc_lb_v1_Server_ip_address(const grpc_lb_v1_Server *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
456 UPB_INLINE int32_t grpc_lb_v1_Server_port(const grpc_lb_v1_Server *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
457 UPB_INLINE upb_strview grpc_lb_v1_Server_load_balance_token(const grpc_lb_v1_Server *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview); }
458 UPB_INLINE bool grpc_lb_v1_Server_drop(const grpc_lb_v1_Server *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool); }
459
460 UPB_INLINE void grpc_lb_v1_Server_set_ip_address(grpc_lb_v1_Server *msg, upb_strview value) {
461   *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
462 }
463 UPB_INLINE void grpc_lb_v1_Server_set_port(grpc_lb_v1_Server *msg, int32_t value) {
464   *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
465 }
466 UPB_INLINE void grpc_lb_v1_Server_set_load_balance_token(grpc_lb_v1_Server *msg, upb_strview value) {
467   *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview) = value;
468 }
469 UPB_INLINE void grpc_lb_v1_Server_set_drop(grpc_lb_v1_Server *msg, bool value) {
470   *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool) = value;
471 }
472
473 /* grpc.lb.v1.FallbackResponse */
474
475 UPB_INLINE grpc_lb_v1_FallbackResponse *grpc_lb_v1_FallbackResponse_new(upb_arena *arena) {
476   return (grpc_lb_v1_FallbackResponse *)_upb_msg_new(&grpc_lb_v1_FallbackResponse_msginit, arena);
477 }
478 UPB_INLINE grpc_lb_v1_FallbackResponse *grpc_lb_v1_FallbackResponse_parse(const char *buf, size_t size,
479                         upb_arena *arena) {
480   grpc_lb_v1_FallbackResponse *ret = grpc_lb_v1_FallbackResponse_new(arena);
481   if (!ret) return NULL;
482   if (!upb_decode(buf, size, ret, &grpc_lb_v1_FallbackResponse_msginit, arena)) return NULL;
483   return ret;
484 }
485 UPB_INLINE grpc_lb_v1_FallbackResponse *grpc_lb_v1_FallbackResponse_parse_ex(const char *buf, size_t size,
486                            const upb_extreg *extreg, int options,
487                            upb_arena *arena) {
488   grpc_lb_v1_FallbackResponse *ret = grpc_lb_v1_FallbackResponse_new(arena);
489   if (!ret) return NULL;
490   if (!_upb_decode(buf, size, ret, &grpc_lb_v1_FallbackResponse_msginit, extreg, options, arena)) {
491     return NULL;
492   }
493   return ret;
494 }
495 UPB_INLINE char *grpc_lb_v1_FallbackResponse_serialize(const grpc_lb_v1_FallbackResponse *msg, upb_arena *arena, size_t *len) {
496   return upb_encode(msg, &grpc_lb_v1_FallbackResponse_msginit, arena, len);
497 }
498
499
500
501 #ifdef __cplusplus
502 }  /* extern "C" */
503 #endif
504
505 #include "upb/port_undef.inc"
506
507 #endif  /* SRC_PROTO_GRPC_LB_V1_LOAD_BALANCER_PROTO_UPB_H_ */