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.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
grpc_lb_v1_LoadBalanceRequest_new(upb_arena * arena)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 }
grpc_lb_v1_LoadBalanceRequest_parse(const char * buf,size_t size,upb_arena * arena)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 return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_LoadBalanceRequest_msginit, arena)) ? ret : NULL;
65 }
grpc_lb_v1_LoadBalanceRequest_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)66 UPB_INLINE grpc_lb_v1_LoadBalanceRequest *grpc_lb_v1_LoadBalanceRequest_parse_ex(const char *buf, size_t size,
67 upb_arena *arena, int options) {
68 grpc_lb_v1_LoadBalanceRequest *ret = grpc_lb_v1_LoadBalanceRequest_new(arena);
69 return (ret && _upb_decode(buf, size, ret, &grpc_lb_v1_LoadBalanceRequest_msginit, arena, options))
70 ? ret : NULL;
71 }
grpc_lb_v1_LoadBalanceRequest_serialize(const grpc_lb_v1_LoadBalanceRequest * msg,upb_arena * arena,size_t * len)72 UPB_INLINE char *grpc_lb_v1_LoadBalanceRequest_serialize(const grpc_lb_v1_LoadBalanceRequest *msg, upb_arena *arena, size_t *len) {
73 return upb_encode(msg, &grpc_lb_v1_LoadBalanceRequest_msginit, arena, len);
74 }
75
76 typedef enum {
77 grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_initial_request = 1,
78 grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_client_stats = 2,
79 grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_NOT_SET = 0
80 } grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_oneofcases;
grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_case(const grpc_lb_v1_LoadBalanceRequest * msg)81 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); }
82
grpc_lb_v1_LoadBalanceRequest_has_initial_request(const grpc_lb_v1_LoadBalanceRequest * msg)83 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; }
grpc_lb_v1_LoadBalanceRequest_initial_request(const grpc_lb_v1_LoadBalanceRequest * msg)84 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); }
grpc_lb_v1_LoadBalanceRequest_has_client_stats(const grpc_lb_v1_LoadBalanceRequest * msg)85 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; }
grpc_lb_v1_LoadBalanceRequest_client_stats(const grpc_lb_v1_LoadBalanceRequest * msg)86 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); }
87
grpc_lb_v1_LoadBalanceRequest_set_initial_request(grpc_lb_v1_LoadBalanceRequest * msg,grpc_lb_v1_InitialLoadBalanceRequest * value)88 UPB_INLINE void grpc_lb_v1_LoadBalanceRequest_set_initial_request(grpc_lb_v1_LoadBalanceRequest *msg, grpc_lb_v1_InitialLoadBalanceRequest* value) {
89 UPB_WRITE_ONEOF(msg, grpc_lb_v1_InitialLoadBalanceRequest*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1);
90 }
grpc_lb_v1_LoadBalanceRequest_mutable_initial_request(grpc_lb_v1_LoadBalanceRequest * msg,upb_arena * arena)91 UPB_INLINE struct grpc_lb_v1_InitialLoadBalanceRequest* grpc_lb_v1_LoadBalanceRequest_mutable_initial_request(grpc_lb_v1_LoadBalanceRequest *msg, upb_arena *arena) {
92 struct grpc_lb_v1_InitialLoadBalanceRequest* sub = (struct grpc_lb_v1_InitialLoadBalanceRequest*)grpc_lb_v1_LoadBalanceRequest_initial_request(msg);
93 if (sub == NULL) {
94 sub = (struct grpc_lb_v1_InitialLoadBalanceRequest*)_upb_msg_new(&grpc_lb_v1_InitialLoadBalanceRequest_msginit, arena);
95 if (!sub) return NULL;
96 grpc_lb_v1_LoadBalanceRequest_set_initial_request(msg, sub);
97 }
98 return sub;
99 }
grpc_lb_v1_LoadBalanceRequest_set_client_stats(grpc_lb_v1_LoadBalanceRequest * msg,grpc_lb_v1_ClientStats * value)100 UPB_INLINE void grpc_lb_v1_LoadBalanceRequest_set_client_stats(grpc_lb_v1_LoadBalanceRequest *msg, grpc_lb_v1_ClientStats* value) {
101 UPB_WRITE_ONEOF(msg, grpc_lb_v1_ClientStats*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2);
102 }
grpc_lb_v1_LoadBalanceRequest_mutable_client_stats(grpc_lb_v1_LoadBalanceRequest * msg,upb_arena * arena)103 UPB_INLINE struct grpc_lb_v1_ClientStats* grpc_lb_v1_LoadBalanceRequest_mutable_client_stats(grpc_lb_v1_LoadBalanceRequest *msg, upb_arena *arena) {
104 struct grpc_lb_v1_ClientStats* sub = (struct grpc_lb_v1_ClientStats*)grpc_lb_v1_LoadBalanceRequest_client_stats(msg);
105 if (sub == NULL) {
106 sub = (struct grpc_lb_v1_ClientStats*)_upb_msg_new(&grpc_lb_v1_ClientStats_msginit, arena);
107 if (!sub) return NULL;
108 grpc_lb_v1_LoadBalanceRequest_set_client_stats(msg, sub);
109 }
110 return sub;
111 }
112
113 /* grpc.lb.v1.InitialLoadBalanceRequest */
114
grpc_lb_v1_InitialLoadBalanceRequest_new(upb_arena * arena)115 UPB_INLINE grpc_lb_v1_InitialLoadBalanceRequest *grpc_lb_v1_InitialLoadBalanceRequest_new(upb_arena *arena) {
116 return (grpc_lb_v1_InitialLoadBalanceRequest *)_upb_msg_new(&grpc_lb_v1_InitialLoadBalanceRequest_msginit, arena);
117 }
grpc_lb_v1_InitialLoadBalanceRequest_parse(const char * buf,size_t size,upb_arena * arena)118 UPB_INLINE grpc_lb_v1_InitialLoadBalanceRequest *grpc_lb_v1_InitialLoadBalanceRequest_parse(const char *buf, size_t size,
119 upb_arena *arena) {
120 grpc_lb_v1_InitialLoadBalanceRequest *ret = grpc_lb_v1_InitialLoadBalanceRequest_new(arena);
121 return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_InitialLoadBalanceRequest_msginit, arena)) ? ret : NULL;
122 }
grpc_lb_v1_InitialLoadBalanceRequest_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)123 UPB_INLINE grpc_lb_v1_InitialLoadBalanceRequest *grpc_lb_v1_InitialLoadBalanceRequest_parse_ex(const char *buf, size_t size,
124 upb_arena *arena, int options) {
125 grpc_lb_v1_InitialLoadBalanceRequest *ret = grpc_lb_v1_InitialLoadBalanceRequest_new(arena);
126 return (ret && _upb_decode(buf, size, ret, &grpc_lb_v1_InitialLoadBalanceRequest_msginit, arena, options))
127 ? ret : NULL;
128 }
grpc_lb_v1_InitialLoadBalanceRequest_serialize(const grpc_lb_v1_InitialLoadBalanceRequest * msg,upb_arena * arena,size_t * len)129 UPB_INLINE char *grpc_lb_v1_InitialLoadBalanceRequest_serialize(const grpc_lb_v1_InitialLoadBalanceRequest *msg, upb_arena *arena, size_t *len) {
130 return upb_encode(msg, &grpc_lb_v1_InitialLoadBalanceRequest_msginit, arena, len);
131 }
132
grpc_lb_v1_InitialLoadBalanceRequest_name(const grpc_lb_v1_InitialLoadBalanceRequest * msg)133 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); }
134
grpc_lb_v1_InitialLoadBalanceRequest_set_name(grpc_lb_v1_InitialLoadBalanceRequest * msg,upb_strview value)135 UPB_INLINE void grpc_lb_v1_InitialLoadBalanceRequest_set_name(grpc_lb_v1_InitialLoadBalanceRequest *msg, upb_strview value) {
136 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
137 }
138
139 /* grpc.lb.v1.ClientStatsPerToken */
140
grpc_lb_v1_ClientStatsPerToken_new(upb_arena * arena)141 UPB_INLINE grpc_lb_v1_ClientStatsPerToken *grpc_lb_v1_ClientStatsPerToken_new(upb_arena *arena) {
142 return (grpc_lb_v1_ClientStatsPerToken *)_upb_msg_new(&grpc_lb_v1_ClientStatsPerToken_msginit, arena);
143 }
grpc_lb_v1_ClientStatsPerToken_parse(const char * buf,size_t size,upb_arena * arena)144 UPB_INLINE grpc_lb_v1_ClientStatsPerToken *grpc_lb_v1_ClientStatsPerToken_parse(const char *buf, size_t size,
145 upb_arena *arena) {
146 grpc_lb_v1_ClientStatsPerToken *ret = grpc_lb_v1_ClientStatsPerToken_new(arena);
147 return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_ClientStatsPerToken_msginit, arena)) ? ret : NULL;
148 }
grpc_lb_v1_ClientStatsPerToken_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)149 UPB_INLINE grpc_lb_v1_ClientStatsPerToken *grpc_lb_v1_ClientStatsPerToken_parse_ex(const char *buf, size_t size,
150 upb_arena *arena, int options) {
151 grpc_lb_v1_ClientStatsPerToken *ret = grpc_lb_v1_ClientStatsPerToken_new(arena);
152 return (ret && _upb_decode(buf, size, ret, &grpc_lb_v1_ClientStatsPerToken_msginit, arena, options))
153 ? ret : NULL;
154 }
grpc_lb_v1_ClientStatsPerToken_serialize(const grpc_lb_v1_ClientStatsPerToken * msg,upb_arena * arena,size_t * len)155 UPB_INLINE char *grpc_lb_v1_ClientStatsPerToken_serialize(const grpc_lb_v1_ClientStatsPerToken *msg, upb_arena *arena, size_t *len) {
156 return upb_encode(msg, &grpc_lb_v1_ClientStatsPerToken_msginit, arena, len);
157 }
158
grpc_lb_v1_ClientStatsPerToken_load_balance_token(const grpc_lb_v1_ClientStatsPerToken * msg)159 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); }
grpc_lb_v1_ClientStatsPerToken_num_calls(const grpc_lb_v1_ClientStatsPerToken * msg)160 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); }
161
grpc_lb_v1_ClientStatsPerToken_set_load_balance_token(grpc_lb_v1_ClientStatsPerToken * msg,upb_strview value)162 UPB_INLINE void grpc_lb_v1_ClientStatsPerToken_set_load_balance_token(grpc_lb_v1_ClientStatsPerToken *msg, upb_strview value) {
163 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
164 }
grpc_lb_v1_ClientStatsPerToken_set_num_calls(grpc_lb_v1_ClientStatsPerToken * msg,int64_t value)165 UPB_INLINE void grpc_lb_v1_ClientStatsPerToken_set_num_calls(grpc_lb_v1_ClientStatsPerToken *msg, int64_t value) {
166 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t) = value;
167 }
168
169 /* grpc.lb.v1.ClientStats */
170
grpc_lb_v1_ClientStats_new(upb_arena * arena)171 UPB_INLINE grpc_lb_v1_ClientStats *grpc_lb_v1_ClientStats_new(upb_arena *arena) {
172 return (grpc_lb_v1_ClientStats *)_upb_msg_new(&grpc_lb_v1_ClientStats_msginit, arena);
173 }
grpc_lb_v1_ClientStats_parse(const char * buf,size_t size,upb_arena * arena)174 UPB_INLINE grpc_lb_v1_ClientStats *grpc_lb_v1_ClientStats_parse(const char *buf, size_t size,
175 upb_arena *arena) {
176 grpc_lb_v1_ClientStats *ret = grpc_lb_v1_ClientStats_new(arena);
177 return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_ClientStats_msginit, arena)) ? ret : NULL;
178 }
grpc_lb_v1_ClientStats_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)179 UPB_INLINE grpc_lb_v1_ClientStats *grpc_lb_v1_ClientStats_parse_ex(const char *buf, size_t size,
180 upb_arena *arena, int options) {
181 grpc_lb_v1_ClientStats *ret = grpc_lb_v1_ClientStats_new(arena);
182 return (ret && _upb_decode(buf, size, ret, &grpc_lb_v1_ClientStats_msginit, arena, options))
183 ? ret : NULL;
184 }
grpc_lb_v1_ClientStats_serialize(const grpc_lb_v1_ClientStats * msg,upb_arena * arena,size_t * len)185 UPB_INLINE char *grpc_lb_v1_ClientStats_serialize(const grpc_lb_v1_ClientStats *msg, upb_arena *arena, size_t *len) {
186 return upb_encode(msg, &grpc_lb_v1_ClientStats_msginit, arena, len);
187 }
188
grpc_lb_v1_ClientStats_has_timestamp(const grpc_lb_v1_ClientStats * msg)189 UPB_INLINE bool grpc_lb_v1_ClientStats_has_timestamp(const grpc_lb_v1_ClientStats *msg) { return _upb_hasbit(msg, 1); }
grpc_lb_v1_ClientStats_timestamp(const grpc_lb_v1_ClientStats * msg)190 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*); }
grpc_lb_v1_ClientStats_num_calls_started(const grpc_lb_v1_ClientStats * msg)191 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); }
grpc_lb_v1_ClientStats_num_calls_finished(const grpc_lb_v1_ClientStats * msg)192 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); }
grpc_lb_v1_ClientStats_num_calls_finished_with_client_failed_to_send(const grpc_lb_v1_ClientStats * msg)193 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); }
grpc_lb_v1_ClientStats_num_calls_finished_known_received(const grpc_lb_v1_ClientStats * msg)194 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); }
grpc_lb_v1_ClientStats_has_calls_finished_with_drop(const grpc_lb_v1_ClientStats * msg)195 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)); }
grpc_lb_v1_ClientStats_calls_finished_with_drop(const grpc_lb_v1_ClientStats * msg,size_t * len)196 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); }
197
grpc_lb_v1_ClientStats_set_timestamp(grpc_lb_v1_ClientStats * msg,struct google_protobuf_Timestamp * value)198 UPB_INLINE void grpc_lb_v1_ClientStats_set_timestamp(grpc_lb_v1_ClientStats *msg, struct google_protobuf_Timestamp* value) {
199 _upb_sethas(msg, 1);
200 *UPB_PTR_AT(msg, UPB_SIZE(40, 40), struct google_protobuf_Timestamp*) = value;
201 }
grpc_lb_v1_ClientStats_mutable_timestamp(grpc_lb_v1_ClientStats * msg,upb_arena * arena)202 UPB_INLINE struct google_protobuf_Timestamp* grpc_lb_v1_ClientStats_mutable_timestamp(grpc_lb_v1_ClientStats *msg, upb_arena *arena) {
203 struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)grpc_lb_v1_ClientStats_timestamp(msg);
204 if (sub == NULL) {
205 sub = (struct google_protobuf_Timestamp*)_upb_msg_new(&google_protobuf_Timestamp_msginit, arena);
206 if (!sub) return NULL;
207 grpc_lb_v1_ClientStats_set_timestamp(msg, sub);
208 }
209 return sub;
210 }
grpc_lb_v1_ClientStats_set_num_calls_started(grpc_lb_v1_ClientStats * msg,int64_t value)211 UPB_INLINE void grpc_lb_v1_ClientStats_set_num_calls_started(grpc_lb_v1_ClientStats *msg, int64_t value) {
212 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t) = value;
213 }
grpc_lb_v1_ClientStats_set_num_calls_finished(grpc_lb_v1_ClientStats * msg,int64_t value)214 UPB_INLINE void grpc_lb_v1_ClientStats_set_num_calls_finished(grpc_lb_v1_ClientStats *msg, int64_t value) {
215 *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t) = value;
216 }
grpc_lb_v1_ClientStats_set_num_calls_finished_with_client_failed_to_send(grpc_lb_v1_ClientStats * msg,int64_t value)217 UPB_INLINE void grpc_lb_v1_ClientStats_set_num_calls_finished_with_client_failed_to_send(grpc_lb_v1_ClientStats *msg, int64_t value) {
218 *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int64_t) = value;
219 }
grpc_lb_v1_ClientStats_set_num_calls_finished_known_received(grpc_lb_v1_ClientStats * msg,int64_t value)220 UPB_INLINE void grpc_lb_v1_ClientStats_set_num_calls_finished_known_received(grpc_lb_v1_ClientStats *msg, int64_t value) {
221 *UPB_PTR_AT(msg, UPB_SIZE(32, 32), int64_t) = value;
222 }
grpc_lb_v1_ClientStats_mutable_calls_finished_with_drop(grpc_lb_v1_ClientStats * msg,size_t * len)223 UPB_INLINE grpc_lb_v1_ClientStatsPerToken** grpc_lb_v1_ClientStats_mutable_calls_finished_with_drop(grpc_lb_v1_ClientStats *msg, size_t *len) {
224 return (grpc_lb_v1_ClientStatsPerToken**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 48), len);
225 }
grpc_lb_v1_ClientStats_resize_calls_finished_with_drop(grpc_lb_v1_ClientStats * msg,size_t len,upb_arena * arena)226 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) {
227 return (grpc_lb_v1_ClientStatsPerToken**)_upb_array_resize_accessor2(msg, UPB_SIZE(44, 48), len, UPB_SIZE(2, 3), arena);
228 }
grpc_lb_v1_ClientStats_add_calls_finished_with_drop(grpc_lb_v1_ClientStats * msg,upb_arena * arena)229 UPB_INLINE struct grpc_lb_v1_ClientStatsPerToken* grpc_lb_v1_ClientStats_add_calls_finished_with_drop(grpc_lb_v1_ClientStats *msg, upb_arena *arena) {
230 struct grpc_lb_v1_ClientStatsPerToken* sub = (struct grpc_lb_v1_ClientStatsPerToken*)_upb_msg_new(&grpc_lb_v1_ClientStatsPerToken_msginit, arena);
231 bool ok = _upb_array_append_accessor2(
232 msg, UPB_SIZE(44, 48), UPB_SIZE(2, 3), &sub, arena);
233 if (!ok) return NULL;
234 return sub;
235 }
236
237 /* grpc.lb.v1.LoadBalanceResponse */
238
grpc_lb_v1_LoadBalanceResponse_new(upb_arena * arena)239 UPB_INLINE grpc_lb_v1_LoadBalanceResponse *grpc_lb_v1_LoadBalanceResponse_new(upb_arena *arena) {
240 return (grpc_lb_v1_LoadBalanceResponse *)_upb_msg_new(&grpc_lb_v1_LoadBalanceResponse_msginit, arena);
241 }
grpc_lb_v1_LoadBalanceResponse_parse(const char * buf,size_t size,upb_arena * arena)242 UPB_INLINE grpc_lb_v1_LoadBalanceResponse *grpc_lb_v1_LoadBalanceResponse_parse(const char *buf, size_t size,
243 upb_arena *arena) {
244 grpc_lb_v1_LoadBalanceResponse *ret = grpc_lb_v1_LoadBalanceResponse_new(arena);
245 return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_LoadBalanceResponse_msginit, arena)) ? ret : NULL;
246 }
grpc_lb_v1_LoadBalanceResponse_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)247 UPB_INLINE grpc_lb_v1_LoadBalanceResponse *grpc_lb_v1_LoadBalanceResponse_parse_ex(const char *buf, size_t size,
248 upb_arena *arena, int options) {
249 grpc_lb_v1_LoadBalanceResponse *ret = grpc_lb_v1_LoadBalanceResponse_new(arena);
250 return (ret && _upb_decode(buf, size, ret, &grpc_lb_v1_LoadBalanceResponse_msginit, arena, options))
251 ? ret : NULL;
252 }
grpc_lb_v1_LoadBalanceResponse_serialize(const grpc_lb_v1_LoadBalanceResponse * msg,upb_arena * arena,size_t * len)253 UPB_INLINE char *grpc_lb_v1_LoadBalanceResponse_serialize(const grpc_lb_v1_LoadBalanceResponse *msg, upb_arena *arena, size_t *len) {
254 return upb_encode(msg, &grpc_lb_v1_LoadBalanceResponse_msginit, arena, len);
255 }
256
257 typedef enum {
258 grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_initial_response = 1,
259 grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_server_list = 2,
260 grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_fallback_response = 3,
261 grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_NOT_SET = 0
262 } grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_oneofcases;
grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_case(const grpc_lb_v1_LoadBalanceResponse * msg)263 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); }
264
grpc_lb_v1_LoadBalanceResponse_has_initial_response(const grpc_lb_v1_LoadBalanceResponse * msg)265 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; }
grpc_lb_v1_LoadBalanceResponse_initial_response(const grpc_lb_v1_LoadBalanceResponse * msg)266 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); }
grpc_lb_v1_LoadBalanceResponse_has_server_list(const grpc_lb_v1_LoadBalanceResponse * msg)267 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; }
grpc_lb_v1_LoadBalanceResponse_server_list(const grpc_lb_v1_LoadBalanceResponse * msg)268 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); }
grpc_lb_v1_LoadBalanceResponse_has_fallback_response(const grpc_lb_v1_LoadBalanceResponse * msg)269 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; }
grpc_lb_v1_LoadBalanceResponse_fallback_response(const grpc_lb_v1_LoadBalanceResponse * msg)270 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); }
271
grpc_lb_v1_LoadBalanceResponse_set_initial_response(grpc_lb_v1_LoadBalanceResponse * msg,grpc_lb_v1_InitialLoadBalanceResponse * value)272 UPB_INLINE void grpc_lb_v1_LoadBalanceResponse_set_initial_response(grpc_lb_v1_LoadBalanceResponse *msg, grpc_lb_v1_InitialLoadBalanceResponse* value) {
273 UPB_WRITE_ONEOF(msg, grpc_lb_v1_InitialLoadBalanceResponse*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1);
274 }
grpc_lb_v1_LoadBalanceResponse_mutable_initial_response(grpc_lb_v1_LoadBalanceResponse * msg,upb_arena * arena)275 UPB_INLINE struct grpc_lb_v1_InitialLoadBalanceResponse* grpc_lb_v1_LoadBalanceResponse_mutable_initial_response(grpc_lb_v1_LoadBalanceResponse *msg, upb_arena *arena) {
276 struct grpc_lb_v1_InitialLoadBalanceResponse* sub = (struct grpc_lb_v1_InitialLoadBalanceResponse*)grpc_lb_v1_LoadBalanceResponse_initial_response(msg);
277 if (sub == NULL) {
278 sub = (struct grpc_lb_v1_InitialLoadBalanceResponse*)_upb_msg_new(&grpc_lb_v1_InitialLoadBalanceResponse_msginit, arena);
279 if (!sub) return NULL;
280 grpc_lb_v1_LoadBalanceResponse_set_initial_response(msg, sub);
281 }
282 return sub;
283 }
grpc_lb_v1_LoadBalanceResponse_set_server_list(grpc_lb_v1_LoadBalanceResponse * msg,grpc_lb_v1_ServerList * value)284 UPB_INLINE void grpc_lb_v1_LoadBalanceResponse_set_server_list(grpc_lb_v1_LoadBalanceResponse *msg, grpc_lb_v1_ServerList* value) {
285 UPB_WRITE_ONEOF(msg, grpc_lb_v1_ServerList*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2);
286 }
grpc_lb_v1_LoadBalanceResponse_mutable_server_list(grpc_lb_v1_LoadBalanceResponse * msg,upb_arena * arena)287 UPB_INLINE struct grpc_lb_v1_ServerList* grpc_lb_v1_LoadBalanceResponse_mutable_server_list(grpc_lb_v1_LoadBalanceResponse *msg, upb_arena *arena) {
288 struct grpc_lb_v1_ServerList* sub = (struct grpc_lb_v1_ServerList*)grpc_lb_v1_LoadBalanceResponse_server_list(msg);
289 if (sub == NULL) {
290 sub = (struct grpc_lb_v1_ServerList*)_upb_msg_new(&grpc_lb_v1_ServerList_msginit, arena);
291 if (!sub) return NULL;
292 grpc_lb_v1_LoadBalanceResponse_set_server_list(msg, sub);
293 }
294 return sub;
295 }
grpc_lb_v1_LoadBalanceResponse_set_fallback_response(grpc_lb_v1_LoadBalanceResponse * msg,grpc_lb_v1_FallbackResponse * value)296 UPB_INLINE void grpc_lb_v1_LoadBalanceResponse_set_fallback_response(grpc_lb_v1_LoadBalanceResponse *msg, grpc_lb_v1_FallbackResponse* value) {
297 UPB_WRITE_ONEOF(msg, grpc_lb_v1_FallbackResponse*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 3);
298 }
grpc_lb_v1_LoadBalanceResponse_mutable_fallback_response(grpc_lb_v1_LoadBalanceResponse * msg,upb_arena * arena)299 UPB_INLINE struct grpc_lb_v1_FallbackResponse* grpc_lb_v1_LoadBalanceResponse_mutable_fallback_response(grpc_lb_v1_LoadBalanceResponse *msg, upb_arena *arena) {
300 struct grpc_lb_v1_FallbackResponse* sub = (struct grpc_lb_v1_FallbackResponse*)grpc_lb_v1_LoadBalanceResponse_fallback_response(msg);
301 if (sub == NULL) {
302 sub = (struct grpc_lb_v1_FallbackResponse*)_upb_msg_new(&grpc_lb_v1_FallbackResponse_msginit, arena);
303 if (!sub) return NULL;
304 grpc_lb_v1_LoadBalanceResponse_set_fallback_response(msg, sub);
305 }
306 return sub;
307 }
308
309 /* grpc.lb.v1.InitialLoadBalanceResponse */
310
grpc_lb_v1_InitialLoadBalanceResponse_new(upb_arena * arena)311 UPB_INLINE grpc_lb_v1_InitialLoadBalanceResponse *grpc_lb_v1_InitialLoadBalanceResponse_new(upb_arena *arena) {
312 return (grpc_lb_v1_InitialLoadBalanceResponse *)_upb_msg_new(&grpc_lb_v1_InitialLoadBalanceResponse_msginit, arena);
313 }
grpc_lb_v1_InitialLoadBalanceResponse_parse(const char * buf,size_t size,upb_arena * arena)314 UPB_INLINE grpc_lb_v1_InitialLoadBalanceResponse *grpc_lb_v1_InitialLoadBalanceResponse_parse(const char *buf, size_t size,
315 upb_arena *arena) {
316 grpc_lb_v1_InitialLoadBalanceResponse *ret = grpc_lb_v1_InitialLoadBalanceResponse_new(arena);
317 return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_InitialLoadBalanceResponse_msginit, arena)) ? ret : NULL;
318 }
grpc_lb_v1_InitialLoadBalanceResponse_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)319 UPB_INLINE grpc_lb_v1_InitialLoadBalanceResponse *grpc_lb_v1_InitialLoadBalanceResponse_parse_ex(const char *buf, size_t size,
320 upb_arena *arena, int options) {
321 grpc_lb_v1_InitialLoadBalanceResponse *ret = grpc_lb_v1_InitialLoadBalanceResponse_new(arena);
322 return (ret && _upb_decode(buf, size, ret, &grpc_lb_v1_InitialLoadBalanceResponse_msginit, arena, options))
323 ? ret : NULL;
324 }
grpc_lb_v1_InitialLoadBalanceResponse_serialize(const grpc_lb_v1_InitialLoadBalanceResponse * msg,upb_arena * arena,size_t * len)325 UPB_INLINE char *grpc_lb_v1_InitialLoadBalanceResponse_serialize(const grpc_lb_v1_InitialLoadBalanceResponse *msg, upb_arena *arena, size_t *len) {
326 return upb_encode(msg, &grpc_lb_v1_InitialLoadBalanceResponse_msginit, arena, len);
327 }
328
grpc_lb_v1_InitialLoadBalanceResponse_load_balancer_delegate(const grpc_lb_v1_InitialLoadBalanceResponse * msg)329 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); }
grpc_lb_v1_InitialLoadBalanceResponse_has_client_stats_report_interval(const grpc_lb_v1_InitialLoadBalanceResponse * msg)330 UPB_INLINE bool grpc_lb_v1_InitialLoadBalanceResponse_has_client_stats_report_interval(const grpc_lb_v1_InitialLoadBalanceResponse *msg) { return _upb_hasbit(msg, 1); }
grpc_lb_v1_InitialLoadBalanceResponse_client_stats_report_interval(const grpc_lb_v1_InitialLoadBalanceResponse * msg)331 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*); }
332
grpc_lb_v1_InitialLoadBalanceResponse_set_load_balancer_delegate(grpc_lb_v1_InitialLoadBalanceResponse * msg,upb_strview value)333 UPB_INLINE void grpc_lb_v1_InitialLoadBalanceResponse_set_load_balancer_delegate(grpc_lb_v1_InitialLoadBalanceResponse *msg, upb_strview value) {
334 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
335 }
grpc_lb_v1_InitialLoadBalanceResponse_set_client_stats_report_interval(grpc_lb_v1_InitialLoadBalanceResponse * msg,struct google_protobuf_Duration * value)336 UPB_INLINE void grpc_lb_v1_InitialLoadBalanceResponse_set_client_stats_report_interval(grpc_lb_v1_InitialLoadBalanceResponse *msg, struct google_protobuf_Duration* value) {
337 _upb_sethas(msg, 1);
338 *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Duration*) = value;
339 }
grpc_lb_v1_InitialLoadBalanceResponse_mutable_client_stats_report_interval(grpc_lb_v1_InitialLoadBalanceResponse * msg,upb_arena * arena)340 UPB_INLINE struct google_protobuf_Duration* grpc_lb_v1_InitialLoadBalanceResponse_mutable_client_stats_report_interval(grpc_lb_v1_InitialLoadBalanceResponse *msg, upb_arena *arena) {
341 struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)grpc_lb_v1_InitialLoadBalanceResponse_client_stats_report_interval(msg);
342 if (sub == NULL) {
343 sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
344 if (!sub) return NULL;
345 grpc_lb_v1_InitialLoadBalanceResponse_set_client_stats_report_interval(msg, sub);
346 }
347 return sub;
348 }
349
350 /* grpc.lb.v1.ServerList */
351
grpc_lb_v1_ServerList_new(upb_arena * arena)352 UPB_INLINE grpc_lb_v1_ServerList *grpc_lb_v1_ServerList_new(upb_arena *arena) {
353 return (grpc_lb_v1_ServerList *)_upb_msg_new(&grpc_lb_v1_ServerList_msginit, arena);
354 }
grpc_lb_v1_ServerList_parse(const char * buf,size_t size,upb_arena * arena)355 UPB_INLINE grpc_lb_v1_ServerList *grpc_lb_v1_ServerList_parse(const char *buf, size_t size,
356 upb_arena *arena) {
357 grpc_lb_v1_ServerList *ret = grpc_lb_v1_ServerList_new(arena);
358 return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_ServerList_msginit, arena)) ? ret : NULL;
359 }
grpc_lb_v1_ServerList_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)360 UPB_INLINE grpc_lb_v1_ServerList *grpc_lb_v1_ServerList_parse_ex(const char *buf, size_t size,
361 upb_arena *arena, int options) {
362 grpc_lb_v1_ServerList *ret = grpc_lb_v1_ServerList_new(arena);
363 return (ret && _upb_decode(buf, size, ret, &grpc_lb_v1_ServerList_msginit, arena, options))
364 ? ret : NULL;
365 }
grpc_lb_v1_ServerList_serialize(const grpc_lb_v1_ServerList * msg,upb_arena * arena,size_t * len)366 UPB_INLINE char *grpc_lb_v1_ServerList_serialize(const grpc_lb_v1_ServerList *msg, upb_arena *arena, size_t *len) {
367 return upb_encode(msg, &grpc_lb_v1_ServerList_msginit, arena, len);
368 }
369
grpc_lb_v1_ServerList_has_servers(const grpc_lb_v1_ServerList * msg)370 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)); }
grpc_lb_v1_ServerList_servers(const grpc_lb_v1_ServerList * msg,size_t * len)371 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); }
372
grpc_lb_v1_ServerList_mutable_servers(grpc_lb_v1_ServerList * msg,size_t * len)373 UPB_INLINE grpc_lb_v1_Server** grpc_lb_v1_ServerList_mutable_servers(grpc_lb_v1_ServerList *msg, size_t *len) {
374 return (grpc_lb_v1_Server**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
375 }
grpc_lb_v1_ServerList_resize_servers(grpc_lb_v1_ServerList * msg,size_t len,upb_arena * arena)376 UPB_INLINE grpc_lb_v1_Server** grpc_lb_v1_ServerList_resize_servers(grpc_lb_v1_ServerList *msg, size_t len, upb_arena *arena) {
377 return (grpc_lb_v1_Server**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
378 }
grpc_lb_v1_ServerList_add_servers(grpc_lb_v1_ServerList * msg,upb_arena * arena)379 UPB_INLINE struct grpc_lb_v1_Server* grpc_lb_v1_ServerList_add_servers(grpc_lb_v1_ServerList *msg, upb_arena *arena) {
380 struct grpc_lb_v1_Server* sub = (struct grpc_lb_v1_Server*)_upb_msg_new(&grpc_lb_v1_Server_msginit, arena);
381 bool ok = _upb_array_append_accessor2(
382 msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
383 if (!ok) return NULL;
384 return sub;
385 }
386
387 /* grpc.lb.v1.Server */
388
grpc_lb_v1_Server_new(upb_arena * arena)389 UPB_INLINE grpc_lb_v1_Server *grpc_lb_v1_Server_new(upb_arena *arena) {
390 return (grpc_lb_v1_Server *)_upb_msg_new(&grpc_lb_v1_Server_msginit, arena);
391 }
grpc_lb_v1_Server_parse(const char * buf,size_t size,upb_arena * arena)392 UPB_INLINE grpc_lb_v1_Server *grpc_lb_v1_Server_parse(const char *buf, size_t size,
393 upb_arena *arena) {
394 grpc_lb_v1_Server *ret = grpc_lb_v1_Server_new(arena);
395 return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_Server_msginit, arena)) ? ret : NULL;
396 }
grpc_lb_v1_Server_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)397 UPB_INLINE grpc_lb_v1_Server *grpc_lb_v1_Server_parse_ex(const char *buf, size_t size,
398 upb_arena *arena, int options) {
399 grpc_lb_v1_Server *ret = grpc_lb_v1_Server_new(arena);
400 return (ret && _upb_decode(buf, size, ret, &grpc_lb_v1_Server_msginit, arena, options))
401 ? ret : NULL;
402 }
grpc_lb_v1_Server_serialize(const grpc_lb_v1_Server * msg,upb_arena * arena,size_t * len)403 UPB_INLINE char *grpc_lb_v1_Server_serialize(const grpc_lb_v1_Server *msg, upb_arena *arena, size_t *len) {
404 return upb_encode(msg, &grpc_lb_v1_Server_msginit, arena, len);
405 }
406
grpc_lb_v1_Server_ip_address(const grpc_lb_v1_Server * msg)407 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); }
grpc_lb_v1_Server_port(const grpc_lb_v1_Server * msg)408 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); }
grpc_lb_v1_Server_load_balance_token(const grpc_lb_v1_Server * msg)409 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); }
grpc_lb_v1_Server_drop(const grpc_lb_v1_Server * msg)410 UPB_INLINE bool grpc_lb_v1_Server_drop(const grpc_lb_v1_Server *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool); }
411
grpc_lb_v1_Server_set_ip_address(grpc_lb_v1_Server * msg,upb_strview value)412 UPB_INLINE void grpc_lb_v1_Server_set_ip_address(grpc_lb_v1_Server *msg, upb_strview value) {
413 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
414 }
grpc_lb_v1_Server_set_port(grpc_lb_v1_Server * msg,int32_t value)415 UPB_INLINE void grpc_lb_v1_Server_set_port(grpc_lb_v1_Server *msg, int32_t value) {
416 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
417 }
grpc_lb_v1_Server_set_load_balance_token(grpc_lb_v1_Server * msg,upb_strview value)418 UPB_INLINE void grpc_lb_v1_Server_set_load_balance_token(grpc_lb_v1_Server *msg, upb_strview value) {
419 *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview) = value;
420 }
grpc_lb_v1_Server_set_drop(grpc_lb_v1_Server * msg,bool value)421 UPB_INLINE void grpc_lb_v1_Server_set_drop(grpc_lb_v1_Server *msg, bool value) {
422 *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool) = value;
423 }
424
425 /* grpc.lb.v1.FallbackResponse */
426
grpc_lb_v1_FallbackResponse_new(upb_arena * arena)427 UPB_INLINE grpc_lb_v1_FallbackResponse *grpc_lb_v1_FallbackResponse_new(upb_arena *arena) {
428 return (grpc_lb_v1_FallbackResponse *)_upb_msg_new(&grpc_lb_v1_FallbackResponse_msginit, arena);
429 }
grpc_lb_v1_FallbackResponse_parse(const char * buf,size_t size,upb_arena * arena)430 UPB_INLINE grpc_lb_v1_FallbackResponse *grpc_lb_v1_FallbackResponse_parse(const char *buf, size_t size,
431 upb_arena *arena) {
432 grpc_lb_v1_FallbackResponse *ret = grpc_lb_v1_FallbackResponse_new(arena);
433 return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_FallbackResponse_msginit, arena)) ? ret : NULL;
434 }
grpc_lb_v1_FallbackResponse_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)435 UPB_INLINE grpc_lb_v1_FallbackResponse *grpc_lb_v1_FallbackResponse_parse_ex(const char *buf, size_t size,
436 upb_arena *arena, int options) {
437 grpc_lb_v1_FallbackResponse *ret = grpc_lb_v1_FallbackResponse_new(arena);
438 return (ret && _upb_decode(buf, size, ret, &grpc_lb_v1_FallbackResponse_msginit, arena, options))
439 ? ret : NULL;
440 }
grpc_lb_v1_FallbackResponse_serialize(const grpc_lb_v1_FallbackResponse * msg,upb_arena * arena,size_t * len)441 UPB_INLINE char *grpc_lb_v1_FallbackResponse_serialize(const grpc_lb_v1_FallbackResponse *msg, upb_arena *arena, size_t *len) {
442 return upb_encode(msg, &grpc_lb_v1_FallbackResponse_msginit, arena, len);
443 }
444
445
446
447 #ifdef __cplusplus
448 } /* extern "C" */
449 #endif
450
451 #include "upb/port_undef.inc"
452
453 #endif /* SRC_PROTO_GRPC_LB_V1_LOAD_BALANCER_PROTO_UPB_H_ */
454