Imported Upstream version 1.41.0
[platform/upstream/grpc.git] / src / core / ext / upb-generated / envoy / config / core / v3 / address.upb.h
1 /* This file was generated by upbc (the upb compiler) from the input
2  * file:
3  *
4  *     envoy/config/core/v3/address.proto
5  *
6  * Do not edit -- your changes will be discarded when the file is
7  * regenerated. */
8
9 #ifndef ENVOY_CONFIG_CORE_V3_ADDRESS_PROTO_UPB_H_
10 #define ENVOY_CONFIG_CORE_V3_ADDRESS_PROTO_UPB_H_
11
12 #include "upb/msg_internal.h"
13 #include "upb/decode.h"
14 #include "upb/decode_fast.h"
15 #include "upb/encode.h"
16
17 #include "upb/port_def.inc"
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23 struct 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;
50
51 typedef enum {
52   envoy_config_core_v3_SocketAddress_TCP = 0,
53   envoy_config_core_v3_SocketAddress_UDP = 1
54 } envoy_config_core_v3_SocketAddress_Protocol;
55
56
57 /* envoy.config.core.v3.Pipe */
58
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);
61 }
62 UPB_INLINE envoy_config_core_v3_Pipe *envoy_config_core_v3_Pipe_parse(const char *buf, size_t size,
63                         upb_arena *arena) {
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;
67   return ret;
68 }
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,
71                            upb_arena *arena) {
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)) {
75     return NULL;
76   }
77   return ret;
78 }
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);
81 }
82
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); }
85
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;
88 }
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;
91 }
92
93 /* envoy.config.core.v3.EnvoyInternalAddress */
94
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);
97 }
98 UPB_INLINE envoy_config_core_v3_EnvoyInternalAddress *envoy_config_core_v3_EnvoyInternalAddress_parse(const char *buf, size_t size,
99                         upb_arena *arena) {
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;
103   return ret;
104 }
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,
107                            upb_arena *arena) {
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)) {
111     return NULL;
112   }
113   return ret;
114 }
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);
117 }
118
119 typedef enum {
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); }
124
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(""))); }
127
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);
130 }
131
132 /* envoy.config.core.v3.SocketAddress */
133
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);
136 }
137 UPB_INLINE envoy_config_core_v3_SocketAddress *envoy_config_core_v3_SocketAddress_parse(const char *buf, size_t size,
138                         upb_arena *arena) {
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;
142   return ret;
143 }
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,
146                            upb_arena *arena) {
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)) {
150     return NULL;
151   }
152   return ret;
153 }
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);
156 }
157
158 typedef enum {
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); }
164
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); }
173
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;
176 }
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;
179 }
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);
182 }
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);
185 }
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;
188 }
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;
191 }
192
193 /* envoy.config.core.v3.TcpKeepalive */
194
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);
197 }
198 UPB_INLINE envoy_config_core_v3_TcpKeepalive *envoy_config_core_v3_TcpKeepalive_parse(const char *buf, size_t size,
199                         upb_arena *arena) {
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;
203   return ret;
204 }
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,
207                            upb_arena *arena) {
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)) {
211     return NULL;
212   }
213   return ret;
214 }
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);
217 }
218
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*); }
225
226 UPB_INLINE void envoy_config_core_v3_TcpKeepalive_set_keepalive_probes(envoy_config_core_v3_TcpKeepalive *msg, struct google_protobuf_UInt32Value* value) {
227   _upb_sethas(msg, 1);
228   *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value;
229 }
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);
232   if (sub == NULL) {
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);
236   }
237   return sub;
238 }
239 UPB_INLINE void envoy_config_core_v3_TcpKeepalive_set_keepalive_time(envoy_config_core_v3_TcpKeepalive *msg, struct google_protobuf_UInt32Value* value) {
240   _upb_sethas(msg, 2);
241   *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt32Value*) = value;
242 }
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);
245   if (sub == NULL) {
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);
249   }
250   return sub;
251 }
252 UPB_INLINE void envoy_config_core_v3_TcpKeepalive_set_keepalive_interval(envoy_config_core_v3_TcpKeepalive *msg, struct google_protobuf_UInt32Value* value) {
253   _upb_sethas(msg, 3);
254   *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_UInt32Value*) = value;
255 }
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);
258   if (sub == NULL) {
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);
262   }
263   return sub;
264 }
265
266 /* envoy.config.core.v3.BindConfig */
267
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);
270 }
271 UPB_INLINE envoy_config_core_v3_BindConfig *envoy_config_core_v3_BindConfig_parse(const char *buf, size_t size,
272                         upb_arena *arena) {
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;
276   return ret;
277 }
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,
280                            upb_arena *arena) {
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)) {
284     return NULL;
285   }
286   return ret;
287 }
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);
290 }
291
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); }
298
299 UPB_INLINE void envoy_config_core_v3_BindConfig_set_source_address(envoy_config_core_v3_BindConfig *msg, envoy_config_core_v3_SocketAddress* value) {
300   _upb_sethas(msg, 1);
301   *UPB_PTR_AT(msg, UPB_SIZE(4, 8), envoy_config_core_v3_SocketAddress*) = value;
302 }
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);
305   if (sub == NULL) {
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);
309   }
310   return sub;
311 }
312 UPB_INLINE void envoy_config_core_v3_BindConfig_set_freebind(envoy_config_core_v3_BindConfig *msg, struct google_protobuf_BoolValue* value) {
313   _upb_sethas(msg, 2);
314   *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_BoolValue*) = value;
315 }
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);
318   if (sub == NULL) {
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);
322   }
323   return sub;
324 }
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);
327 }
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);
330 }
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;
336   return sub;
337 }
338
339 /* envoy.config.core.v3.Address */
340
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);
343 }
344 UPB_INLINE envoy_config_core_v3_Address *envoy_config_core_v3_Address_parse(const char *buf, size_t size,
345                         upb_arena *arena) {
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;
349   return ret;
350 }
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,
353                            upb_arena *arena) {
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)) {
357     return NULL;
358   }
359   return ret;
360 }
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);
363 }
364
365 typedef enum {
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); }
372
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); }
379
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);
382 }
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);
385   if (sub == NULL) {
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);
389   }
390   return sub;
391 }
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);
394 }
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);
397   if (sub == NULL) {
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);
401   }
402   return sub;
403 }
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);
406 }
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);
409   if (sub == NULL) {
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);
413   }
414   return sub;
415 }
416
417 /* envoy.config.core.v3.CidrRange */
418
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);
421 }
422 UPB_INLINE envoy_config_core_v3_CidrRange *envoy_config_core_v3_CidrRange_parse(const char *buf, size_t size,
423                         upb_arena *arena) {
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;
427   return ret;
428 }
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,
431                            upb_arena *arena) {
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)) {
435     return NULL;
436   }
437   return ret;
438 }
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);
441 }
442
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*); }
446
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;
449 }
450 UPB_INLINE void envoy_config_core_v3_CidrRange_set_prefix_len(envoy_config_core_v3_CidrRange *msg, struct google_protobuf_UInt32Value* value) {
451   _upb_sethas(msg, 1);
452   *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_UInt32Value*) = value;
453 }
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);
456   if (sub == NULL) {
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);
460   }
461   return sub;
462 }
463
464 #ifdef __cplusplus
465 }  /* extern "C" */
466 #endif
467
468 #include "upb/port_undef.inc"
469
470 #endif  /* ENVOY_CONFIG_CORE_V3_ADDRESS_PROTO_UPB_H_ */