1 /* This file was generated by upbc (the upb compiler) from the input
2 * file:
3 *
4 * envoy/config/endpoint/v3/endpoint_components.proto
5 *
6 * Do not edit -- your changes will be discarded when the file is
7 * regenerated. */
8
9 #ifndef ENVOY_CONFIG_ENDPOINT_V3_ENDPOINT_COMPONENTS_PROTO_UPB_H_
10 #define ENVOY_CONFIG_ENDPOINT_V3_ENDPOINT_COMPONENTS_PROTO_UPB_H_
11
12 #include "upb/collections/array_internal.h"
13 #include "upb/collections/map_gencode_util.h"
14 #include "upb/message/accessors.h"
15 #include "upb/message/internal.h"
16 #include "upb/mini_table/enum_internal.h"
17 #include "upb/wire/decode.h"
18 #include "upb/wire/decode_fast.h"
19 #include "upb/wire/encode.h"
20
21 // Must be last.
22 #include "upb/port/def.inc"
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 typedef struct envoy_config_endpoint_v3_Endpoint envoy_config_endpoint_v3_Endpoint;
29 typedef struct envoy_config_endpoint_v3_Endpoint_HealthCheckConfig envoy_config_endpoint_v3_Endpoint_HealthCheckConfig;
30 typedef struct envoy_config_endpoint_v3_LbEndpoint envoy_config_endpoint_v3_LbEndpoint;
31 typedef struct envoy_config_endpoint_v3_LedsClusterLocalityConfig envoy_config_endpoint_v3_LedsClusterLocalityConfig;
32 typedef struct envoy_config_endpoint_v3_LocalityLbEndpoints envoy_config_endpoint_v3_LocalityLbEndpoints;
33 typedef struct envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList;
34 extern const upb_MiniTable envoy_config_endpoint_v3_Endpoint_msg_init;
35 extern const upb_MiniTable envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_msg_init;
36 extern const upb_MiniTable envoy_config_endpoint_v3_LbEndpoint_msg_init;
37 extern const upb_MiniTable envoy_config_endpoint_v3_LedsClusterLocalityConfig_msg_init;
38 extern const upb_MiniTable envoy_config_endpoint_v3_LocalityLbEndpoints_msg_init;
39 extern const upb_MiniTable envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_msg_init;
40 struct envoy_config_core_v3_Address;
41 struct envoy_config_core_v3_ConfigSource;
42 struct envoy_config_core_v3_Locality;
43 struct envoy_config_core_v3_Metadata;
44 struct google_protobuf_UInt32Value;
45 extern const upb_MiniTable envoy_config_core_v3_Address_msg_init;
46 extern const upb_MiniTable envoy_config_core_v3_ConfigSource_msg_init;
47 extern const upb_MiniTable envoy_config_core_v3_Locality_msg_init;
48 extern const upb_MiniTable envoy_config_core_v3_Metadata_msg_init;
49 extern const upb_MiniTable google_protobuf_UInt32Value_msg_init;
50
51
52
53 /* envoy.config.endpoint.v3.Endpoint */
54
envoy_config_endpoint_v3_Endpoint_new(upb_Arena * arena)55 UPB_INLINE envoy_config_endpoint_v3_Endpoint* envoy_config_endpoint_v3_Endpoint_new(upb_Arena* arena) {
56 return (envoy_config_endpoint_v3_Endpoint*)_upb_Message_New(&envoy_config_endpoint_v3_Endpoint_msg_init, arena);
57 }
envoy_config_endpoint_v3_Endpoint_parse(const char * buf,size_t size,upb_Arena * arena)58 UPB_INLINE envoy_config_endpoint_v3_Endpoint* envoy_config_endpoint_v3_Endpoint_parse(const char* buf, size_t size, upb_Arena* arena) {
59 envoy_config_endpoint_v3_Endpoint* ret = envoy_config_endpoint_v3_Endpoint_new(arena);
60 if (!ret) return NULL;
61 if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_Endpoint_msg_init, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
62 return NULL;
63 }
64 return ret;
65 }
envoy_config_endpoint_v3_Endpoint_parse_ex(const char * buf,size_t size,const upb_ExtensionRegistry * extreg,int options,upb_Arena * arena)66 UPB_INLINE envoy_config_endpoint_v3_Endpoint* envoy_config_endpoint_v3_Endpoint_parse_ex(const char* buf, size_t size,
67 const upb_ExtensionRegistry* extreg,
68 int options, upb_Arena* arena) {
69 envoy_config_endpoint_v3_Endpoint* ret = envoy_config_endpoint_v3_Endpoint_new(arena);
70 if (!ret) return NULL;
71 if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_Endpoint_msg_init, extreg, options, arena) !=
72 kUpb_DecodeStatus_Ok) {
73 return NULL;
74 }
75 return ret;
76 }
envoy_config_endpoint_v3_Endpoint_serialize(const envoy_config_endpoint_v3_Endpoint * msg,upb_Arena * arena,size_t * len)77 UPB_INLINE char* envoy_config_endpoint_v3_Endpoint_serialize(const envoy_config_endpoint_v3_Endpoint* msg, upb_Arena* arena, size_t* len) {
78 char* ptr;
79 (void)upb_Encode(msg, &envoy_config_endpoint_v3_Endpoint_msg_init, 0, arena, &ptr, len);
80 return ptr;
81 }
envoy_config_endpoint_v3_Endpoint_serialize_ex(const envoy_config_endpoint_v3_Endpoint * msg,int options,upb_Arena * arena,size_t * len)82 UPB_INLINE char* envoy_config_endpoint_v3_Endpoint_serialize_ex(const envoy_config_endpoint_v3_Endpoint* msg, int options,
83 upb_Arena* arena, size_t* len) {
84 char* ptr;
85 (void)upb_Encode(msg, &envoy_config_endpoint_v3_Endpoint_msg_init, options, arena, &ptr, len);
86 return ptr;
87 }
envoy_config_endpoint_v3_Endpoint_clear_address(envoy_config_endpoint_v3_Endpoint * msg)88 UPB_INLINE void envoy_config_endpoint_v3_Endpoint_clear_address(envoy_config_endpoint_v3_Endpoint* msg) {
89 const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 1, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
90 _upb_Message_ClearNonExtensionField(msg, &field);
91 }
envoy_config_endpoint_v3_Endpoint_address(const envoy_config_endpoint_v3_Endpoint * msg)92 UPB_INLINE const struct envoy_config_core_v3_Address* envoy_config_endpoint_v3_Endpoint_address(const envoy_config_endpoint_v3_Endpoint* msg) {
93 const struct envoy_config_core_v3_Address* default_val = NULL;
94 const struct envoy_config_core_v3_Address* ret;
95 const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 1, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
96 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
97 return ret;
98 }
envoy_config_endpoint_v3_Endpoint_has_address(const envoy_config_endpoint_v3_Endpoint * msg)99 UPB_INLINE bool envoy_config_endpoint_v3_Endpoint_has_address(const envoy_config_endpoint_v3_Endpoint* msg) {
100 const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 1, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
101 return _upb_Message_HasNonExtensionField(msg, &field);
102 }
envoy_config_endpoint_v3_Endpoint_clear_health_check_config(envoy_config_endpoint_v3_Endpoint * msg)103 UPB_INLINE void envoy_config_endpoint_v3_Endpoint_clear_health_check_config(envoy_config_endpoint_v3_Endpoint* msg) {
104 const upb_MiniTableField field = {2, UPB_SIZE(8, 16), 2, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
105 _upb_Message_ClearNonExtensionField(msg, &field);
106 }
envoy_config_endpoint_v3_Endpoint_health_check_config(const envoy_config_endpoint_v3_Endpoint * msg)107 UPB_INLINE const envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* envoy_config_endpoint_v3_Endpoint_health_check_config(const envoy_config_endpoint_v3_Endpoint* msg) {
108 const envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* default_val = NULL;
109 const envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* ret;
110 const upb_MiniTableField field = {2, UPB_SIZE(8, 16), 2, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
111 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
112 return ret;
113 }
envoy_config_endpoint_v3_Endpoint_has_health_check_config(const envoy_config_endpoint_v3_Endpoint * msg)114 UPB_INLINE bool envoy_config_endpoint_v3_Endpoint_has_health_check_config(const envoy_config_endpoint_v3_Endpoint* msg) {
115 const upb_MiniTableField field = {2, UPB_SIZE(8, 16), 2, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
116 return _upb_Message_HasNonExtensionField(msg, &field);
117 }
envoy_config_endpoint_v3_Endpoint_clear_hostname(envoy_config_endpoint_v3_Endpoint * msg)118 UPB_INLINE void envoy_config_endpoint_v3_Endpoint_clear_hostname(envoy_config_endpoint_v3_Endpoint* msg) {
119 const upb_MiniTableField field = {3, UPB_SIZE(12, 24), 0, kUpb_NoSub, 9, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
120 _upb_Message_ClearNonExtensionField(msg, &field);
121 }
envoy_config_endpoint_v3_Endpoint_hostname(const envoy_config_endpoint_v3_Endpoint * msg)122 UPB_INLINE upb_StringView envoy_config_endpoint_v3_Endpoint_hostname(const envoy_config_endpoint_v3_Endpoint* msg) {
123 upb_StringView default_val = upb_StringView_FromString("");
124 upb_StringView ret;
125 const upb_MiniTableField field = {3, UPB_SIZE(12, 24), 0, kUpb_NoSub, 9, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
126 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
127 return ret;
128 }
129
envoy_config_endpoint_v3_Endpoint_set_address(envoy_config_endpoint_v3_Endpoint * msg,struct envoy_config_core_v3_Address * value)130 UPB_INLINE void envoy_config_endpoint_v3_Endpoint_set_address(envoy_config_endpoint_v3_Endpoint *msg, struct envoy_config_core_v3_Address* value) {
131 const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 1, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
132 _upb_Message_SetNonExtensionField(msg, &field, &value);
133 }
envoy_config_endpoint_v3_Endpoint_mutable_address(envoy_config_endpoint_v3_Endpoint * msg,upb_Arena * arena)134 UPB_INLINE struct envoy_config_core_v3_Address* envoy_config_endpoint_v3_Endpoint_mutable_address(envoy_config_endpoint_v3_Endpoint* msg, upb_Arena* arena) {
135 struct envoy_config_core_v3_Address* sub = (struct envoy_config_core_v3_Address*)envoy_config_endpoint_v3_Endpoint_address(msg);
136 if (sub == NULL) {
137 sub = (struct envoy_config_core_v3_Address*)_upb_Message_New(&envoy_config_core_v3_Address_msg_init, arena);
138 if (sub) envoy_config_endpoint_v3_Endpoint_set_address(msg, sub);
139 }
140 return sub;
141 }
envoy_config_endpoint_v3_Endpoint_set_health_check_config(envoy_config_endpoint_v3_Endpoint * msg,envoy_config_endpoint_v3_Endpoint_HealthCheckConfig * value)142 UPB_INLINE void envoy_config_endpoint_v3_Endpoint_set_health_check_config(envoy_config_endpoint_v3_Endpoint *msg, envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* value) {
143 const upb_MiniTableField field = {2, UPB_SIZE(8, 16), 2, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
144 _upb_Message_SetNonExtensionField(msg, &field, &value);
145 }
envoy_config_endpoint_v3_Endpoint_mutable_health_check_config(envoy_config_endpoint_v3_Endpoint * msg,upb_Arena * arena)146 UPB_INLINE struct envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* envoy_config_endpoint_v3_Endpoint_mutable_health_check_config(envoy_config_endpoint_v3_Endpoint* msg, upb_Arena* arena) {
147 struct envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* sub = (struct envoy_config_endpoint_v3_Endpoint_HealthCheckConfig*)envoy_config_endpoint_v3_Endpoint_health_check_config(msg);
148 if (sub == NULL) {
149 sub = (struct envoy_config_endpoint_v3_Endpoint_HealthCheckConfig*)_upb_Message_New(&envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_msg_init, arena);
150 if (sub) envoy_config_endpoint_v3_Endpoint_set_health_check_config(msg, sub);
151 }
152 return sub;
153 }
envoy_config_endpoint_v3_Endpoint_set_hostname(envoy_config_endpoint_v3_Endpoint * msg,upb_StringView value)154 UPB_INLINE void envoy_config_endpoint_v3_Endpoint_set_hostname(envoy_config_endpoint_v3_Endpoint *msg, upb_StringView value) {
155 const upb_MiniTableField field = {3, UPB_SIZE(12, 24), 0, kUpb_NoSub, 9, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
156 _upb_Message_SetNonExtensionField(msg, &field, &value);
157 }
158
159 /* envoy.config.endpoint.v3.Endpoint.HealthCheckConfig */
160
envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_new(upb_Arena * arena)161 UPB_INLINE envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_new(upb_Arena* arena) {
162 return (envoy_config_endpoint_v3_Endpoint_HealthCheckConfig*)_upb_Message_New(&envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_msg_init, arena);
163 }
envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_parse(const char * buf,size_t size,upb_Arena * arena)164 UPB_INLINE envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_parse(const char* buf, size_t size, upb_Arena* arena) {
165 envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* ret = envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_new(arena);
166 if (!ret) return NULL;
167 if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_msg_init, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
168 return NULL;
169 }
170 return ret;
171 }
envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_parse_ex(const char * buf,size_t size,const upb_ExtensionRegistry * extreg,int options,upb_Arena * arena)172 UPB_INLINE envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_parse_ex(const char* buf, size_t size,
173 const upb_ExtensionRegistry* extreg,
174 int options, upb_Arena* arena) {
175 envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* ret = envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_new(arena);
176 if (!ret) return NULL;
177 if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_msg_init, extreg, options, arena) !=
178 kUpb_DecodeStatus_Ok) {
179 return NULL;
180 }
181 return ret;
182 }
envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_serialize(const envoy_config_endpoint_v3_Endpoint_HealthCheckConfig * msg,upb_Arena * arena,size_t * len)183 UPB_INLINE char* envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_serialize(const envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* msg, upb_Arena* arena, size_t* len) {
184 char* ptr;
185 (void)upb_Encode(msg, &envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_msg_init, 0, arena, &ptr, len);
186 return ptr;
187 }
envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_serialize_ex(const envoy_config_endpoint_v3_Endpoint_HealthCheckConfig * msg,int options,upb_Arena * arena,size_t * len)188 UPB_INLINE char* envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_serialize_ex(const envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* msg, int options,
189 upb_Arena* arena, size_t* len) {
190 char* ptr;
191 (void)upb_Encode(msg, &envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_msg_init, options, arena, &ptr, len);
192 return ptr;
193 }
envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_clear_port_value(envoy_config_endpoint_v3_Endpoint_HealthCheckConfig * msg)194 UPB_INLINE void envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_clear_port_value(envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* msg) {
195 const upb_MiniTableField field = {1, 4, 0, kUpb_NoSub, 13, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)};
196 _upb_Message_ClearNonExtensionField(msg, &field);
197 }
envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_port_value(const envoy_config_endpoint_v3_Endpoint_HealthCheckConfig * msg)198 UPB_INLINE uint32_t envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_port_value(const envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* msg) {
199 uint32_t default_val = (uint32_t)0u;
200 uint32_t ret;
201 const upb_MiniTableField field = {1, 4, 0, kUpb_NoSub, 13, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)};
202 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
203 return ret;
204 }
envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_clear_hostname(envoy_config_endpoint_v3_Endpoint_HealthCheckConfig * msg)205 UPB_INLINE void envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_clear_hostname(envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* msg) {
206 const upb_MiniTableField field = {2, 16, 0, kUpb_NoSub, 9, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
207 _upb_Message_ClearNonExtensionField(msg, &field);
208 }
envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_hostname(const envoy_config_endpoint_v3_Endpoint_HealthCheckConfig * msg)209 UPB_INLINE upb_StringView envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_hostname(const envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* msg) {
210 upb_StringView default_val = upb_StringView_FromString("");
211 upb_StringView ret;
212 const upb_MiniTableField field = {2, 16, 0, kUpb_NoSub, 9, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
213 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
214 return ret;
215 }
envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_clear_address(envoy_config_endpoint_v3_Endpoint_HealthCheckConfig * msg)216 UPB_INLINE void envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_clear_address(envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* msg) {
217 const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 1, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
218 _upb_Message_ClearNonExtensionField(msg, &field);
219 }
envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_address(const envoy_config_endpoint_v3_Endpoint_HealthCheckConfig * msg)220 UPB_INLINE const struct envoy_config_core_v3_Address* envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_address(const envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* msg) {
221 const struct envoy_config_core_v3_Address* default_val = NULL;
222 const struct envoy_config_core_v3_Address* ret;
223 const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 1, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
224 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
225 return ret;
226 }
envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_has_address(const envoy_config_endpoint_v3_Endpoint_HealthCheckConfig * msg)227 UPB_INLINE bool envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_has_address(const envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* msg) {
228 const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 1, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
229 return _upb_Message_HasNonExtensionField(msg, &field);
230 }
envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_clear_disable_active_health_check(envoy_config_endpoint_v3_Endpoint_HealthCheckConfig * msg)231 UPB_INLINE void envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_clear_disable_active_health_check(envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* msg) {
232 const upb_MiniTableField field = {4, UPB_SIZE(12, 8), 0, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)};
233 _upb_Message_ClearNonExtensionField(msg, &field);
234 }
envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_disable_active_health_check(const envoy_config_endpoint_v3_Endpoint_HealthCheckConfig * msg)235 UPB_INLINE bool envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_disable_active_health_check(const envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* msg) {
236 bool default_val = false;
237 bool ret;
238 const upb_MiniTableField field = {4, UPB_SIZE(12, 8), 0, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)};
239 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
240 return ret;
241 }
242
envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_set_port_value(envoy_config_endpoint_v3_Endpoint_HealthCheckConfig * msg,uint32_t value)243 UPB_INLINE void envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_set_port_value(envoy_config_endpoint_v3_Endpoint_HealthCheckConfig *msg, uint32_t value) {
244 const upb_MiniTableField field = {1, 4, 0, kUpb_NoSub, 13, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)};
245 _upb_Message_SetNonExtensionField(msg, &field, &value);
246 }
envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_set_hostname(envoy_config_endpoint_v3_Endpoint_HealthCheckConfig * msg,upb_StringView value)247 UPB_INLINE void envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_set_hostname(envoy_config_endpoint_v3_Endpoint_HealthCheckConfig *msg, upb_StringView value) {
248 const upb_MiniTableField field = {2, 16, 0, kUpb_NoSub, 9, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
249 _upb_Message_SetNonExtensionField(msg, &field, &value);
250 }
envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_set_address(envoy_config_endpoint_v3_Endpoint_HealthCheckConfig * msg,struct envoy_config_core_v3_Address * value)251 UPB_INLINE void envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_set_address(envoy_config_endpoint_v3_Endpoint_HealthCheckConfig *msg, struct envoy_config_core_v3_Address* value) {
252 const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 1, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
253 _upb_Message_SetNonExtensionField(msg, &field, &value);
254 }
envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_mutable_address(envoy_config_endpoint_v3_Endpoint_HealthCheckConfig * msg,upb_Arena * arena)255 UPB_INLINE struct envoy_config_core_v3_Address* envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_mutable_address(envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* msg, upb_Arena* arena) {
256 struct envoy_config_core_v3_Address* sub = (struct envoy_config_core_v3_Address*)envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_address(msg);
257 if (sub == NULL) {
258 sub = (struct envoy_config_core_v3_Address*)_upb_Message_New(&envoy_config_core_v3_Address_msg_init, arena);
259 if (sub) envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_set_address(msg, sub);
260 }
261 return sub;
262 }
envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_set_disable_active_health_check(envoy_config_endpoint_v3_Endpoint_HealthCheckConfig * msg,bool value)263 UPB_INLINE void envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_set_disable_active_health_check(envoy_config_endpoint_v3_Endpoint_HealthCheckConfig *msg, bool value) {
264 const upb_MiniTableField field = {4, UPB_SIZE(12, 8), 0, kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)};
265 _upb_Message_SetNonExtensionField(msg, &field, &value);
266 }
267
268 /* envoy.config.endpoint.v3.LbEndpoint */
269
envoy_config_endpoint_v3_LbEndpoint_new(upb_Arena * arena)270 UPB_INLINE envoy_config_endpoint_v3_LbEndpoint* envoy_config_endpoint_v3_LbEndpoint_new(upb_Arena* arena) {
271 return (envoy_config_endpoint_v3_LbEndpoint*)_upb_Message_New(&envoy_config_endpoint_v3_LbEndpoint_msg_init, arena);
272 }
envoy_config_endpoint_v3_LbEndpoint_parse(const char * buf,size_t size,upb_Arena * arena)273 UPB_INLINE envoy_config_endpoint_v3_LbEndpoint* envoy_config_endpoint_v3_LbEndpoint_parse(const char* buf, size_t size, upb_Arena* arena) {
274 envoy_config_endpoint_v3_LbEndpoint* ret = envoy_config_endpoint_v3_LbEndpoint_new(arena);
275 if (!ret) return NULL;
276 if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_LbEndpoint_msg_init, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
277 return NULL;
278 }
279 return ret;
280 }
envoy_config_endpoint_v3_LbEndpoint_parse_ex(const char * buf,size_t size,const upb_ExtensionRegistry * extreg,int options,upb_Arena * arena)281 UPB_INLINE envoy_config_endpoint_v3_LbEndpoint* envoy_config_endpoint_v3_LbEndpoint_parse_ex(const char* buf, size_t size,
282 const upb_ExtensionRegistry* extreg,
283 int options, upb_Arena* arena) {
284 envoy_config_endpoint_v3_LbEndpoint* ret = envoy_config_endpoint_v3_LbEndpoint_new(arena);
285 if (!ret) return NULL;
286 if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_LbEndpoint_msg_init, extreg, options, arena) !=
287 kUpb_DecodeStatus_Ok) {
288 return NULL;
289 }
290 return ret;
291 }
envoy_config_endpoint_v3_LbEndpoint_serialize(const envoy_config_endpoint_v3_LbEndpoint * msg,upb_Arena * arena,size_t * len)292 UPB_INLINE char* envoy_config_endpoint_v3_LbEndpoint_serialize(const envoy_config_endpoint_v3_LbEndpoint* msg, upb_Arena* arena, size_t* len) {
293 char* ptr;
294 (void)upb_Encode(msg, &envoy_config_endpoint_v3_LbEndpoint_msg_init, 0, arena, &ptr, len);
295 return ptr;
296 }
envoy_config_endpoint_v3_LbEndpoint_serialize_ex(const envoy_config_endpoint_v3_LbEndpoint * msg,int options,upb_Arena * arena,size_t * len)297 UPB_INLINE char* envoy_config_endpoint_v3_LbEndpoint_serialize_ex(const envoy_config_endpoint_v3_LbEndpoint* msg, int options,
298 upb_Arena* arena, size_t* len) {
299 char* ptr;
300 (void)upb_Encode(msg, &envoy_config_endpoint_v3_LbEndpoint_msg_init, options, arena, &ptr, len);
301 return ptr;
302 }
303 typedef enum {
304 envoy_config_endpoint_v3_LbEndpoint_host_identifier_endpoint = 1,
305 envoy_config_endpoint_v3_LbEndpoint_host_identifier_endpoint_name = 5,
306 envoy_config_endpoint_v3_LbEndpoint_host_identifier_NOT_SET = 0
307 } envoy_config_endpoint_v3_LbEndpoint_host_identifier_oneofcases;
envoy_config_endpoint_v3_LbEndpoint_host_identifier_case(const envoy_config_endpoint_v3_LbEndpoint * msg)308 UPB_INLINE envoy_config_endpoint_v3_LbEndpoint_host_identifier_oneofcases envoy_config_endpoint_v3_LbEndpoint_host_identifier_case(const envoy_config_endpoint_v3_LbEndpoint* msg) {
309 const upb_MiniTableField field = {1, UPB_SIZE(20, 16), UPB_SIZE(-17, -9), 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
310 return (envoy_config_endpoint_v3_LbEndpoint_host_identifier_oneofcases)upb_Message_WhichOneofFieldNumber(msg, &field);
311 }
envoy_config_endpoint_v3_LbEndpoint_clear_endpoint(envoy_config_endpoint_v3_LbEndpoint * msg)312 UPB_INLINE void envoy_config_endpoint_v3_LbEndpoint_clear_endpoint(envoy_config_endpoint_v3_LbEndpoint* msg) {
313 const upb_MiniTableField field = {1, UPB_SIZE(20, 16), UPB_SIZE(-17, -9), 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
314 _upb_Message_ClearNonExtensionField(msg, &field);
315 }
envoy_config_endpoint_v3_LbEndpoint_endpoint(const envoy_config_endpoint_v3_LbEndpoint * msg)316 UPB_INLINE const envoy_config_endpoint_v3_Endpoint* envoy_config_endpoint_v3_LbEndpoint_endpoint(const envoy_config_endpoint_v3_LbEndpoint* msg) {
317 const envoy_config_endpoint_v3_Endpoint* default_val = NULL;
318 const envoy_config_endpoint_v3_Endpoint* ret;
319 const upb_MiniTableField field = {1, UPB_SIZE(20, 16), UPB_SIZE(-17, -9), 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
320 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
321 return ret;
322 }
envoy_config_endpoint_v3_LbEndpoint_has_endpoint(const envoy_config_endpoint_v3_LbEndpoint * msg)323 UPB_INLINE bool envoy_config_endpoint_v3_LbEndpoint_has_endpoint(const envoy_config_endpoint_v3_LbEndpoint* msg) {
324 const upb_MiniTableField field = {1, UPB_SIZE(20, 16), UPB_SIZE(-17, -9), 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
325 return _upb_Message_HasNonExtensionField(msg, &field);
326 }
envoy_config_endpoint_v3_LbEndpoint_clear_health_status(envoy_config_endpoint_v3_LbEndpoint * msg)327 UPB_INLINE void envoy_config_endpoint_v3_LbEndpoint_clear_health_status(envoy_config_endpoint_v3_LbEndpoint* msg) {
328 const upb_MiniTableField field = {2, 4, 0, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)};
329 _upb_Message_ClearNonExtensionField(msg, &field);
330 }
envoy_config_endpoint_v3_LbEndpoint_health_status(const envoy_config_endpoint_v3_LbEndpoint * msg)331 UPB_INLINE int32_t envoy_config_endpoint_v3_LbEndpoint_health_status(const envoy_config_endpoint_v3_LbEndpoint* msg) {
332 int32_t default_val = 0;
333 int32_t ret;
334 const upb_MiniTableField field = {2, 4, 0, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)};
335 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
336 return ret;
337 }
envoy_config_endpoint_v3_LbEndpoint_clear_metadata(envoy_config_endpoint_v3_LbEndpoint * msg)338 UPB_INLINE void envoy_config_endpoint_v3_LbEndpoint_clear_metadata(envoy_config_endpoint_v3_LbEndpoint* msg) {
339 const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 1, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
340 _upb_Message_ClearNonExtensionField(msg, &field);
341 }
envoy_config_endpoint_v3_LbEndpoint_metadata(const envoy_config_endpoint_v3_LbEndpoint * msg)342 UPB_INLINE const struct envoy_config_core_v3_Metadata* envoy_config_endpoint_v3_LbEndpoint_metadata(const envoy_config_endpoint_v3_LbEndpoint* msg) {
343 const struct envoy_config_core_v3_Metadata* default_val = NULL;
344 const struct envoy_config_core_v3_Metadata* ret;
345 const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 1, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
346 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
347 return ret;
348 }
envoy_config_endpoint_v3_LbEndpoint_has_metadata(const envoy_config_endpoint_v3_LbEndpoint * msg)349 UPB_INLINE bool envoy_config_endpoint_v3_LbEndpoint_has_metadata(const envoy_config_endpoint_v3_LbEndpoint* msg) {
350 const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 1, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
351 return _upb_Message_HasNonExtensionField(msg, &field);
352 }
envoy_config_endpoint_v3_LbEndpoint_clear_load_balancing_weight(envoy_config_endpoint_v3_LbEndpoint * msg)353 UPB_INLINE void envoy_config_endpoint_v3_LbEndpoint_clear_load_balancing_weight(envoy_config_endpoint_v3_LbEndpoint* msg) {
354 const upb_MiniTableField field = {4, UPB_SIZE(12, 40), 2, 2, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
355 _upb_Message_ClearNonExtensionField(msg, &field);
356 }
envoy_config_endpoint_v3_LbEndpoint_load_balancing_weight(const envoy_config_endpoint_v3_LbEndpoint * msg)357 UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_endpoint_v3_LbEndpoint_load_balancing_weight(const envoy_config_endpoint_v3_LbEndpoint* msg) {
358 const struct google_protobuf_UInt32Value* default_val = NULL;
359 const struct google_protobuf_UInt32Value* ret;
360 const upb_MiniTableField field = {4, UPB_SIZE(12, 40), 2, 2, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
361 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
362 return ret;
363 }
envoy_config_endpoint_v3_LbEndpoint_has_load_balancing_weight(const envoy_config_endpoint_v3_LbEndpoint * msg)364 UPB_INLINE bool envoy_config_endpoint_v3_LbEndpoint_has_load_balancing_weight(const envoy_config_endpoint_v3_LbEndpoint* msg) {
365 const upb_MiniTableField field = {4, UPB_SIZE(12, 40), 2, 2, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
366 return _upb_Message_HasNonExtensionField(msg, &field);
367 }
envoy_config_endpoint_v3_LbEndpoint_clear_endpoint_name(envoy_config_endpoint_v3_LbEndpoint * msg)368 UPB_INLINE void envoy_config_endpoint_v3_LbEndpoint_clear_endpoint_name(envoy_config_endpoint_v3_LbEndpoint* msg) {
369 const upb_MiniTableField field = {5, UPB_SIZE(20, 16), UPB_SIZE(-17, -9), kUpb_NoSub, 9, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
370 _upb_Message_ClearNonExtensionField(msg, &field);
371 }
envoy_config_endpoint_v3_LbEndpoint_endpoint_name(const envoy_config_endpoint_v3_LbEndpoint * msg)372 UPB_INLINE upb_StringView envoy_config_endpoint_v3_LbEndpoint_endpoint_name(const envoy_config_endpoint_v3_LbEndpoint* msg) {
373 upb_StringView default_val = upb_StringView_FromString("");
374 upb_StringView ret;
375 const upb_MiniTableField field = {5, UPB_SIZE(20, 16), UPB_SIZE(-17, -9), kUpb_NoSub, 9, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
376 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
377 return ret;
378 }
envoy_config_endpoint_v3_LbEndpoint_has_endpoint_name(const envoy_config_endpoint_v3_LbEndpoint * msg)379 UPB_INLINE bool envoy_config_endpoint_v3_LbEndpoint_has_endpoint_name(const envoy_config_endpoint_v3_LbEndpoint* msg) {
380 const upb_MiniTableField field = {5, UPB_SIZE(20, 16), UPB_SIZE(-17, -9), kUpb_NoSub, 9, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
381 return _upb_Message_HasNonExtensionField(msg, &field);
382 }
383
envoy_config_endpoint_v3_LbEndpoint_set_endpoint(envoy_config_endpoint_v3_LbEndpoint * msg,envoy_config_endpoint_v3_Endpoint * value)384 UPB_INLINE void envoy_config_endpoint_v3_LbEndpoint_set_endpoint(envoy_config_endpoint_v3_LbEndpoint *msg, envoy_config_endpoint_v3_Endpoint* value) {
385 const upb_MiniTableField field = {1, UPB_SIZE(20, 16), UPB_SIZE(-17, -9), 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
386 _upb_Message_SetNonExtensionField(msg, &field, &value);
387 }
envoy_config_endpoint_v3_LbEndpoint_mutable_endpoint(envoy_config_endpoint_v3_LbEndpoint * msg,upb_Arena * arena)388 UPB_INLINE struct envoy_config_endpoint_v3_Endpoint* envoy_config_endpoint_v3_LbEndpoint_mutable_endpoint(envoy_config_endpoint_v3_LbEndpoint* msg, upb_Arena* arena) {
389 struct envoy_config_endpoint_v3_Endpoint* sub = (struct envoy_config_endpoint_v3_Endpoint*)envoy_config_endpoint_v3_LbEndpoint_endpoint(msg);
390 if (sub == NULL) {
391 sub = (struct envoy_config_endpoint_v3_Endpoint*)_upb_Message_New(&envoy_config_endpoint_v3_Endpoint_msg_init, arena);
392 if (sub) envoy_config_endpoint_v3_LbEndpoint_set_endpoint(msg, sub);
393 }
394 return sub;
395 }
envoy_config_endpoint_v3_LbEndpoint_set_health_status(envoy_config_endpoint_v3_LbEndpoint * msg,int32_t value)396 UPB_INLINE void envoy_config_endpoint_v3_LbEndpoint_set_health_status(envoy_config_endpoint_v3_LbEndpoint *msg, int32_t value) {
397 const upb_MiniTableField field = {2, 4, 0, kUpb_NoSub, 5, kUpb_FieldMode_Scalar | kUpb_LabelFlags_IsAlternate | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)};
398 _upb_Message_SetNonExtensionField(msg, &field, &value);
399 }
envoy_config_endpoint_v3_LbEndpoint_set_metadata(envoy_config_endpoint_v3_LbEndpoint * msg,struct envoy_config_core_v3_Metadata * value)400 UPB_INLINE void envoy_config_endpoint_v3_LbEndpoint_set_metadata(envoy_config_endpoint_v3_LbEndpoint *msg, struct envoy_config_core_v3_Metadata* value) {
401 const upb_MiniTableField field = {3, UPB_SIZE(8, 32), 1, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
402 _upb_Message_SetNonExtensionField(msg, &field, &value);
403 }
envoy_config_endpoint_v3_LbEndpoint_mutable_metadata(envoy_config_endpoint_v3_LbEndpoint * msg,upb_Arena * arena)404 UPB_INLINE struct envoy_config_core_v3_Metadata* envoy_config_endpoint_v3_LbEndpoint_mutable_metadata(envoy_config_endpoint_v3_LbEndpoint* msg, upb_Arena* arena) {
405 struct envoy_config_core_v3_Metadata* sub = (struct envoy_config_core_v3_Metadata*)envoy_config_endpoint_v3_LbEndpoint_metadata(msg);
406 if (sub == NULL) {
407 sub = (struct envoy_config_core_v3_Metadata*)_upb_Message_New(&envoy_config_core_v3_Metadata_msg_init, arena);
408 if (sub) envoy_config_endpoint_v3_LbEndpoint_set_metadata(msg, sub);
409 }
410 return sub;
411 }
envoy_config_endpoint_v3_LbEndpoint_set_load_balancing_weight(envoy_config_endpoint_v3_LbEndpoint * msg,struct google_protobuf_UInt32Value * value)412 UPB_INLINE void envoy_config_endpoint_v3_LbEndpoint_set_load_balancing_weight(envoy_config_endpoint_v3_LbEndpoint *msg, struct google_protobuf_UInt32Value* value) {
413 const upb_MiniTableField field = {4, UPB_SIZE(12, 40), 2, 2, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
414 _upb_Message_SetNonExtensionField(msg, &field, &value);
415 }
envoy_config_endpoint_v3_LbEndpoint_mutable_load_balancing_weight(envoy_config_endpoint_v3_LbEndpoint * msg,upb_Arena * arena)416 UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_endpoint_v3_LbEndpoint_mutable_load_balancing_weight(envoy_config_endpoint_v3_LbEndpoint* msg, upb_Arena* arena) {
417 struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_endpoint_v3_LbEndpoint_load_balancing_weight(msg);
418 if (sub == NULL) {
419 sub = (struct google_protobuf_UInt32Value*)_upb_Message_New(&google_protobuf_UInt32Value_msg_init, arena);
420 if (sub) envoy_config_endpoint_v3_LbEndpoint_set_load_balancing_weight(msg, sub);
421 }
422 return sub;
423 }
envoy_config_endpoint_v3_LbEndpoint_set_endpoint_name(envoy_config_endpoint_v3_LbEndpoint * msg,upb_StringView value)424 UPB_INLINE void envoy_config_endpoint_v3_LbEndpoint_set_endpoint_name(envoy_config_endpoint_v3_LbEndpoint *msg, upb_StringView value) {
425 const upb_MiniTableField field = {5, UPB_SIZE(20, 16), UPB_SIZE(-17, -9), kUpb_NoSub, 9, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
426 _upb_Message_SetNonExtensionField(msg, &field, &value);
427 }
428
429 /* envoy.config.endpoint.v3.LedsClusterLocalityConfig */
430
envoy_config_endpoint_v3_LedsClusterLocalityConfig_new(upb_Arena * arena)431 UPB_INLINE envoy_config_endpoint_v3_LedsClusterLocalityConfig* envoy_config_endpoint_v3_LedsClusterLocalityConfig_new(upb_Arena* arena) {
432 return (envoy_config_endpoint_v3_LedsClusterLocalityConfig*)_upb_Message_New(&envoy_config_endpoint_v3_LedsClusterLocalityConfig_msg_init, arena);
433 }
envoy_config_endpoint_v3_LedsClusterLocalityConfig_parse(const char * buf,size_t size,upb_Arena * arena)434 UPB_INLINE envoy_config_endpoint_v3_LedsClusterLocalityConfig* envoy_config_endpoint_v3_LedsClusterLocalityConfig_parse(const char* buf, size_t size, upb_Arena* arena) {
435 envoy_config_endpoint_v3_LedsClusterLocalityConfig* ret = envoy_config_endpoint_v3_LedsClusterLocalityConfig_new(arena);
436 if (!ret) return NULL;
437 if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_LedsClusterLocalityConfig_msg_init, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
438 return NULL;
439 }
440 return ret;
441 }
envoy_config_endpoint_v3_LedsClusterLocalityConfig_parse_ex(const char * buf,size_t size,const upb_ExtensionRegistry * extreg,int options,upb_Arena * arena)442 UPB_INLINE envoy_config_endpoint_v3_LedsClusterLocalityConfig* envoy_config_endpoint_v3_LedsClusterLocalityConfig_parse_ex(const char* buf, size_t size,
443 const upb_ExtensionRegistry* extreg,
444 int options, upb_Arena* arena) {
445 envoy_config_endpoint_v3_LedsClusterLocalityConfig* ret = envoy_config_endpoint_v3_LedsClusterLocalityConfig_new(arena);
446 if (!ret) return NULL;
447 if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_LedsClusterLocalityConfig_msg_init, extreg, options, arena) !=
448 kUpb_DecodeStatus_Ok) {
449 return NULL;
450 }
451 return ret;
452 }
envoy_config_endpoint_v3_LedsClusterLocalityConfig_serialize(const envoy_config_endpoint_v3_LedsClusterLocalityConfig * msg,upb_Arena * arena,size_t * len)453 UPB_INLINE char* envoy_config_endpoint_v3_LedsClusterLocalityConfig_serialize(const envoy_config_endpoint_v3_LedsClusterLocalityConfig* msg, upb_Arena* arena, size_t* len) {
454 char* ptr;
455 (void)upb_Encode(msg, &envoy_config_endpoint_v3_LedsClusterLocalityConfig_msg_init, 0, arena, &ptr, len);
456 return ptr;
457 }
envoy_config_endpoint_v3_LedsClusterLocalityConfig_serialize_ex(const envoy_config_endpoint_v3_LedsClusterLocalityConfig * msg,int options,upb_Arena * arena,size_t * len)458 UPB_INLINE char* envoy_config_endpoint_v3_LedsClusterLocalityConfig_serialize_ex(const envoy_config_endpoint_v3_LedsClusterLocalityConfig* msg, int options,
459 upb_Arena* arena, size_t* len) {
460 char* ptr;
461 (void)upb_Encode(msg, &envoy_config_endpoint_v3_LedsClusterLocalityConfig_msg_init, options, arena, &ptr, len);
462 return ptr;
463 }
envoy_config_endpoint_v3_LedsClusterLocalityConfig_clear_leds_config(envoy_config_endpoint_v3_LedsClusterLocalityConfig * msg)464 UPB_INLINE void envoy_config_endpoint_v3_LedsClusterLocalityConfig_clear_leds_config(envoy_config_endpoint_v3_LedsClusterLocalityConfig* msg) {
465 const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 1, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
466 _upb_Message_ClearNonExtensionField(msg, &field);
467 }
envoy_config_endpoint_v3_LedsClusterLocalityConfig_leds_config(const envoy_config_endpoint_v3_LedsClusterLocalityConfig * msg)468 UPB_INLINE const struct envoy_config_core_v3_ConfigSource* envoy_config_endpoint_v3_LedsClusterLocalityConfig_leds_config(const envoy_config_endpoint_v3_LedsClusterLocalityConfig* msg) {
469 const struct envoy_config_core_v3_ConfigSource* default_val = NULL;
470 const struct envoy_config_core_v3_ConfigSource* ret;
471 const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 1, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
472 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
473 return ret;
474 }
envoy_config_endpoint_v3_LedsClusterLocalityConfig_has_leds_config(const envoy_config_endpoint_v3_LedsClusterLocalityConfig * msg)475 UPB_INLINE bool envoy_config_endpoint_v3_LedsClusterLocalityConfig_has_leds_config(const envoy_config_endpoint_v3_LedsClusterLocalityConfig* msg) {
476 const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 1, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
477 return _upb_Message_HasNonExtensionField(msg, &field);
478 }
envoy_config_endpoint_v3_LedsClusterLocalityConfig_clear_leds_collection_name(envoy_config_endpoint_v3_LedsClusterLocalityConfig * msg)479 UPB_INLINE void envoy_config_endpoint_v3_LedsClusterLocalityConfig_clear_leds_collection_name(envoy_config_endpoint_v3_LedsClusterLocalityConfig* msg) {
480 const upb_MiniTableField field = {2, UPB_SIZE(8, 16), 0, kUpb_NoSub, 9, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
481 _upb_Message_ClearNonExtensionField(msg, &field);
482 }
envoy_config_endpoint_v3_LedsClusterLocalityConfig_leds_collection_name(const envoy_config_endpoint_v3_LedsClusterLocalityConfig * msg)483 UPB_INLINE upb_StringView envoy_config_endpoint_v3_LedsClusterLocalityConfig_leds_collection_name(const envoy_config_endpoint_v3_LedsClusterLocalityConfig* msg) {
484 upb_StringView default_val = upb_StringView_FromString("");
485 upb_StringView ret;
486 const upb_MiniTableField field = {2, UPB_SIZE(8, 16), 0, kUpb_NoSub, 9, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
487 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
488 return ret;
489 }
490
envoy_config_endpoint_v3_LedsClusterLocalityConfig_set_leds_config(envoy_config_endpoint_v3_LedsClusterLocalityConfig * msg,struct envoy_config_core_v3_ConfigSource * value)491 UPB_INLINE void envoy_config_endpoint_v3_LedsClusterLocalityConfig_set_leds_config(envoy_config_endpoint_v3_LedsClusterLocalityConfig *msg, struct envoy_config_core_v3_ConfigSource* value) {
492 const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 1, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
493 _upb_Message_SetNonExtensionField(msg, &field, &value);
494 }
envoy_config_endpoint_v3_LedsClusterLocalityConfig_mutable_leds_config(envoy_config_endpoint_v3_LedsClusterLocalityConfig * msg,upb_Arena * arena)495 UPB_INLINE struct envoy_config_core_v3_ConfigSource* envoy_config_endpoint_v3_LedsClusterLocalityConfig_mutable_leds_config(envoy_config_endpoint_v3_LedsClusterLocalityConfig* msg, upb_Arena* arena) {
496 struct envoy_config_core_v3_ConfigSource* sub = (struct envoy_config_core_v3_ConfigSource*)envoy_config_endpoint_v3_LedsClusterLocalityConfig_leds_config(msg);
497 if (sub == NULL) {
498 sub = (struct envoy_config_core_v3_ConfigSource*)_upb_Message_New(&envoy_config_core_v3_ConfigSource_msg_init, arena);
499 if (sub) envoy_config_endpoint_v3_LedsClusterLocalityConfig_set_leds_config(msg, sub);
500 }
501 return sub;
502 }
envoy_config_endpoint_v3_LedsClusterLocalityConfig_set_leds_collection_name(envoy_config_endpoint_v3_LedsClusterLocalityConfig * msg,upb_StringView value)503 UPB_INLINE void envoy_config_endpoint_v3_LedsClusterLocalityConfig_set_leds_collection_name(envoy_config_endpoint_v3_LedsClusterLocalityConfig *msg, upb_StringView value) {
504 const upb_MiniTableField field = {2, UPB_SIZE(8, 16), 0, kUpb_NoSub, 9, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
505 _upb_Message_SetNonExtensionField(msg, &field, &value);
506 }
507
508 /* envoy.config.endpoint.v3.LocalityLbEndpoints */
509
envoy_config_endpoint_v3_LocalityLbEndpoints_new(upb_Arena * arena)510 UPB_INLINE envoy_config_endpoint_v3_LocalityLbEndpoints* envoy_config_endpoint_v3_LocalityLbEndpoints_new(upb_Arena* arena) {
511 return (envoy_config_endpoint_v3_LocalityLbEndpoints*)_upb_Message_New(&envoy_config_endpoint_v3_LocalityLbEndpoints_msg_init, arena);
512 }
envoy_config_endpoint_v3_LocalityLbEndpoints_parse(const char * buf,size_t size,upb_Arena * arena)513 UPB_INLINE envoy_config_endpoint_v3_LocalityLbEndpoints* envoy_config_endpoint_v3_LocalityLbEndpoints_parse(const char* buf, size_t size, upb_Arena* arena) {
514 envoy_config_endpoint_v3_LocalityLbEndpoints* ret = envoy_config_endpoint_v3_LocalityLbEndpoints_new(arena);
515 if (!ret) return NULL;
516 if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_LocalityLbEndpoints_msg_init, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
517 return NULL;
518 }
519 return ret;
520 }
envoy_config_endpoint_v3_LocalityLbEndpoints_parse_ex(const char * buf,size_t size,const upb_ExtensionRegistry * extreg,int options,upb_Arena * arena)521 UPB_INLINE envoy_config_endpoint_v3_LocalityLbEndpoints* envoy_config_endpoint_v3_LocalityLbEndpoints_parse_ex(const char* buf, size_t size,
522 const upb_ExtensionRegistry* extreg,
523 int options, upb_Arena* arena) {
524 envoy_config_endpoint_v3_LocalityLbEndpoints* ret = envoy_config_endpoint_v3_LocalityLbEndpoints_new(arena);
525 if (!ret) return NULL;
526 if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_LocalityLbEndpoints_msg_init, extreg, options, arena) !=
527 kUpb_DecodeStatus_Ok) {
528 return NULL;
529 }
530 return ret;
531 }
envoy_config_endpoint_v3_LocalityLbEndpoints_serialize(const envoy_config_endpoint_v3_LocalityLbEndpoints * msg,upb_Arena * arena,size_t * len)532 UPB_INLINE char* envoy_config_endpoint_v3_LocalityLbEndpoints_serialize(const envoy_config_endpoint_v3_LocalityLbEndpoints* msg, upb_Arena* arena, size_t* len) {
533 char* ptr;
534 (void)upb_Encode(msg, &envoy_config_endpoint_v3_LocalityLbEndpoints_msg_init, 0, arena, &ptr, len);
535 return ptr;
536 }
envoy_config_endpoint_v3_LocalityLbEndpoints_serialize_ex(const envoy_config_endpoint_v3_LocalityLbEndpoints * msg,int options,upb_Arena * arena,size_t * len)537 UPB_INLINE char* envoy_config_endpoint_v3_LocalityLbEndpoints_serialize_ex(const envoy_config_endpoint_v3_LocalityLbEndpoints* msg, int options,
538 upb_Arena* arena, size_t* len) {
539 char* ptr;
540 (void)upb_Encode(msg, &envoy_config_endpoint_v3_LocalityLbEndpoints_msg_init, options, arena, &ptr, len);
541 return ptr;
542 }
543 typedef enum {
544 envoy_config_endpoint_v3_LocalityLbEndpoints_lb_config_load_balancer_endpoints = 7,
545 envoy_config_endpoint_v3_LocalityLbEndpoints_lb_config_leds_cluster_locality_config = 8,
546 envoy_config_endpoint_v3_LocalityLbEndpoints_lb_config_NOT_SET = 0
547 } envoy_config_endpoint_v3_LocalityLbEndpoints_lb_config_oneofcases;
envoy_config_endpoint_v3_LocalityLbEndpoints_lb_config_case(const envoy_config_endpoint_v3_LocalityLbEndpoints * msg)548 UPB_INLINE envoy_config_endpoint_v3_LocalityLbEndpoints_lb_config_oneofcases envoy_config_endpoint_v3_LocalityLbEndpoints_lb_config_case(const envoy_config_endpoint_v3_LocalityLbEndpoints* msg) {
549 const upb_MiniTableField field = {7, UPB_SIZE(28, 48), UPB_SIZE(-25, -9), 4, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
550 return (envoy_config_endpoint_v3_LocalityLbEndpoints_lb_config_oneofcases)upb_Message_WhichOneofFieldNumber(msg, &field);
551 }
envoy_config_endpoint_v3_LocalityLbEndpoints_clear_locality(envoy_config_endpoint_v3_LocalityLbEndpoints * msg)552 UPB_INLINE void envoy_config_endpoint_v3_LocalityLbEndpoints_clear_locality(envoy_config_endpoint_v3_LocalityLbEndpoints* msg) {
553 const upb_MiniTableField field = {1, UPB_SIZE(4, 16), 1, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
554 _upb_Message_ClearNonExtensionField(msg, &field);
555 }
envoy_config_endpoint_v3_LocalityLbEndpoints_locality(const envoy_config_endpoint_v3_LocalityLbEndpoints * msg)556 UPB_INLINE const struct envoy_config_core_v3_Locality* envoy_config_endpoint_v3_LocalityLbEndpoints_locality(const envoy_config_endpoint_v3_LocalityLbEndpoints* msg) {
557 const struct envoy_config_core_v3_Locality* default_val = NULL;
558 const struct envoy_config_core_v3_Locality* ret;
559 const upb_MiniTableField field = {1, UPB_SIZE(4, 16), 1, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
560 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
561 return ret;
562 }
envoy_config_endpoint_v3_LocalityLbEndpoints_has_locality(const envoy_config_endpoint_v3_LocalityLbEndpoints * msg)563 UPB_INLINE bool envoy_config_endpoint_v3_LocalityLbEndpoints_has_locality(const envoy_config_endpoint_v3_LocalityLbEndpoints* msg) {
564 const upb_MiniTableField field = {1, UPB_SIZE(4, 16), 1, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
565 return _upb_Message_HasNonExtensionField(msg, &field);
566 }
envoy_config_endpoint_v3_LocalityLbEndpoints_clear_lb_endpoints(envoy_config_endpoint_v3_LocalityLbEndpoints * msg)567 UPB_INLINE void envoy_config_endpoint_v3_LocalityLbEndpoints_clear_lb_endpoints(envoy_config_endpoint_v3_LocalityLbEndpoints* msg) {
568 const upb_MiniTableField field = {2, UPB_SIZE(8, 24), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
569 _upb_Message_ClearNonExtensionField(msg, &field);
570 }
envoy_config_endpoint_v3_LocalityLbEndpoints_lb_endpoints(const envoy_config_endpoint_v3_LocalityLbEndpoints * msg,size_t * size)571 UPB_INLINE const envoy_config_endpoint_v3_LbEndpoint* const* envoy_config_endpoint_v3_LocalityLbEndpoints_lb_endpoints(const envoy_config_endpoint_v3_LocalityLbEndpoints* msg, size_t* size) {
572 const upb_MiniTableField field = {2, UPB_SIZE(8, 24), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
573 const upb_Array* arr = upb_Message_GetArray(msg, &field);
574 if (arr) {
575 if (size) *size = arr->size;
576 return (const envoy_config_endpoint_v3_LbEndpoint* const*)_upb_array_constptr(arr);
577 } else {
578 if (size) *size = 0;
579 return NULL;
580 }
581 }
_envoy_config_endpoint_v3_LocalityLbEndpoints_lb_endpoints_upb_array(const envoy_config_endpoint_v3_LocalityLbEndpoints * msg,size_t * size)582 UPB_INLINE const upb_Array* _envoy_config_endpoint_v3_LocalityLbEndpoints_lb_endpoints_upb_array(const envoy_config_endpoint_v3_LocalityLbEndpoints* msg, size_t* size) {
583 const upb_MiniTableField field = {2, UPB_SIZE(8, 24), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
584 const upb_Array* arr = upb_Message_GetArray(msg, &field);
585 if (size) {
586 *size = arr ? arr->size : 0;
587 }
588 return arr;
589 }
_envoy_config_endpoint_v3_LocalityLbEndpoints_lb_endpoints_mutable_upb_array(const envoy_config_endpoint_v3_LocalityLbEndpoints * msg,size_t * size,upb_Arena * arena)590 UPB_INLINE upb_Array* _envoy_config_endpoint_v3_LocalityLbEndpoints_lb_endpoints_mutable_upb_array(const envoy_config_endpoint_v3_LocalityLbEndpoints* msg, size_t* size, upb_Arena* arena) {
591 const upb_MiniTableField field = {2, UPB_SIZE(8, 24), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
592 upb_Array* arr = upb_Message_GetOrCreateMutableArray(
593 (upb_Message*)msg, &field, arena);
594 if (size) {
595 *size = arr ? arr->size : 0;
596 }
597 return arr;
598 }
envoy_config_endpoint_v3_LocalityLbEndpoints_has_lb_endpoints(const envoy_config_endpoint_v3_LocalityLbEndpoints * msg)599 UPB_INLINE bool envoy_config_endpoint_v3_LocalityLbEndpoints_has_lb_endpoints(const envoy_config_endpoint_v3_LocalityLbEndpoints* msg) {
600 size_t size;
601 envoy_config_endpoint_v3_LocalityLbEndpoints_lb_endpoints(msg, &size);
602 return size != 0;
603 }
envoy_config_endpoint_v3_LocalityLbEndpoints_clear_load_balancing_weight(envoy_config_endpoint_v3_LocalityLbEndpoints * msg)604 UPB_INLINE void envoy_config_endpoint_v3_LocalityLbEndpoints_clear_load_balancing_weight(envoy_config_endpoint_v3_LocalityLbEndpoints* msg) {
605 const upb_MiniTableField field = {3, UPB_SIZE(12, 32), 2, 2, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
606 _upb_Message_ClearNonExtensionField(msg, &field);
607 }
envoy_config_endpoint_v3_LocalityLbEndpoints_load_balancing_weight(const envoy_config_endpoint_v3_LocalityLbEndpoints * msg)608 UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_endpoint_v3_LocalityLbEndpoints_load_balancing_weight(const envoy_config_endpoint_v3_LocalityLbEndpoints* msg) {
609 const struct google_protobuf_UInt32Value* default_val = NULL;
610 const struct google_protobuf_UInt32Value* ret;
611 const upb_MiniTableField field = {3, UPB_SIZE(12, 32), 2, 2, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
612 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
613 return ret;
614 }
envoy_config_endpoint_v3_LocalityLbEndpoints_has_load_balancing_weight(const envoy_config_endpoint_v3_LocalityLbEndpoints * msg)615 UPB_INLINE bool envoy_config_endpoint_v3_LocalityLbEndpoints_has_load_balancing_weight(const envoy_config_endpoint_v3_LocalityLbEndpoints* msg) {
616 const upb_MiniTableField field = {3, UPB_SIZE(12, 32), 2, 2, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
617 return _upb_Message_HasNonExtensionField(msg, &field);
618 }
envoy_config_endpoint_v3_LocalityLbEndpoints_clear_priority(envoy_config_endpoint_v3_LocalityLbEndpoints * msg)619 UPB_INLINE void envoy_config_endpoint_v3_LocalityLbEndpoints_clear_priority(envoy_config_endpoint_v3_LocalityLbEndpoints* msg) {
620 const upb_MiniTableField field = {5, UPB_SIZE(16, 4), 0, kUpb_NoSub, 13, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)};
621 _upb_Message_ClearNonExtensionField(msg, &field);
622 }
envoy_config_endpoint_v3_LocalityLbEndpoints_priority(const envoy_config_endpoint_v3_LocalityLbEndpoints * msg)623 UPB_INLINE uint32_t envoy_config_endpoint_v3_LocalityLbEndpoints_priority(const envoy_config_endpoint_v3_LocalityLbEndpoints* msg) {
624 uint32_t default_val = (uint32_t)0u;
625 uint32_t ret;
626 const upb_MiniTableField field = {5, UPB_SIZE(16, 4), 0, kUpb_NoSub, 13, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)};
627 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
628 return ret;
629 }
envoy_config_endpoint_v3_LocalityLbEndpoints_clear_proximity(envoy_config_endpoint_v3_LocalityLbEndpoints * msg)630 UPB_INLINE void envoy_config_endpoint_v3_LocalityLbEndpoints_clear_proximity(envoy_config_endpoint_v3_LocalityLbEndpoints* msg) {
631 const upb_MiniTableField field = {6, UPB_SIZE(20, 40), 3, 3, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
632 _upb_Message_ClearNonExtensionField(msg, &field);
633 }
envoy_config_endpoint_v3_LocalityLbEndpoints_proximity(const envoy_config_endpoint_v3_LocalityLbEndpoints * msg)634 UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_endpoint_v3_LocalityLbEndpoints_proximity(const envoy_config_endpoint_v3_LocalityLbEndpoints* msg) {
635 const struct google_protobuf_UInt32Value* default_val = NULL;
636 const struct google_protobuf_UInt32Value* ret;
637 const upb_MiniTableField field = {6, UPB_SIZE(20, 40), 3, 3, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
638 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
639 return ret;
640 }
envoy_config_endpoint_v3_LocalityLbEndpoints_has_proximity(const envoy_config_endpoint_v3_LocalityLbEndpoints * msg)641 UPB_INLINE bool envoy_config_endpoint_v3_LocalityLbEndpoints_has_proximity(const envoy_config_endpoint_v3_LocalityLbEndpoints* msg) {
642 const upb_MiniTableField field = {6, UPB_SIZE(20, 40), 3, 3, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
643 return _upb_Message_HasNonExtensionField(msg, &field);
644 }
envoy_config_endpoint_v3_LocalityLbEndpoints_clear_load_balancer_endpoints(envoy_config_endpoint_v3_LocalityLbEndpoints * msg)645 UPB_INLINE void envoy_config_endpoint_v3_LocalityLbEndpoints_clear_load_balancer_endpoints(envoy_config_endpoint_v3_LocalityLbEndpoints* msg) {
646 const upb_MiniTableField field = {7, UPB_SIZE(28, 48), UPB_SIZE(-25, -9), 4, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
647 _upb_Message_ClearNonExtensionField(msg, &field);
648 }
envoy_config_endpoint_v3_LocalityLbEndpoints_load_balancer_endpoints(const envoy_config_endpoint_v3_LocalityLbEndpoints * msg)649 UPB_INLINE const envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList* envoy_config_endpoint_v3_LocalityLbEndpoints_load_balancer_endpoints(const envoy_config_endpoint_v3_LocalityLbEndpoints* msg) {
650 const envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList* default_val = NULL;
651 const envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList* ret;
652 const upb_MiniTableField field = {7, UPB_SIZE(28, 48), UPB_SIZE(-25, -9), 4, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
653 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
654 return ret;
655 }
envoy_config_endpoint_v3_LocalityLbEndpoints_has_load_balancer_endpoints(const envoy_config_endpoint_v3_LocalityLbEndpoints * msg)656 UPB_INLINE bool envoy_config_endpoint_v3_LocalityLbEndpoints_has_load_balancer_endpoints(const envoy_config_endpoint_v3_LocalityLbEndpoints* msg) {
657 const upb_MiniTableField field = {7, UPB_SIZE(28, 48), UPB_SIZE(-25, -9), 4, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
658 return _upb_Message_HasNonExtensionField(msg, &field);
659 }
envoy_config_endpoint_v3_LocalityLbEndpoints_clear_leds_cluster_locality_config(envoy_config_endpoint_v3_LocalityLbEndpoints * msg)660 UPB_INLINE void envoy_config_endpoint_v3_LocalityLbEndpoints_clear_leds_cluster_locality_config(envoy_config_endpoint_v3_LocalityLbEndpoints* msg) {
661 const upb_MiniTableField field = {8, UPB_SIZE(28, 48), UPB_SIZE(-25, -9), 5, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
662 _upb_Message_ClearNonExtensionField(msg, &field);
663 }
envoy_config_endpoint_v3_LocalityLbEndpoints_leds_cluster_locality_config(const envoy_config_endpoint_v3_LocalityLbEndpoints * msg)664 UPB_INLINE const envoy_config_endpoint_v3_LedsClusterLocalityConfig* envoy_config_endpoint_v3_LocalityLbEndpoints_leds_cluster_locality_config(const envoy_config_endpoint_v3_LocalityLbEndpoints* msg) {
665 const envoy_config_endpoint_v3_LedsClusterLocalityConfig* default_val = NULL;
666 const envoy_config_endpoint_v3_LedsClusterLocalityConfig* ret;
667 const upb_MiniTableField field = {8, UPB_SIZE(28, 48), UPB_SIZE(-25, -9), 5, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
668 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
669 return ret;
670 }
envoy_config_endpoint_v3_LocalityLbEndpoints_has_leds_cluster_locality_config(const envoy_config_endpoint_v3_LocalityLbEndpoints * msg)671 UPB_INLINE bool envoy_config_endpoint_v3_LocalityLbEndpoints_has_leds_cluster_locality_config(const envoy_config_endpoint_v3_LocalityLbEndpoints* msg) {
672 const upb_MiniTableField field = {8, UPB_SIZE(28, 48), UPB_SIZE(-25, -9), 5, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
673 return _upb_Message_HasNonExtensionField(msg, &field);
674 }
675
envoy_config_endpoint_v3_LocalityLbEndpoints_set_locality(envoy_config_endpoint_v3_LocalityLbEndpoints * msg,struct envoy_config_core_v3_Locality * value)676 UPB_INLINE void envoy_config_endpoint_v3_LocalityLbEndpoints_set_locality(envoy_config_endpoint_v3_LocalityLbEndpoints *msg, struct envoy_config_core_v3_Locality* value) {
677 const upb_MiniTableField field = {1, UPB_SIZE(4, 16), 1, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
678 _upb_Message_SetNonExtensionField(msg, &field, &value);
679 }
envoy_config_endpoint_v3_LocalityLbEndpoints_mutable_locality(envoy_config_endpoint_v3_LocalityLbEndpoints * msg,upb_Arena * arena)680 UPB_INLINE struct envoy_config_core_v3_Locality* envoy_config_endpoint_v3_LocalityLbEndpoints_mutable_locality(envoy_config_endpoint_v3_LocalityLbEndpoints* msg, upb_Arena* arena) {
681 struct envoy_config_core_v3_Locality* sub = (struct envoy_config_core_v3_Locality*)envoy_config_endpoint_v3_LocalityLbEndpoints_locality(msg);
682 if (sub == NULL) {
683 sub = (struct envoy_config_core_v3_Locality*)_upb_Message_New(&envoy_config_core_v3_Locality_msg_init, arena);
684 if (sub) envoy_config_endpoint_v3_LocalityLbEndpoints_set_locality(msg, sub);
685 }
686 return sub;
687 }
envoy_config_endpoint_v3_LocalityLbEndpoints_mutable_lb_endpoints(envoy_config_endpoint_v3_LocalityLbEndpoints * msg,size_t * size)688 UPB_INLINE envoy_config_endpoint_v3_LbEndpoint** envoy_config_endpoint_v3_LocalityLbEndpoints_mutable_lb_endpoints(envoy_config_endpoint_v3_LocalityLbEndpoints* msg, size_t* size) {
689 upb_MiniTableField field = {2, UPB_SIZE(8, 24), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
690 upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
691 if (arr) {
692 if (size) *size = arr->size;
693 return (envoy_config_endpoint_v3_LbEndpoint**)_upb_array_ptr(arr);
694 } else {
695 if (size) *size = 0;
696 return NULL;
697 }
698 }
envoy_config_endpoint_v3_LocalityLbEndpoints_resize_lb_endpoints(envoy_config_endpoint_v3_LocalityLbEndpoints * msg,size_t size,upb_Arena * arena)699 UPB_INLINE envoy_config_endpoint_v3_LbEndpoint** envoy_config_endpoint_v3_LocalityLbEndpoints_resize_lb_endpoints(envoy_config_endpoint_v3_LocalityLbEndpoints* msg, size_t size, upb_Arena* arena) {
700 upb_MiniTableField field = {2, UPB_SIZE(8, 24), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
701 return (envoy_config_endpoint_v3_LbEndpoint**)upb_Message_ResizeArray(msg, &field, size, arena);
702 }
envoy_config_endpoint_v3_LocalityLbEndpoints_add_lb_endpoints(envoy_config_endpoint_v3_LocalityLbEndpoints * msg,upb_Arena * arena)703 UPB_INLINE struct envoy_config_endpoint_v3_LbEndpoint* envoy_config_endpoint_v3_LocalityLbEndpoints_add_lb_endpoints(envoy_config_endpoint_v3_LocalityLbEndpoints* msg, upb_Arena* arena) {
704 upb_MiniTableField field = {2, UPB_SIZE(8, 24), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
705 upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
706 if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
707 return NULL;
708 }
709 struct envoy_config_endpoint_v3_LbEndpoint* sub = (struct envoy_config_endpoint_v3_LbEndpoint*)_upb_Message_New(&envoy_config_endpoint_v3_LbEndpoint_msg_init, arena);
710 if (!arr || !sub) return NULL;
711 _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
712 return sub;
713 }
envoy_config_endpoint_v3_LocalityLbEndpoints_set_load_balancing_weight(envoy_config_endpoint_v3_LocalityLbEndpoints * msg,struct google_protobuf_UInt32Value * value)714 UPB_INLINE void envoy_config_endpoint_v3_LocalityLbEndpoints_set_load_balancing_weight(envoy_config_endpoint_v3_LocalityLbEndpoints *msg, struct google_protobuf_UInt32Value* value) {
715 const upb_MiniTableField field = {3, UPB_SIZE(12, 32), 2, 2, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
716 _upb_Message_SetNonExtensionField(msg, &field, &value);
717 }
envoy_config_endpoint_v3_LocalityLbEndpoints_mutable_load_balancing_weight(envoy_config_endpoint_v3_LocalityLbEndpoints * msg,upb_Arena * arena)718 UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_endpoint_v3_LocalityLbEndpoints_mutable_load_balancing_weight(envoy_config_endpoint_v3_LocalityLbEndpoints* msg, upb_Arena* arena) {
719 struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_endpoint_v3_LocalityLbEndpoints_load_balancing_weight(msg);
720 if (sub == NULL) {
721 sub = (struct google_protobuf_UInt32Value*)_upb_Message_New(&google_protobuf_UInt32Value_msg_init, arena);
722 if (sub) envoy_config_endpoint_v3_LocalityLbEndpoints_set_load_balancing_weight(msg, sub);
723 }
724 return sub;
725 }
envoy_config_endpoint_v3_LocalityLbEndpoints_set_priority(envoy_config_endpoint_v3_LocalityLbEndpoints * msg,uint32_t value)726 UPB_INLINE void envoy_config_endpoint_v3_LocalityLbEndpoints_set_priority(envoy_config_endpoint_v3_LocalityLbEndpoints *msg, uint32_t value) {
727 const upb_MiniTableField field = {5, UPB_SIZE(16, 4), 0, kUpb_NoSub, 13, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)};
728 _upb_Message_SetNonExtensionField(msg, &field, &value);
729 }
envoy_config_endpoint_v3_LocalityLbEndpoints_set_proximity(envoy_config_endpoint_v3_LocalityLbEndpoints * msg,struct google_protobuf_UInt32Value * value)730 UPB_INLINE void envoy_config_endpoint_v3_LocalityLbEndpoints_set_proximity(envoy_config_endpoint_v3_LocalityLbEndpoints *msg, struct google_protobuf_UInt32Value* value) {
731 const upb_MiniTableField field = {6, UPB_SIZE(20, 40), 3, 3, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
732 _upb_Message_SetNonExtensionField(msg, &field, &value);
733 }
envoy_config_endpoint_v3_LocalityLbEndpoints_mutable_proximity(envoy_config_endpoint_v3_LocalityLbEndpoints * msg,upb_Arena * arena)734 UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_endpoint_v3_LocalityLbEndpoints_mutable_proximity(envoy_config_endpoint_v3_LocalityLbEndpoints* msg, upb_Arena* arena) {
735 struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_endpoint_v3_LocalityLbEndpoints_proximity(msg);
736 if (sub == NULL) {
737 sub = (struct google_protobuf_UInt32Value*)_upb_Message_New(&google_protobuf_UInt32Value_msg_init, arena);
738 if (sub) envoy_config_endpoint_v3_LocalityLbEndpoints_set_proximity(msg, sub);
739 }
740 return sub;
741 }
envoy_config_endpoint_v3_LocalityLbEndpoints_set_load_balancer_endpoints(envoy_config_endpoint_v3_LocalityLbEndpoints * msg,envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList * value)742 UPB_INLINE void envoy_config_endpoint_v3_LocalityLbEndpoints_set_load_balancer_endpoints(envoy_config_endpoint_v3_LocalityLbEndpoints *msg, envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList* value) {
743 const upb_MiniTableField field = {7, UPB_SIZE(28, 48), UPB_SIZE(-25, -9), 4, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
744 _upb_Message_SetNonExtensionField(msg, &field, &value);
745 }
envoy_config_endpoint_v3_LocalityLbEndpoints_mutable_load_balancer_endpoints(envoy_config_endpoint_v3_LocalityLbEndpoints * msg,upb_Arena * arena)746 UPB_INLINE struct envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList* envoy_config_endpoint_v3_LocalityLbEndpoints_mutable_load_balancer_endpoints(envoy_config_endpoint_v3_LocalityLbEndpoints* msg, upb_Arena* arena) {
747 struct envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList* sub = (struct envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList*)envoy_config_endpoint_v3_LocalityLbEndpoints_load_balancer_endpoints(msg);
748 if (sub == NULL) {
749 sub = (struct envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList*)_upb_Message_New(&envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_msg_init, arena);
750 if (sub) envoy_config_endpoint_v3_LocalityLbEndpoints_set_load_balancer_endpoints(msg, sub);
751 }
752 return sub;
753 }
envoy_config_endpoint_v3_LocalityLbEndpoints_set_leds_cluster_locality_config(envoy_config_endpoint_v3_LocalityLbEndpoints * msg,envoy_config_endpoint_v3_LedsClusterLocalityConfig * value)754 UPB_INLINE void envoy_config_endpoint_v3_LocalityLbEndpoints_set_leds_cluster_locality_config(envoy_config_endpoint_v3_LocalityLbEndpoints *msg, envoy_config_endpoint_v3_LedsClusterLocalityConfig* value) {
755 const upb_MiniTableField field = {8, UPB_SIZE(28, 48), UPB_SIZE(-25, -9), 5, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
756 _upb_Message_SetNonExtensionField(msg, &field, &value);
757 }
envoy_config_endpoint_v3_LocalityLbEndpoints_mutable_leds_cluster_locality_config(envoy_config_endpoint_v3_LocalityLbEndpoints * msg,upb_Arena * arena)758 UPB_INLINE struct envoy_config_endpoint_v3_LedsClusterLocalityConfig* envoy_config_endpoint_v3_LocalityLbEndpoints_mutable_leds_cluster_locality_config(envoy_config_endpoint_v3_LocalityLbEndpoints* msg, upb_Arena* arena) {
759 struct envoy_config_endpoint_v3_LedsClusterLocalityConfig* sub = (struct envoy_config_endpoint_v3_LedsClusterLocalityConfig*)envoy_config_endpoint_v3_LocalityLbEndpoints_leds_cluster_locality_config(msg);
760 if (sub == NULL) {
761 sub = (struct envoy_config_endpoint_v3_LedsClusterLocalityConfig*)_upb_Message_New(&envoy_config_endpoint_v3_LedsClusterLocalityConfig_msg_init, arena);
762 if (sub) envoy_config_endpoint_v3_LocalityLbEndpoints_set_leds_cluster_locality_config(msg, sub);
763 }
764 return sub;
765 }
766
767 /* envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList */
768
envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_new(upb_Arena * arena)769 UPB_INLINE envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList* envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_new(upb_Arena* arena) {
770 return (envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList*)_upb_Message_New(&envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_msg_init, arena);
771 }
envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_parse(const char * buf,size_t size,upb_Arena * arena)772 UPB_INLINE envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList* envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_parse(const char* buf, size_t size, upb_Arena* arena) {
773 envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList* ret = envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_new(arena);
774 if (!ret) return NULL;
775 if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_msg_init, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
776 return NULL;
777 }
778 return ret;
779 }
envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_parse_ex(const char * buf,size_t size,const upb_ExtensionRegistry * extreg,int options,upb_Arena * arena)780 UPB_INLINE envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList* envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_parse_ex(const char* buf, size_t size,
781 const upb_ExtensionRegistry* extreg,
782 int options, upb_Arena* arena) {
783 envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList* ret = envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_new(arena);
784 if (!ret) return NULL;
785 if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_msg_init, extreg, options, arena) !=
786 kUpb_DecodeStatus_Ok) {
787 return NULL;
788 }
789 return ret;
790 }
envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_serialize(const envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList * msg,upb_Arena * arena,size_t * len)791 UPB_INLINE char* envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_serialize(const envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList* msg, upb_Arena* arena, size_t* len) {
792 char* ptr;
793 (void)upb_Encode(msg, &envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_msg_init, 0, arena, &ptr, len);
794 return ptr;
795 }
envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_serialize_ex(const envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList * msg,int options,upb_Arena * arena,size_t * len)796 UPB_INLINE char* envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_serialize_ex(const envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList* msg, int options,
797 upb_Arena* arena, size_t* len) {
798 char* ptr;
799 (void)upb_Encode(msg, &envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_msg_init, options, arena, &ptr, len);
800 return ptr;
801 }
envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_clear_lb_endpoints(envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList * msg)802 UPB_INLINE void envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_clear_lb_endpoints(envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList* msg) {
803 const upb_MiniTableField field = {1, 0, 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
804 _upb_Message_ClearNonExtensionField(msg, &field);
805 }
envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_lb_endpoints(const envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList * msg,size_t * size)806 UPB_INLINE const envoy_config_endpoint_v3_LbEndpoint* const* envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_lb_endpoints(const envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList* msg, size_t* size) {
807 const upb_MiniTableField field = {1, 0, 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
808 const upb_Array* arr = upb_Message_GetArray(msg, &field);
809 if (arr) {
810 if (size) *size = arr->size;
811 return (const envoy_config_endpoint_v3_LbEndpoint* const*)_upb_array_constptr(arr);
812 } else {
813 if (size) *size = 0;
814 return NULL;
815 }
816 }
_envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_lb_endpoints_upb_array(const envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList * msg,size_t * size)817 UPB_INLINE const upb_Array* _envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_lb_endpoints_upb_array(const envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList* msg, size_t* size) {
818 const upb_MiniTableField field = {1, 0, 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
819 const upb_Array* arr = upb_Message_GetArray(msg, &field);
820 if (size) {
821 *size = arr ? arr->size : 0;
822 }
823 return arr;
824 }
_envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_lb_endpoints_mutable_upb_array(const envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList * msg,size_t * size,upb_Arena * arena)825 UPB_INLINE upb_Array* _envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_lb_endpoints_mutable_upb_array(const envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList* msg, size_t* size, upb_Arena* arena) {
826 const upb_MiniTableField field = {1, 0, 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
827 upb_Array* arr = upb_Message_GetOrCreateMutableArray(
828 (upb_Message*)msg, &field, arena);
829 if (size) {
830 *size = arr ? arr->size : 0;
831 }
832 return arr;
833 }
envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_has_lb_endpoints(const envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList * msg)834 UPB_INLINE bool envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_has_lb_endpoints(const envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList* msg) {
835 size_t size;
836 envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_lb_endpoints(msg, &size);
837 return size != 0;
838 }
839
envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_mutable_lb_endpoints(envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList * msg,size_t * size)840 UPB_INLINE envoy_config_endpoint_v3_LbEndpoint** envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_mutable_lb_endpoints(envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList* msg, size_t* size) {
841 upb_MiniTableField field = {1, 0, 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
842 upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
843 if (arr) {
844 if (size) *size = arr->size;
845 return (envoy_config_endpoint_v3_LbEndpoint**)_upb_array_ptr(arr);
846 } else {
847 if (size) *size = 0;
848 return NULL;
849 }
850 }
envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_resize_lb_endpoints(envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList * msg,size_t size,upb_Arena * arena)851 UPB_INLINE envoy_config_endpoint_v3_LbEndpoint** envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_resize_lb_endpoints(envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList* msg, size_t size, upb_Arena* arena) {
852 upb_MiniTableField field = {1, 0, 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
853 return (envoy_config_endpoint_v3_LbEndpoint**)upb_Message_ResizeArray(msg, &field, size, arena);
854 }
envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_add_lb_endpoints(envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList * msg,upb_Arena * arena)855 UPB_INLINE struct envoy_config_endpoint_v3_LbEndpoint* envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_add_lb_endpoints(envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList* msg, upb_Arena* arena) {
856 upb_MiniTableField field = {1, 0, 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
857 upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
858 if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
859 return NULL;
860 }
861 struct envoy_config_endpoint_v3_LbEndpoint* sub = (struct envoy_config_endpoint_v3_LbEndpoint*)_upb_Message_New(&envoy_config_endpoint_v3_LbEndpoint_msg_init, arena);
862 if (!arr || !sub) return NULL;
863 _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
864 return sub;
865 }
866
867 extern const upb_MiniTableFile envoy_config_endpoint_v3_endpoint_components_proto_upb_file_layout;
868
869 #ifdef __cplusplus
870 } /* extern "C" */
871 #endif
872
873 #include "upb/port/undef.inc"
874
875 #endif /* ENVOY_CONFIG_ENDPOINT_V3_ENDPOINT_COMPONENTS_PROTO_UPB_H_ */
876