1 /* This file was generated by upbc (the upb compiler) from the input
4 * envoy/config/core/v3/address.proto
6 * Do not edit -- your changes will be discarded when the file is
9 #ifndef ENVOY_CONFIG_CORE_V3_ADDRESS_PROTO_UPB_H_
10 #define ENVOY_CONFIG_CORE_V3_ADDRESS_PROTO_UPB_H_
12 #include "upb/msg_internal.h"
13 #include "upb/decode.h"
14 #include "upb/decode_fast.h"
15 #include "upb/encode.h"
17 #include "upb/port_def.inc"
23 struct envoy_config_core_v3_Pipe;
24 struct envoy_config_core_v3_EnvoyInternalAddress;
25 struct envoy_config_core_v3_SocketAddress;
26 struct envoy_config_core_v3_TcpKeepalive;
27 struct envoy_config_core_v3_BindConfig;
28 struct envoy_config_core_v3_Address;
29 struct envoy_config_core_v3_CidrRange;
30 typedef struct envoy_config_core_v3_Pipe envoy_config_core_v3_Pipe;
31 typedef struct envoy_config_core_v3_EnvoyInternalAddress envoy_config_core_v3_EnvoyInternalAddress;
32 typedef struct envoy_config_core_v3_SocketAddress envoy_config_core_v3_SocketAddress;
33 typedef struct envoy_config_core_v3_TcpKeepalive envoy_config_core_v3_TcpKeepalive;
34 typedef struct envoy_config_core_v3_BindConfig envoy_config_core_v3_BindConfig;
35 typedef struct envoy_config_core_v3_Address envoy_config_core_v3_Address;
36 typedef struct envoy_config_core_v3_CidrRange envoy_config_core_v3_CidrRange;
37 extern const upb_msglayout envoy_config_core_v3_Pipe_msginit;
38 extern const upb_msglayout envoy_config_core_v3_EnvoyInternalAddress_msginit;
39 extern const upb_msglayout envoy_config_core_v3_SocketAddress_msginit;
40 extern const upb_msglayout envoy_config_core_v3_TcpKeepalive_msginit;
41 extern const upb_msglayout envoy_config_core_v3_BindConfig_msginit;
42 extern const upb_msglayout envoy_config_core_v3_Address_msginit;
43 extern const upb_msglayout envoy_config_core_v3_CidrRange_msginit;
44 struct envoy_config_core_v3_SocketOption;
45 struct google_protobuf_BoolValue;
46 struct google_protobuf_UInt32Value;
47 extern const upb_msglayout envoy_config_core_v3_SocketOption_msginit;
48 extern const upb_msglayout google_protobuf_BoolValue_msginit;
49 extern const upb_msglayout google_protobuf_UInt32Value_msginit;
52 envoy_config_core_v3_SocketAddress_TCP = 0,
53 envoy_config_core_v3_SocketAddress_UDP = 1
54 } envoy_config_core_v3_SocketAddress_Protocol;
57 /* envoy.config.core.v3.Pipe */
59 UPB_INLINE envoy_config_core_v3_Pipe *envoy_config_core_v3_Pipe_new(upb_arena *arena) {
60 return (envoy_config_core_v3_Pipe *)_upb_msg_new(&envoy_config_core_v3_Pipe_msginit, arena);
62 UPB_INLINE envoy_config_core_v3_Pipe *envoy_config_core_v3_Pipe_parse(const char *buf, size_t size,
64 envoy_config_core_v3_Pipe *ret = envoy_config_core_v3_Pipe_new(arena);
65 if (!ret) return NULL;
66 if (!upb_decode(buf, size, ret, &envoy_config_core_v3_Pipe_msginit, arena)) return NULL;
69 UPB_INLINE envoy_config_core_v3_Pipe *envoy_config_core_v3_Pipe_parse_ex(const char *buf, size_t size,
70 const upb_extreg *extreg, int options,
72 envoy_config_core_v3_Pipe *ret = envoy_config_core_v3_Pipe_new(arena);
73 if (!ret) return NULL;
74 if (!_upb_decode(buf, size, ret, &envoy_config_core_v3_Pipe_msginit, extreg, options, arena)) {
79 UPB_INLINE char *envoy_config_core_v3_Pipe_serialize(const envoy_config_core_v3_Pipe *msg, upb_arena *arena, size_t *len) {
80 return upb_encode(msg, &envoy_config_core_v3_Pipe_msginit, arena, len);
83 UPB_INLINE upb_strview envoy_config_core_v3_Pipe_path(const envoy_config_core_v3_Pipe *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
84 UPB_INLINE uint32_t envoy_config_core_v3_Pipe_mode(const envoy_config_core_v3_Pipe *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); }
86 UPB_INLINE void envoy_config_core_v3_Pipe_set_path(envoy_config_core_v3_Pipe *msg, upb_strview value) {
87 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
89 UPB_INLINE void envoy_config_core_v3_Pipe_set_mode(envoy_config_core_v3_Pipe *msg, uint32_t value) {
90 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value;
93 /* envoy.config.core.v3.EnvoyInternalAddress */
95 UPB_INLINE envoy_config_core_v3_EnvoyInternalAddress *envoy_config_core_v3_EnvoyInternalAddress_new(upb_arena *arena) {
96 return (envoy_config_core_v3_EnvoyInternalAddress *)_upb_msg_new(&envoy_config_core_v3_EnvoyInternalAddress_msginit, arena);
98 UPB_INLINE envoy_config_core_v3_EnvoyInternalAddress *envoy_config_core_v3_EnvoyInternalAddress_parse(const char *buf, size_t size,
100 envoy_config_core_v3_EnvoyInternalAddress *ret = envoy_config_core_v3_EnvoyInternalAddress_new(arena);
101 if (!ret) return NULL;
102 if (!upb_decode(buf, size, ret, &envoy_config_core_v3_EnvoyInternalAddress_msginit, arena)) return NULL;
105 UPB_INLINE envoy_config_core_v3_EnvoyInternalAddress *envoy_config_core_v3_EnvoyInternalAddress_parse_ex(const char *buf, size_t size,
106 const upb_extreg *extreg, int options,
108 envoy_config_core_v3_EnvoyInternalAddress *ret = envoy_config_core_v3_EnvoyInternalAddress_new(arena);
109 if (!ret) return NULL;
110 if (!_upb_decode(buf, size, ret, &envoy_config_core_v3_EnvoyInternalAddress_msginit, extreg, options, arena)) {
115 UPB_INLINE char *envoy_config_core_v3_EnvoyInternalAddress_serialize(const envoy_config_core_v3_EnvoyInternalAddress *msg, upb_arena *arena, size_t *len) {
116 return upb_encode(msg, &envoy_config_core_v3_EnvoyInternalAddress_msginit, arena, len);
120 envoy_config_core_v3_EnvoyInternalAddress_address_name_specifier_server_listener_name = 1,
121 envoy_config_core_v3_EnvoyInternalAddress_address_name_specifier_NOT_SET = 0
122 } envoy_config_core_v3_EnvoyInternalAddress_address_name_specifier_oneofcases;
123 UPB_INLINE envoy_config_core_v3_EnvoyInternalAddress_address_name_specifier_oneofcases envoy_config_core_v3_EnvoyInternalAddress_address_name_specifier_case(const envoy_config_core_v3_EnvoyInternalAddress* msg) { return (envoy_config_core_v3_EnvoyInternalAddress_address_name_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(8, 16), int32_t); }
125 UPB_INLINE bool envoy_config_core_v3_EnvoyInternalAddress_has_server_listener_name(const envoy_config_core_v3_EnvoyInternalAddress *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 1; }
126 UPB_INLINE upb_strview envoy_config_core_v3_EnvoyInternalAddress_server_listener_name(const envoy_config_core_v3_EnvoyInternalAddress *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 1, upb_strview_make("", strlen(""))); }
128 UPB_INLINE void envoy_config_core_v3_EnvoyInternalAddress_set_server_listener_name(envoy_config_core_v3_EnvoyInternalAddress *msg, upb_strview value) {
129 UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 1);
132 /* envoy.config.core.v3.SocketAddress */
134 UPB_INLINE envoy_config_core_v3_SocketAddress *envoy_config_core_v3_SocketAddress_new(upb_arena *arena) {
135 return (envoy_config_core_v3_SocketAddress *)_upb_msg_new(&envoy_config_core_v3_SocketAddress_msginit, arena);
137 UPB_INLINE envoy_config_core_v3_SocketAddress *envoy_config_core_v3_SocketAddress_parse(const char *buf, size_t size,
139 envoy_config_core_v3_SocketAddress *ret = envoy_config_core_v3_SocketAddress_new(arena);
140 if (!ret) return NULL;
141 if (!upb_decode(buf, size, ret, &envoy_config_core_v3_SocketAddress_msginit, arena)) return NULL;
144 UPB_INLINE envoy_config_core_v3_SocketAddress *envoy_config_core_v3_SocketAddress_parse_ex(const char *buf, size_t size,
145 const upb_extreg *extreg, int options,
147 envoy_config_core_v3_SocketAddress *ret = envoy_config_core_v3_SocketAddress_new(arena);
148 if (!ret) return NULL;
149 if (!_upb_decode(buf, size, ret, &envoy_config_core_v3_SocketAddress_msginit, extreg, options, arena)) {
154 UPB_INLINE char *envoy_config_core_v3_SocketAddress_serialize(const envoy_config_core_v3_SocketAddress *msg, upb_arena *arena, size_t *len) {
155 return upb_encode(msg, &envoy_config_core_v3_SocketAddress_msginit, arena, len);
159 envoy_config_core_v3_SocketAddress_port_specifier_port_value = 3,
160 envoy_config_core_v3_SocketAddress_port_specifier_named_port = 4,
161 envoy_config_core_v3_SocketAddress_port_specifier_NOT_SET = 0
162 } envoy_config_core_v3_SocketAddress_port_specifier_oneofcases;
163 UPB_INLINE envoy_config_core_v3_SocketAddress_port_specifier_oneofcases envoy_config_core_v3_SocketAddress_port_specifier_case(const envoy_config_core_v3_SocketAddress* msg) { return (envoy_config_core_v3_SocketAddress_port_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(32, 56), int32_t); }
165 UPB_INLINE int32_t envoy_config_core_v3_SocketAddress_protocol(const envoy_config_core_v3_SocketAddress *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
166 UPB_INLINE upb_strview envoy_config_core_v3_SocketAddress_address(const envoy_config_core_v3_SocketAddress *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
167 UPB_INLINE bool envoy_config_core_v3_SocketAddress_has_port_value(const envoy_config_core_v3_SocketAddress *msg) { return _upb_getoneofcase(msg, UPB_SIZE(32, 56)) == 3; }
168 UPB_INLINE uint32_t envoy_config_core_v3_SocketAddress_port_value(const envoy_config_core_v3_SocketAddress *msg) { return UPB_READ_ONEOF(msg, uint32_t, UPB_SIZE(24, 40), UPB_SIZE(32, 56), 3, 0); }
169 UPB_INLINE bool envoy_config_core_v3_SocketAddress_has_named_port(const envoy_config_core_v3_SocketAddress *msg) { return _upb_getoneofcase(msg, UPB_SIZE(32, 56)) == 4; }
170 UPB_INLINE upb_strview envoy_config_core_v3_SocketAddress_named_port(const envoy_config_core_v3_SocketAddress *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(24, 40), UPB_SIZE(32, 56), 4, upb_strview_make("", strlen(""))); }
171 UPB_INLINE upb_strview envoy_config_core_v3_SocketAddress_resolver_name(const envoy_config_core_v3_SocketAddress *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview); }
172 UPB_INLINE bool envoy_config_core_v3_SocketAddress_ipv4_compat(const envoy_config_core_v3_SocketAddress *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool); }
174 UPB_INLINE void envoy_config_core_v3_SocketAddress_set_protocol(envoy_config_core_v3_SocketAddress *msg, int32_t value) {
175 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
177 UPB_INLINE void envoy_config_core_v3_SocketAddress_set_address(envoy_config_core_v3_SocketAddress *msg, upb_strview value) {
178 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
180 UPB_INLINE void envoy_config_core_v3_SocketAddress_set_port_value(envoy_config_core_v3_SocketAddress *msg, uint32_t value) {
181 UPB_WRITE_ONEOF(msg, uint32_t, UPB_SIZE(24, 40), value, UPB_SIZE(32, 56), 3);
183 UPB_INLINE void envoy_config_core_v3_SocketAddress_set_named_port(envoy_config_core_v3_SocketAddress *msg, upb_strview value) {
184 UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(24, 40), value, UPB_SIZE(32, 56), 4);
186 UPB_INLINE void envoy_config_core_v3_SocketAddress_set_resolver_name(envoy_config_core_v3_SocketAddress *msg, upb_strview value) {
187 *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview) = value;
189 UPB_INLINE void envoy_config_core_v3_SocketAddress_set_ipv4_compat(envoy_config_core_v3_SocketAddress *msg, bool value) {
190 *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool) = value;
193 /* envoy.config.core.v3.TcpKeepalive */
195 UPB_INLINE envoy_config_core_v3_TcpKeepalive *envoy_config_core_v3_TcpKeepalive_new(upb_arena *arena) {
196 return (envoy_config_core_v3_TcpKeepalive *)_upb_msg_new(&envoy_config_core_v3_TcpKeepalive_msginit, arena);
198 UPB_INLINE envoy_config_core_v3_TcpKeepalive *envoy_config_core_v3_TcpKeepalive_parse(const char *buf, size_t size,
200 envoy_config_core_v3_TcpKeepalive *ret = envoy_config_core_v3_TcpKeepalive_new(arena);
201 if (!ret) return NULL;
202 if (!upb_decode(buf, size, ret, &envoy_config_core_v3_TcpKeepalive_msginit, arena)) return NULL;
205 UPB_INLINE envoy_config_core_v3_TcpKeepalive *envoy_config_core_v3_TcpKeepalive_parse_ex(const char *buf, size_t size,
206 const upb_extreg *extreg, int options,
208 envoy_config_core_v3_TcpKeepalive *ret = envoy_config_core_v3_TcpKeepalive_new(arena);
209 if (!ret) return NULL;
210 if (!_upb_decode(buf, size, ret, &envoy_config_core_v3_TcpKeepalive_msginit, extreg, options, arena)) {
215 UPB_INLINE char *envoy_config_core_v3_TcpKeepalive_serialize(const envoy_config_core_v3_TcpKeepalive *msg, upb_arena *arena, size_t *len) {
216 return upb_encode(msg, &envoy_config_core_v3_TcpKeepalive_msginit, arena, len);
219 UPB_INLINE bool envoy_config_core_v3_TcpKeepalive_has_keepalive_probes(const envoy_config_core_v3_TcpKeepalive *msg) { return _upb_hasbit(msg, 1); }
220 UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_TcpKeepalive_keepalive_probes(const envoy_config_core_v3_TcpKeepalive *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); }
221 UPB_INLINE bool envoy_config_core_v3_TcpKeepalive_has_keepalive_time(const envoy_config_core_v3_TcpKeepalive *msg) { return _upb_hasbit(msg, 2); }
222 UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_TcpKeepalive_keepalive_time(const envoy_config_core_v3_TcpKeepalive *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt32Value*); }
223 UPB_INLINE bool envoy_config_core_v3_TcpKeepalive_has_keepalive_interval(const envoy_config_core_v3_TcpKeepalive *msg) { return _upb_hasbit(msg, 3); }
224 UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_TcpKeepalive_keepalive_interval(const envoy_config_core_v3_TcpKeepalive *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_UInt32Value*); }
226 UPB_INLINE void envoy_config_core_v3_TcpKeepalive_set_keepalive_probes(envoy_config_core_v3_TcpKeepalive *msg, struct google_protobuf_UInt32Value* value) {
228 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value;
230 UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_TcpKeepalive_mutable_keepalive_probes(envoy_config_core_v3_TcpKeepalive *msg, upb_arena *arena) {
231 struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_TcpKeepalive_keepalive_probes(msg);
233 sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
234 if (!sub) return NULL;
235 envoy_config_core_v3_TcpKeepalive_set_keepalive_probes(msg, sub);
239 UPB_INLINE void envoy_config_core_v3_TcpKeepalive_set_keepalive_time(envoy_config_core_v3_TcpKeepalive *msg, struct google_protobuf_UInt32Value* value) {
241 *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt32Value*) = value;
243 UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_TcpKeepalive_mutable_keepalive_time(envoy_config_core_v3_TcpKeepalive *msg, upb_arena *arena) {
244 struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_TcpKeepalive_keepalive_time(msg);
246 sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
247 if (!sub) return NULL;
248 envoy_config_core_v3_TcpKeepalive_set_keepalive_time(msg, sub);
252 UPB_INLINE void envoy_config_core_v3_TcpKeepalive_set_keepalive_interval(envoy_config_core_v3_TcpKeepalive *msg, struct google_protobuf_UInt32Value* value) {
254 *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_UInt32Value*) = value;
256 UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_TcpKeepalive_mutable_keepalive_interval(envoy_config_core_v3_TcpKeepalive *msg, upb_arena *arena) {
257 struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_TcpKeepalive_keepalive_interval(msg);
259 sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
260 if (!sub) return NULL;
261 envoy_config_core_v3_TcpKeepalive_set_keepalive_interval(msg, sub);
266 /* envoy.config.core.v3.BindConfig */
268 UPB_INLINE envoy_config_core_v3_BindConfig *envoy_config_core_v3_BindConfig_new(upb_arena *arena) {
269 return (envoy_config_core_v3_BindConfig *)_upb_msg_new(&envoy_config_core_v3_BindConfig_msginit, arena);
271 UPB_INLINE envoy_config_core_v3_BindConfig *envoy_config_core_v3_BindConfig_parse(const char *buf, size_t size,
273 envoy_config_core_v3_BindConfig *ret = envoy_config_core_v3_BindConfig_new(arena);
274 if (!ret) return NULL;
275 if (!upb_decode(buf, size, ret, &envoy_config_core_v3_BindConfig_msginit, arena)) return NULL;
278 UPB_INLINE envoy_config_core_v3_BindConfig *envoy_config_core_v3_BindConfig_parse_ex(const char *buf, size_t size,
279 const upb_extreg *extreg, int options,
281 envoy_config_core_v3_BindConfig *ret = envoy_config_core_v3_BindConfig_new(arena);
282 if (!ret) return NULL;
283 if (!_upb_decode(buf, size, ret, &envoy_config_core_v3_BindConfig_msginit, extreg, options, arena)) {
288 UPB_INLINE char *envoy_config_core_v3_BindConfig_serialize(const envoy_config_core_v3_BindConfig *msg, upb_arena *arena, size_t *len) {
289 return upb_encode(msg, &envoy_config_core_v3_BindConfig_msginit, arena, len);
292 UPB_INLINE bool envoy_config_core_v3_BindConfig_has_source_address(const envoy_config_core_v3_BindConfig *msg) { return _upb_hasbit(msg, 1); }
293 UPB_INLINE const envoy_config_core_v3_SocketAddress* envoy_config_core_v3_BindConfig_source_address(const envoy_config_core_v3_BindConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const envoy_config_core_v3_SocketAddress*); }
294 UPB_INLINE bool envoy_config_core_v3_BindConfig_has_freebind(const envoy_config_core_v3_BindConfig *msg) { return _upb_hasbit(msg, 2); }
295 UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_core_v3_BindConfig_freebind(const envoy_config_core_v3_BindConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_BoolValue*); }
296 UPB_INLINE bool envoy_config_core_v3_BindConfig_has_socket_options(const envoy_config_core_v3_BindConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
297 UPB_INLINE const struct envoy_config_core_v3_SocketOption* const* envoy_config_core_v3_BindConfig_socket_options(const envoy_config_core_v3_BindConfig *msg, size_t *len) { return (const struct envoy_config_core_v3_SocketOption* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); }
299 UPB_INLINE void envoy_config_core_v3_BindConfig_set_source_address(envoy_config_core_v3_BindConfig *msg, envoy_config_core_v3_SocketAddress* value) {
301 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), envoy_config_core_v3_SocketAddress*) = value;
303 UPB_INLINE struct envoy_config_core_v3_SocketAddress* envoy_config_core_v3_BindConfig_mutable_source_address(envoy_config_core_v3_BindConfig *msg, upb_arena *arena) {
304 struct envoy_config_core_v3_SocketAddress* sub = (struct envoy_config_core_v3_SocketAddress*)envoy_config_core_v3_BindConfig_source_address(msg);
306 sub = (struct envoy_config_core_v3_SocketAddress*)_upb_msg_new(&envoy_config_core_v3_SocketAddress_msginit, arena);
307 if (!sub) return NULL;
308 envoy_config_core_v3_BindConfig_set_source_address(msg, sub);
312 UPB_INLINE void envoy_config_core_v3_BindConfig_set_freebind(envoy_config_core_v3_BindConfig *msg, struct google_protobuf_BoolValue* value) {
314 *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_BoolValue*) = value;
316 UPB_INLINE struct google_protobuf_BoolValue* envoy_config_core_v3_BindConfig_mutable_freebind(envoy_config_core_v3_BindConfig *msg, upb_arena *arena) {
317 struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_core_v3_BindConfig_freebind(msg);
319 sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena);
320 if (!sub) return NULL;
321 envoy_config_core_v3_BindConfig_set_freebind(msg, sub);
325 UPB_INLINE struct envoy_config_core_v3_SocketOption** envoy_config_core_v3_BindConfig_mutable_socket_options(envoy_config_core_v3_BindConfig *msg, size_t *len) {
326 return (struct envoy_config_core_v3_SocketOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len);
328 UPB_INLINE struct envoy_config_core_v3_SocketOption** envoy_config_core_v3_BindConfig_resize_socket_options(envoy_config_core_v3_BindConfig *msg, size_t len, upb_arena *arena) {
329 return (struct envoy_config_core_v3_SocketOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(2, 3), arena);
331 UPB_INLINE struct envoy_config_core_v3_SocketOption* envoy_config_core_v3_BindConfig_add_socket_options(envoy_config_core_v3_BindConfig *msg, upb_arena *arena) {
332 struct envoy_config_core_v3_SocketOption* sub = (struct envoy_config_core_v3_SocketOption*)_upb_msg_new(&envoy_config_core_v3_SocketOption_msginit, arena);
333 bool ok = _upb_array_append_accessor2(
334 msg, UPB_SIZE(12, 24), UPB_SIZE(2, 3), &sub, arena);
335 if (!ok) return NULL;
339 /* envoy.config.core.v3.Address */
341 UPB_INLINE envoy_config_core_v3_Address *envoy_config_core_v3_Address_new(upb_arena *arena) {
342 return (envoy_config_core_v3_Address *)_upb_msg_new(&envoy_config_core_v3_Address_msginit, arena);
344 UPB_INLINE envoy_config_core_v3_Address *envoy_config_core_v3_Address_parse(const char *buf, size_t size,
346 envoy_config_core_v3_Address *ret = envoy_config_core_v3_Address_new(arena);
347 if (!ret) return NULL;
348 if (!upb_decode(buf, size, ret, &envoy_config_core_v3_Address_msginit, arena)) return NULL;
351 UPB_INLINE envoy_config_core_v3_Address *envoy_config_core_v3_Address_parse_ex(const char *buf, size_t size,
352 const upb_extreg *extreg, int options,
354 envoy_config_core_v3_Address *ret = envoy_config_core_v3_Address_new(arena);
355 if (!ret) return NULL;
356 if (!_upb_decode(buf, size, ret, &envoy_config_core_v3_Address_msginit, extreg, options, arena)) {
361 UPB_INLINE char *envoy_config_core_v3_Address_serialize(const envoy_config_core_v3_Address *msg, upb_arena *arena, size_t *len) {
362 return upb_encode(msg, &envoy_config_core_v3_Address_msginit, arena, len);
366 envoy_config_core_v3_Address_address_socket_address = 1,
367 envoy_config_core_v3_Address_address_pipe = 2,
368 envoy_config_core_v3_Address_address_envoy_internal_address = 3,
369 envoy_config_core_v3_Address_address_NOT_SET = 0
370 } envoy_config_core_v3_Address_address_oneofcases;
371 UPB_INLINE envoy_config_core_v3_Address_address_oneofcases envoy_config_core_v3_Address_address_case(const envoy_config_core_v3_Address* msg) { return (envoy_config_core_v3_Address_address_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); }
373 UPB_INLINE bool envoy_config_core_v3_Address_has_socket_address(const envoy_config_core_v3_Address *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; }
374 UPB_INLINE const envoy_config_core_v3_SocketAddress* envoy_config_core_v3_Address_socket_address(const envoy_config_core_v3_Address *msg) { return UPB_READ_ONEOF(msg, const envoy_config_core_v3_SocketAddress*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); }
375 UPB_INLINE bool envoy_config_core_v3_Address_has_pipe(const envoy_config_core_v3_Address *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 2; }
376 UPB_INLINE const envoy_config_core_v3_Pipe* envoy_config_core_v3_Address_pipe(const envoy_config_core_v3_Address *msg) { return UPB_READ_ONEOF(msg, const envoy_config_core_v3_Pipe*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); }
377 UPB_INLINE bool envoy_config_core_v3_Address_has_envoy_internal_address(const envoy_config_core_v3_Address *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 3; }
378 UPB_INLINE const envoy_config_core_v3_EnvoyInternalAddress* envoy_config_core_v3_Address_envoy_internal_address(const envoy_config_core_v3_Address *msg) { return UPB_READ_ONEOF(msg, const envoy_config_core_v3_EnvoyInternalAddress*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 3, NULL); }
380 UPB_INLINE void envoy_config_core_v3_Address_set_socket_address(envoy_config_core_v3_Address *msg, envoy_config_core_v3_SocketAddress* value) {
381 UPB_WRITE_ONEOF(msg, envoy_config_core_v3_SocketAddress*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1);
383 UPB_INLINE struct envoy_config_core_v3_SocketAddress* envoy_config_core_v3_Address_mutable_socket_address(envoy_config_core_v3_Address *msg, upb_arena *arena) {
384 struct envoy_config_core_v3_SocketAddress* sub = (struct envoy_config_core_v3_SocketAddress*)envoy_config_core_v3_Address_socket_address(msg);
386 sub = (struct envoy_config_core_v3_SocketAddress*)_upb_msg_new(&envoy_config_core_v3_SocketAddress_msginit, arena);
387 if (!sub) return NULL;
388 envoy_config_core_v3_Address_set_socket_address(msg, sub);
392 UPB_INLINE void envoy_config_core_v3_Address_set_pipe(envoy_config_core_v3_Address *msg, envoy_config_core_v3_Pipe* value) {
393 UPB_WRITE_ONEOF(msg, envoy_config_core_v3_Pipe*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2);
395 UPB_INLINE struct envoy_config_core_v3_Pipe* envoy_config_core_v3_Address_mutable_pipe(envoy_config_core_v3_Address *msg, upb_arena *arena) {
396 struct envoy_config_core_v3_Pipe* sub = (struct envoy_config_core_v3_Pipe*)envoy_config_core_v3_Address_pipe(msg);
398 sub = (struct envoy_config_core_v3_Pipe*)_upb_msg_new(&envoy_config_core_v3_Pipe_msginit, arena);
399 if (!sub) return NULL;
400 envoy_config_core_v3_Address_set_pipe(msg, sub);
404 UPB_INLINE void envoy_config_core_v3_Address_set_envoy_internal_address(envoy_config_core_v3_Address *msg, envoy_config_core_v3_EnvoyInternalAddress* value) {
405 UPB_WRITE_ONEOF(msg, envoy_config_core_v3_EnvoyInternalAddress*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 3);
407 UPB_INLINE struct envoy_config_core_v3_EnvoyInternalAddress* envoy_config_core_v3_Address_mutable_envoy_internal_address(envoy_config_core_v3_Address *msg, upb_arena *arena) {
408 struct envoy_config_core_v3_EnvoyInternalAddress* sub = (struct envoy_config_core_v3_EnvoyInternalAddress*)envoy_config_core_v3_Address_envoy_internal_address(msg);
410 sub = (struct envoy_config_core_v3_EnvoyInternalAddress*)_upb_msg_new(&envoy_config_core_v3_EnvoyInternalAddress_msginit, arena);
411 if (!sub) return NULL;
412 envoy_config_core_v3_Address_set_envoy_internal_address(msg, sub);
417 /* envoy.config.core.v3.CidrRange */
419 UPB_INLINE envoy_config_core_v3_CidrRange *envoy_config_core_v3_CidrRange_new(upb_arena *arena) {
420 return (envoy_config_core_v3_CidrRange *)_upb_msg_new(&envoy_config_core_v3_CidrRange_msginit, arena);
422 UPB_INLINE envoy_config_core_v3_CidrRange *envoy_config_core_v3_CidrRange_parse(const char *buf, size_t size,
424 envoy_config_core_v3_CidrRange *ret = envoy_config_core_v3_CidrRange_new(arena);
425 if (!ret) return NULL;
426 if (!upb_decode(buf, size, ret, &envoy_config_core_v3_CidrRange_msginit, arena)) return NULL;
429 UPB_INLINE envoy_config_core_v3_CidrRange *envoy_config_core_v3_CidrRange_parse_ex(const char *buf, size_t size,
430 const upb_extreg *extreg, int options,
432 envoy_config_core_v3_CidrRange *ret = envoy_config_core_v3_CidrRange_new(arena);
433 if (!ret) return NULL;
434 if (!_upb_decode(buf, size, ret, &envoy_config_core_v3_CidrRange_msginit, extreg, options, arena)) {
439 UPB_INLINE char *envoy_config_core_v3_CidrRange_serialize(const envoy_config_core_v3_CidrRange *msg, upb_arena *arena, size_t *len) {
440 return upb_encode(msg, &envoy_config_core_v3_CidrRange_msginit, arena, len);
443 UPB_INLINE upb_strview envoy_config_core_v3_CidrRange_address_prefix(const envoy_config_core_v3_CidrRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
444 UPB_INLINE bool envoy_config_core_v3_CidrRange_has_prefix_len(const envoy_config_core_v3_CidrRange *msg) { return _upb_hasbit(msg, 1); }
445 UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_CidrRange_prefix_len(const envoy_config_core_v3_CidrRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_UInt32Value*); }
447 UPB_INLINE void envoy_config_core_v3_CidrRange_set_address_prefix(envoy_config_core_v3_CidrRange *msg, upb_strview value) {
448 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
450 UPB_INLINE void envoy_config_core_v3_CidrRange_set_prefix_len(envoy_config_core_v3_CidrRange *msg, struct google_protobuf_UInt32Value* value) {
452 *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_UInt32Value*) = value;
454 UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_CidrRange_mutable_prefix_len(envoy_config_core_v3_CidrRange *msg, upb_arena *arena) {
455 struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_CidrRange_prefix_len(msg);
457 sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
458 if (!sub) return NULL;
459 envoy_config_core_v3_CidrRange_set_prefix_len(msg, sub);
468 #include "upb/port_undef.inc"
470 #endif /* ENVOY_CONFIG_CORE_V3_ADDRESS_PROTO_UPB_H_ */