1 /* This file was generated by upbc (the upb compiler) from the input
2 * file:
3 *
4 * envoy/api/v2/core/address.proto
5 *
6 * Do not edit -- your changes will be discarded when the file is
7 * regenerated. */
8
9 #ifndef ENVOY_API_V2_CORE_ADDRESS_PROTO_UPB_H_
10 #define ENVOY_API_V2_CORE_ADDRESS_PROTO_UPB_H_
11
12 #include "upb/msg.h"
13 #include "upb/decode.h"
14 #include "upb/encode.h"
15
16 #include "upb/port_def.inc"
17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21
22 struct envoy_api_v2_core_Pipe;
23 struct envoy_api_v2_core_SocketAddress;
24 struct envoy_api_v2_core_TcpKeepalive;
25 struct envoy_api_v2_core_BindConfig;
26 struct envoy_api_v2_core_Address;
27 struct envoy_api_v2_core_CidrRange;
28 typedef struct envoy_api_v2_core_Pipe envoy_api_v2_core_Pipe;
29 typedef struct envoy_api_v2_core_SocketAddress envoy_api_v2_core_SocketAddress;
30 typedef struct envoy_api_v2_core_TcpKeepalive envoy_api_v2_core_TcpKeepalive;
31 typedef struct envoy_api_v2_core_BindConfig envoy_api_v2_core_BindConfig;
32 typedef struct envoy_api_v2_core_Address envoy_api_v2_core_Address;
33 typedef struct envoy_api_v2_core_CidrRange envoy_api_v2_core_CidrRange;
34 extern const upb_msglayout envoy_api_v2_core_Pipe_msginit;
35 extern const upb_msglayout envoy_api_v2_core_SocketAddress_msginit;
36 extern const upb_msglayout envoy_api_v2_core_TcpKeepalive_msginit;
37 extern const upb_msglayout envoy_api_v2_core_BindConfig_msginit;
38 extern const upb_msglayout envoy_api_v2_core_Address_msginit;
39 extern const upb_msglayout envoy_api_v2_core_CidrRange_msginit;
40 struct envoy_api_v2_core_SocketOption;
41 struct google_protobuf_BoolValue;
42 struct google_protobuf_UInt32Value;
43 extern const upb_msglayout envoy_api_v2_core_SocketOption_msginit;
44 extern const upb_msglayout google_protobuf_BoolValue_msginit;
45 extern const upb_msglayout google_protobuf_UInt32Value_msginit;
46
47 typedef enum {
48 envoy_api_v2_core_SocketAddress_TCP = 0,
49 envoy_api_v2_core_SocketAddress_UDP = 1
50 } envoy_api_v2_core_SocketAddress_Protocol;
51
52
53 /* envoy.api.v2.core.Pipe */
54
envoy_api_v2_core_Pipe_new(upb_arena * arena)55 UPB_INLINE envoy_api_v2_core_Pipe *envoy_api_v2_core_Pipe_new(upb_arena *arena) {
56 return (envoy_api_v2_core_Pipe *)_upb_msg_new(&envoy_api_v2_core_Pipe_msginit, arena);
57 }
envoy_api_v2_core_Pipe_parse(const char * buf,size_t size,upb_arena * arena)58 UPB_INLINE envoy_api_v2_core_Pipe *envoy_api_v2_core_Pipe_parse(const char *buf, size_t size,
59 upb_arena *arena) {
60 envoy_api_v2_core_Pipe *ret = envoy_api_v2_core_Pipe_new(arena);
61 return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_Pipe_msginit, arena)) ? ret : NULL;
62 }
envoy_api_v2_core_Pipe_serialize(const envoy_api_v2_core_Pipe * msg,upb_arena * arena,size_t * len)63 UPB_INLINE char *envoy_api_v2_core_Pipe_serialize(const envoy_api_v2_core_Pipe *msg, upb_arena *arena, size_t *len) {
64 return upb_encode(msg, &envoy_api_v2_core_Pipe_msginit, arena, len);
65 }
66
envoy_api_v2_core_Pipe_path(const envoy_api_v2_core_Pipe * msg)67 UPB_INLINE upb_strview envoy_api_v2_core_Pipe_path(const envoy_api_v2_core_Pipe *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
envoy_api_v2_core_Pipe_mode(const envoy_api_v2_core_Pipe * msg)68 UPB_INLINE uint32_t envoy_api_v2_core_Pipe_mode(const envoy_api_v2_core_Pipe *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); }
69
envoy_api_v2_core_Pipe_set_path(envoy_api_v2_core_Pipe * msg,upb_strview value)70 UPB_INLINE void envoy_api_v2_core_Pipe_set_path(envoy_api_v2_core_Pipe *msg, upb_strview value) {
71 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
72 }
envoy_api_v2_core_Pipe_set_mode(envoy_api_v2_core_Pipe * msg,uint32_t value)73 UPB_INLINE void envoy_api_v2_core_Pipe_set_mode(envoy_api_v2_core_Pipe *msg, uint32_t value) {
74 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value;
75 }
76
77 /* envoy.api.v2.core.SocketAddress */
78
envoy_api_v2_core_SocketAddress_new(upb_arena * arena)79 UPB_INLINE envoy_api_v2_core_SocketAddress *envoy_api_v2_core_SocketAddress_new(upb_arena *arena) {
80 return (envoy_api_v2_core_SocketAddress *)_upb_msg_new(&envoy_api_v2_core_SocketAddress_msginit, arena);
81 }
envoy_api_v2_core_SocketAddress_parse(const char * buf,size_t size,upb_arena * arena)82 UPB_INLINE envoy_api_v2_core_SocketAddress *envoy_api_v2_core_SocketAddress_parse(const char *buf, size_t size,
83 upb_arena *arena) {
84 envoy_api_v2_core_SocketAddress *ret = envoy_api_v2_core_SocketAddress_new(arena);
85 return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_SocketAddress_msginit, arena)) ? ret : NULL;
86 }
envoy_api_v2_core_SocketAddress_serialize(const envoy_api_v2_core_SocketAddress * msg,upb_arena * arena,size_t * len)87 UPB_INLINE char *envoy_api_v2_core_SocketAddress_serialize(const envoy_api_v2_core_SocketAddress *msg, upb_arena *arena, size_t *len) {
88 return upb_encode(msg, &envoy_api_v2_core_SocketAddress_msginit, arena, len);
89 }
90
91 typedef enum {
92 envoy_api_v2_core_SocketAddress_port_specifier_port_value = 3,
93 envoy_api_v2_core_SocketAddress_port_specifier_named_port = 4,
94 envoy_api_v2_core_SocketAddress_port_specifier_NOT_SET = 0
95 } envoy_api_v2_core_SocketAddress_port_specifier_oneofcases;
envoy_api_v2_core_SocketAddress_port_specifier_case(const envoy_api_v2_core_SocketAddress * msg)96 UPB_INLINE envoy_api_v2_core_SocketAddress_port_specifier_oneofcases envoy_api_v2_core_SocketAddress_port_specifier_case(const envoy_api_v2_core_SocketAddress* msg) { return (envoy_api_v2_core_SocketAddress_port_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(36, 64), int32_t); }
97
envoy_api_v2_core_SocketAddress_protocol(const envoy_api_v2_core_SocketAddress * msg)98 UPB_INLINE int32_t envoy_api_v2_core_SocketAddress_protocol(const envoy_api_v2_core_SocketAddress *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
envoy_api_v2_core_SocketAddress_address(const envoy_api_v2_core_SocketAddress * msg)99 UPB_INLINE upb_strview envoy_api_v2_core_SocketAddress_address(const envoy_api_v2_core_SocketAddress *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview); }
envoy_api_v2_core_SocketAddress_has_port_value(const envoy_api_v2_core_SocketAddress * msg)100 UPB_INLINE bool envoy_api_v2_core_SocketAddress_has_port_value(const envoy_api_v2_core_SocketAddress *msg) { return _upb_getoneofcase(msg, UPB_SIZE(36, 64)) == 3; }
envoy_api_v2_core_SocketAddress_port_value(const envoy_api_v2_core_SocketAddress * msg)101 UPB_INLINE uint32_t envoy_api_v2_core_SocketAddress_port_value(const envoy_api_v2_core_SocketAddress *msg) { return UPB_READ_ONEOF(msg, uint32_t, UPB_SIZE(28, 48), UPB_SIZE(36, 64), 3, 0); }
envoy_api_v2_core_SocketAddress_has_named_port(const envoy_api_v2_core_SocketAddress * msg)102 UPB_INLINE bool envoy_api_v2_core_SocketAddress_has_named_port(const envoy_api_v2_core_SocketAddress *msg) { return _upb_getoneofcase(msg, UPB_SIZE(36, 64)) == 4; }
envoy_api_v2_core_SocketAddress_named_port(const envoy_api_v2_core_SocketAddress * msg)103 UPB_INLINE upb_strview envoy_api_v2_core_SocketAddress_named_port(const envoy_api_v2_core_SocketAddress *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(28, 48), UPB_SIZE(36, 64), 4, upb_strview_make("", strlen(""))); }
envoy_api_v2_core_SocketAddress_resolver_name(const envoy_api_v2_core_SocketAddress * msg)104 UPB_INLINE upb_strview envoy_api_v2_core_SocketAddress_resolver_name(const envoy_api_v2_core_SocketAddress *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), upb_strview); }
envoy_api_v2_core_SocketAddress_ipv4_compat(const envoy_api_v2_core_SocketAddress * msg)105 UPB_INLINE bool envoy_api_v2_core_SocketAddress_ipv4_compat(const envoy_api_v2_core_SocketAddress *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); }
106
envoy_api_v2_core_SocketAddress_set_protocol(envoy_api_v2_core_SocketAddress * msg,int32_t value)107 UPB_INLINE void envoy_api_v2_core_SocketAddress_set_protocol(envoy_api_v2_core_SocketAddress *msg, int32_t value) {
108 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
109 }
envoy_api_v2_core_SocketAddress_set_address(envoy_api_v2_core_SocketAddress * msg,upb_strview value)110 UPB_INLINE void envoy_api_v2_core_SocketAddress_set_address(envoy_api_v2_core_SocketAddress *msg, upb_strview value) {
111 *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview) = value;
112 }
envoy_api_v2_core_SocketAddress_set_port_value(envoy_api_v2_core_SocketAddress * msg,uint32_t value)113 UPB_INLINE void envoy_api_v2_core_SocketAddress_set_port_value(envoy_api_v2_core_SocketAddress *msg, uint32_t value) {
114 UPB_WRITE_ONEOF(msg, uint32_t, UPB_SIZE(28, 48), value, UPB_SIZE(36, 64), 3);
115 }
envoy_api_v2_core_SocketAddress_set_named_port(envoy_api_v2_core_SocketAddress * msg,upb_strview value)116 UPB_INLINE void envoy_api_v2_core_SocketAddress_set_named_port(envoy_api_v2_core_SocketAddress *msg, upb_strview value) {
117 UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(28, 48), value, UPB_SIZE(36, 64), 4);
118 }
envoy_api_v2_core_SocketAddress_set_resolver_name(envoy_api_v2_core_SocketAddress * msg,upb_strview value)119 UPB_INLINE void envoy_api_v2_core_SocketAddress_set_resolver_name(envoy_api_v2_core_SocketAddress *msg, upb_strview value) {
120 *UPB_PTR_AT(msg, UPB_SIZE(20, 32), upb_strview) = value;
121 }
envoy_api_v2_core_SocketAddress_set_ipv4_compat(envoy_api_v2_core_SocketAddress * msg,bool value)122 UPB_INLINE void envoy_api_v2_core_SocketAddress_set_ipv4_compat(envoy_api_v2_core_SocketAddress *msg, bool value) {
123 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value;
124 }
125
126 /* envoy.api.v2.core.TcpKeepalive */
127
envoy_api_v2_core_TcpKeepalive_new(upb_arena * arena)128 UPB_INLINE envoy_api_v2_core_TcpKeepalive *envoy_api_v2_core_TcpKeepalive_new(upb_arena *arena) {
129 return (envoy_api_v2_core_TcpKeepalive *)_upb_msg_new(&envoy_api_v2_core_TcpKeepalive_msginit, arena);
130 }
envoy_api_v2_core_TcpKeepalive_parse(const char * buf,size_t size,upb_arena * arena)131 UPB_INLINE envoy_api_v2_core_TcpKeepalive *envoy_api_v2_core_TcpKeepalive_parse(const char *buf, size_t size,
132 upb_arena *arena) {
133 envoy_api_v2_core_TcpKeepalive *ret = envoy_api_v2_core_TcpKeepalive_new(arena);
134 return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_TcpKeepalive_msginit, arena)) ? ret : NULL;
135 }
envoy_api_v2_core_TcpKeepalive_serialize(const envoy_api_v2_core_TcpKeepalive * msg,upb_arena * arena,size_t * len)136 UPB_INLINE char *envoy_api_v2_core_TcpKeepalive_serialize(const envoy_api_v2_core_TcpKeepalive *msg, upb_arena *arena, size_t *len) {
137 return upb_encode(msg, &envoy_api_v2_core_TcpKeepalive_msginit, arena, len);
138 }
139
envoy_api_v2_core_TcpKeepalive_has_keepalive_probes(const envoy_api_v2_core_TcpKeepalive * msg)140 UPB_INLINE bool envoy_api_v2_core_TcpKeepalive_has_keepalive_probes(const envoy_api_v2_core_TcpKeepalive *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
envoy_api_v2_core_TcpKeepalive_keepalive_probes(const envoy_api_v2_core_TcpKeepalive * msg)141 UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_keepalive_probes(const envoy_api_v2_core_TcpKeepalive *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_UInt32Value*); }
envoy_api_v2_core_TcpKeepalive_has_keepalive_time(const envoy_api_v2_core_TcpKeepalive * msg)142 UPB_INLINE bool envoy_api_v2_core_TcpKeepalive_has_keepalive_time(const envoy_api_v2_core_TcpKeepalive *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
envoy_api_v2_core_TcpKeepalive_keepalive_time(const envoy_api_v2_core_TcpKeepalive * msg)143 UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_keepalive_time(const envoy_api_v2_core_TcpKeepalive *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); }
envoy_api_v2_core_TcpKeepalive_has_keepalive_interval(const envoy_api_v2_core_TcpKeepalive * msg)144 UPB_INLINE bool envoy_api_v2_core_TcpKeepalive_has_keepalive_interval(const envoy_api_v2_core_TcpKeepalive *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
envoy_api_v2_core_TcpKeepalive_keepalive_interval(const envoy_api_v2_core_TcpKeepalive * msg)145 UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_keepalive_interval(const envoy_api_v2_core_TcpKeepalive *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt32Value*); }
146
envoy_api_v2_core_TcpKeepalive_set_keepalive_probes(envoy_api_v2_core_TcpKeepalive * msg,struct google_protobuf_UInt32Value * value)147 UPB_INLINE void envoy_api_v2_core_TcpKeepalive_set_keepalive_probes(envoy_api_v2_core_TcpKeepalive *msg, struct google_protobuf_UInt32Value* value) {
148 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_UInt32Value*) = value;
149 }
envoy_api_v2_core_TcpKeepalive_mutable_keepalive_probes(envoy_api_v2_core_TcpKeepalive * msg,upb_arena * arena)150 UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_mutable_keepalive_probes(envoy_api_v2_core_TcpKeepalive *msg, upb_arena *arena) {
151 struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_TcpKeepalive_keepalive_probes(msg);
152 if (sub == NULL) {
153 sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
154 if (!sub) return NULL;
155 envoy_api_v2_core_TcpKeepalive_set_keepalive_probes(msg, sub);
156 }
157 return sub;
158 }
envoy_api_v2_core_TcpKeepalive_set_keepalive_time(envoy_api_v2_core_TcpKeepalive * msg,struct google_protobuf_UInt32Value * value)159 UPB_INLINE void envoy_api_v2_core_TcpKeepalive_set_keepalive_time(envoy_api_v2_core_TcpKeepalive *msg, struct google_protobuf_UInt32Value* value) {
160 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value;
161 }
envoy_api_v2_core_TcpKeepalive_mutable_keepalive_time(envoy_api_v2_core_TcpKeepalive * msg,upb_arena * arena)162 UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_mutable_keepalive_time(envoy_api_v2_core_TcpKeepalive *msg, upb_arena *arena) {
163 struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_TcpKeepalive_keepalive_time(msg);
164 if (sub == NULL) {
165 sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
166 if (!sub) return NULL;
167 envoy_api_v2_core_TcpKeepalive_set_keepalive_time(msg, sub);
168 }
169 return sub;
170 }
envoy_api_v2_core_TcpKeepalive_set_keepalive_interval(envoy_api_v2_core_TcpKeepalive * msg,struct google_protobuf_UInt32Value * value)171 UPB_INLINE void envoy_api_v2_core_TcpKeepalive_set_keepalive_interval(envoy_api_v2_core_TcpKeepalive *msg, struct google_protobuf_UInt32Value* value) {
172 *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt32Value*) = value;
173 }
envoy_api_v2_core_TcpKeepalive_mutable_keepalive_interval(envoy_api_v2_core_TcpKeepalive * msg,upb_arena * arena)174 UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_mutable_keepalive_interval(envoy_api_v2_core_TcpKeepalive *msg, upb_arena *arena) {
175 struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_TcpKeepalive_keepalive_interval(msg);
176 if (sub == NULL) {
177 sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
178 if (!sub) return NULL;
179 envoy_api_v2_core_TcpKeepalive_set_keepalive_interval(msg, sub);
180 }
181 return sub;
182 }
183
184 /* envoy.api.v2.core.BindConfig */
185
envoy_api_v2_core_BindConfig_new(upb_arena * arena)186 UPB_INLINE envoy_api_v2_core_BindConfig *envoy_api_v2_core_BindConfig_new(upb_arena *arena) {
187 return (envoy_api_v2_core_BindConfig *)_upb_msg_new(&envoy_api_v2_core_BindConfig_msginit, arena);
188 }
envoy_api_v2_core_BindConfig_parse(const char * buf,size_t size,upb_arena * arena)189 UPB_INLINE envoy_api_v2_core_BindConfig *envoy_api_v2_core_BindConfig_parse(const char *buf, size_t size,
190 upb_arena *arena) {
191 envoy_api_v2_core_BindConfig *ret = envoy_api_v2_core_BindConfig_new(arena);
192 return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_BindConfig_msginit, arena)) ? ret : NULL;
193 }
envoy_api_v2_core_BindConfig_serialize(const envoy_api_v2_core_BindConfig * msg,upb_arena * arena,size_t * len)194 UPB_INLINE char *envoy_api_v2_core_BindConfig_serialize(const envoy_api_v2_core_BindConfig *msg, upb_arena *arena, size_t *len) {
195 return upb_encode(msg, &envoy_api_v2_core_BindConfig_msginit, arena, len);
196 }
197
envoy_api_v2_core_BindConfig_has_source_address(const envoy_api_v2_core_BindConfig * msg)198 UPB_INLINE bool envoy_api_v2_core_BindConfig_has_source_address(const envoy_api_v2_core_BindConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
envoy_api_v2_core_BindConfig_source_address(const envoy_api_v2_core_BindConfig * msg)199 UPB_INLINE const envoy_api_v2_core_SocketAddress* envoy_api_v2_core_BindConfig_source_address(const envoy_api_v2_core_BindConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const envoy_api_v2_core_SocketAddress*); }
envoy_api_v2_core_BindConfig_has_freebind(const envoy_api_v2_core_BindConfig * msg)200 UPB_INLINE bool envoy_api_v2_core_BindConfig_has_freebind(const envoy_api_v2_core_BindConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
envoy_api_v2_core_BindConfig_freebind(const envoy_api_v2_core_BindConfig * msg)201 UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_core_BindConfig_freebind(const envoy_api_v2_core_BindConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_BoolValue*); }
envoy_api_v2_core_BindConfig_has_socket_options(const envoy_api_v2_core_BindConfig * msg)202 UPB_INLINE bool envoy_api_v2_core_BindConfig_has_socket_options(const envoy_api_v2_core_BindConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
envoy_api_v2_core_BindConfig_socket_options(const envoy_api_v2_core_BindConfig * msg,size_t * len)203 UPB_INLINE const struct envoy_api_v2_core_SocketOption* const* envoy_api_v2_core_BindConfig_socket_options(const envoy_api_v2_core_BindConfig *msg, size_t *len) { return (const struct envoy_api_v2_core_SocketOption* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
204
envoy_api_v2_core_BindConfig_set_source_address(envoy_api_v2_core_BindConfig * msg,envoy_api_v2_core_SocketAddress * value)205 UPB_INLINE void envoy_api_v2_core_BindConfig_set_source_address(envoy_api_v2_core_BindConfig *msg, envoy_api_v2_core_SocketAddress* value) {
206 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), envoy_api_v2_core_SocketAddress*) = value;
207 }
envoy_api_v2_core_BindConfig_mutable_source_address(envoy_api_v2_core_BindConfig * msg,upb_arena * arena)208 UPB_INLINE struct envoy_api_v2_core_SocketAddress* envoy_api_v2_core_BindConfig_mutable_source_address(envoy_api_v2_core_BindConfig *msg, upb_arena *arena) {
209 struct envoy_api_v2_core_SocketAddress* sub = (struct envoy_api_v2_core_SocketAddress*)envoy_api_v2_core_BindConfig_source_address(msg);
210 if (sub == NULL) {
211 sub = (struct envoy_api_v2_core_SocketAddress*)_upb_msg_new(&envoy_api_v2_core_SocketAddress_msginit, arena);
212 if (!sub) return NULL;
213 envoy_api_v2_core_BindConfig_set_source_address(msg, sub);
214 }
215 return sub;
216 }
envoy_api_v2_core_BindConfig_set_freebind(envoy_api_v2_core_BindConfig * msg,struct google_protobuf_BoolValue * value)217 UPB_INLINE void envoy_api_v2_core_BindConfig_set_freebind(envoy_api_v2_core_BindConfig *msg, struct google_protobuf_BoolValue* value) {
218 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_BoolValue*) = value;
219 }
envoy_api_v2_core_BindConfig_mutable_freebind(envoy_api_v2_core_BindConfig * msg,upb_arena * arena)220 UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_core_BindConfig_mutable_freebind(envoy_api_v2_core_BindConfig *msg, upb_arena *arena) {
221 struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_core_BindConfig_freebind(msg);
222 if (sub == NULL) {
223 sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena);
224 if (!sub) return NULL;
225 envoy_api_v2_core_BindConfig_set_freebind(msg, sub);
226 }
227 return sub;
228 }
envoy_api_v2_core_BindConfig_mutable_socket_options(envoy_api_v2_core_BindConfig * msg,size_t * len)229 UPB_INLINE struct envoy_api_v2_core_SocketOption** envoy_api_v2_core_BindConfig_mutable_socket_options(envoy_api_v2_core_BindConfig *msg, size_t *len) {
230 return (struct envoy_api_v2_core_SocketOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
231 }
envoy_api_v2_core_BindConfig_resize_socket_options(envoy_api_v2_core_BindConfig * msg,size_t len,upb_arena * arena)232 UPB_INLINE struct envoy_api_v2_core_SocketOption** envoy_api_v2_core_BindConfig_resize_socket_options(envoy_api_v2_core_BindConfig *msg, size_t len, upb_arena *arena) {
233 return (struct envoy_api_v2_core_SocketOption**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_TYPE_MESSAGE, arena);
234 }
envoy_api_v2_core_BindConfig_add_socket_options(envoy_api_v2_core_BindConfig * msg,upb_arena * arena)235 UPB_INLINE struct envoy_api_v2_core_SocketOption* envoy_api_v2_core_BindConfig_add_socket_options(envoy_api_v2_core_BindConfig *msg, upb_arena *arena) {
236 struct envoy_api_v2_core_SocketOption* sub = (struct envoy_api_v2_core_SocketOption*)_upb_msg_new(&envoy_api_v2_core_SocketOption_msginit, arena);
237 bool ok = _upb_array_append_accessor(
238 msg, UPB_SIZE(8, 16), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
239 if (!ok) return NULL;
240 return sub;
241 }
242
243 /* envoy.api.v2.core.Address */
244
envoy_api_v2_core_Address_new(upb_arena * arena)245 UPB_INLINE envoy_api_v2_core_Address *envoy_api_v2_core_Address_new(upb_arena *arena) {
246 return (envoy_api_v2_core_Address *)_upb_msg_new(&envoy_api_v2_core_Address_msginit, arena);
247 }
envoy_api_v2_core_Address_parse(const char * buf,size_t size,upb_arena * arena)248 UPB_INLINE envoy_api_v2_core_Address *envoy_api_v2_core_Address_parse(const char *buf, size_t size,
249 upb_arena *arena) {
250 envoy_api_v2_core_Address *ret = envoy_api_v2_core_Address_new(arena);
251 return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_Address_msginit, arena)) ? ret : NULL;
252 }
envoy_api_v2_core_Address_serialize(const envoy_api_v2_core_Address * msg,upb_arena * arena,size_t * len)253 UPB_INLINE char *envoy_api_v2_core_Address_serialize(const envoy_api_v2_core_Address *msg, upb_arena *arena, size_t *len) {
254 return upb_encode(msg, &envoy_api_v2_core_Address_msginit, arena, len);
255 }
256
257 typedef enum {
258 envoy_api_v2_core_Address_address_socket_address = 1,
259 envoy_api_v2_core_Address_address_pipe = 2,
260 envoy_api_v2_core_Address_address_NOT_SET = 0
261 } envoy_api_v2_core_Address_address_oneofcases;
envoy_api_v2_core_Address_address_case(const envoy_api_v2_core_Address * msg)262 UPB_INLINE envoy_api_v2_core_Address_address_oneofcases envoy_api_v2_core_Address_address_case(const envoy_api_v2_core_Address* msg) { return (envoy_api_v2_core_Address_address_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); }
263
envoy_api_v2_core_Address_has_socket_address(const envoy_api_v2_core_Address * msg)264 UPB_INLINE bool envoy_api_v2_core_Address_has_socket_address(const envoy_api_v2_core_Address *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; }
envoy_api_v2_core_Address_socket_address(const envoy_api_v2_core_Address * msg)265 UPB_INLINE const envoy_api_v2_core_SocketAddress* envoy_api_v2_core_Address_socket_address(const envoy_api_v2_core_Address *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_SocketAddress*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); }
envoy_api_v2_core_Address_has_pipe(const envoy_api_v2_core_Address * msg)266 UPB_INLINE bool envoy_api_v2_core_Address_has_pipe(const envoy_api_v2_core_Address *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 2; }
envoy_api_v2_core_Address_pipe(const envoy_api_v2_core_Address * msg)267 UPB_INLINE const envoy_api_v2_core_Pipe* envoy_api_v2_core_Address_pipe(const envoy_api_v2_core_Address *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_Pipe*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); }
268
envoy_api_v2_core_Address_set_socket_address(envoy_api_v2_core_Address * msg,envoy_api_v2_core_SocketAddress * value)269 UPB_INLINE void envoy_api_v2_core_Address_set_socket_address(envoy_api_v2_core_Address *msg, envoy_api_v2_core_SocketAddress* value) {
270 UPB_WRITE_ONEOF(msg, envoy_api_v2_core_SocketAddress*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1);
271 }
envoy_api_v2_core_Address_mutable_socket_address(envoy_api_v2_core_Address * msg,upb_arena * arena)272 UPB_INLINE struct envoy_api_v2_core_SocketAddress* envoy_api_v2_core_Address_mutable_socket_address(envoy_api_v2_core_Address *msg, upb_arena *arena) {
273 struct envoy_api_v2_core_SocketAddress* sub = (struct envoy_api_v2_core_SocketAddress*)envoy_api_v2_core_Address_socket_address(msg);
274 if (sub == NULL) {
275 sub = (struct envoy_api_v2_core_SocketAddress*)_upb_msg_new(&envoy_api_v2_core_SocketAddress_msginit, arena);
276 if (!sub) return NULL;
277 envoy_api_v2_core_Address_set_socket_address(msg, sub);
278 }
279 return sub;
280 }
envoy_api_v2_core_Address_set_pipe(envoy_api_v2_core_Address * msg,envoy_api_v2_core_Pipe * value)281 UPB_INLINE void envoy_api_v2_core_Address_set_pipe(envoy_api_v2_core_Address *msg, envoy_api_v2_core_Pipe* value) {
282 UPB_WRITE_ONEOF(msg, envoy_api_v2_core_Pipe*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2);
283 }
envoy_api_v2_core_Address_mutable_pipe(envoy_api_v2_core_Address * msg,upb_arena * arena)284 UPB_INLINE struct envoy_api_v2_core_Pipe* envoy_api_v2_core_Address_mutable_pipe(envoy_api_v2_core_Address *msg, upb_arena *arena) {
285 struct envoy_api_v2_core_Pipe* sub = (struct envoy_api_v2_core_Pipe*)envoy_api_v2_core_Address_pipe(msg);
286 if (sub == NULL) {
287 sub = (struct envoy_api_v2_core_Pipe*)_upb_msg_new(&envoy_api_v2_core_Pipe_msginit, arena);
288 if (!sub) return NULL;
289 envoy_api_v2_core_Address_set_pipe(msg, sub);
290 }
291 return sub;
292 }
293
294 /* envoy.api.v2.core.CidrRange */
295
envoy_api_v2_core_CidrRange_new(upb_arena * arena)296 UPB_INLINE envoy_api_v2_core_CidrRange *envoy_api_v2_core_CidrRange_new(upb_arena *arena) {
297 return (envoy_api_v2_core_CidrRange *)_upb_msg_new(&envoy_api_v2_core_CidrRange_msginit, arena);
298 }
envoy_api_v2_core_CidrRange_parse(const char * buf,size_t size,upb_arena * arena)299 UPB_INLINE envoy_api_v2_core_CidrRange *envoy_api_v2_core_CidrRange_parse(const char *buf, size_t size,
300 upb_arena *arena) {
301 envoy_api_v2_core_CidrRange *ret = envoy_api_v2_core_CidrRange_new(arena);
302 return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_CidrRange_msginit, arena)) ? ret : NULL;
303 }
envoy_api_v2_core_CidrRange_serialize(const envoy_api_v2_core_CidrRange * msg,upb_arena * arena,size_t * len)304 UPB_INLINE char *envoy_api_v2_core_CidrRange_serialize(const envoy_api_v2_core_CidrRange *msg, upb_arena *arena, size_t *len) {
305 return upb_encode(msg, &envoy_api_v2_core_CidrRange_msginit, arena, len);
306 }
307
envoy_api_v2_core_CidrRange_address_prefix(const envoy_api_v2_core_CidrRange * msg)308 UPB_INLINE upb_strview envoy_api_v2_core_CidrRange_address_prefix(const envoy_api_v2_core_CidrRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
envoy_api_v2_core_CidrRange_has_prefix_len(const envoy_api_v2_core_CidrRange * msg)309 UPB_INLINE bool envoy_api_v2_core_CidrRange_has_prefix_len(const envoy_api_v2_core_CidrRange *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
envoy_api_v2_core_CidrRange_prefix_len(const envoy_api_v2_core_CidrRange * msg)310 UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_CidrRange_prefix_len(const envoy_api_v2_core_CidrRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt32Value*); }
311
envoy_api_v2_core_CidrRange_set_address_prefix(envoy_api_v2_core_CidrRange * msg,upb_strview value)312 UPB_INLINE void envoy_api_v2_core_CidrRange_set_address_prefix(envoy_api_v2_core_CidrRange *msg, upb_strview value) {
313 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
314 }
envoy_api_v2_core_CidrRange_set_prefix_len(envoy_api_v2_core_CidrRange * msg,struct google_protobuf_UInt32Value * value)315 UPB_INLINE void envoy_api_v2_core_CidrRange_set_prefix_len(envoy_api_v2_core_CidrRange *msg, struct google_protobuf_UInt32Value* value) {
316 *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt32Value*) = value;
317 }
envoy_api_v2_core_CidrRange_mutable_prefix_len(envoy_api_v2_core_CidrRange * msg,upb_arena * arena)318 UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_CidrRange_mutable_prefix_len(envoy_api_v2_core_CidrRange *msg, upb_arena *arena) {
319 struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_CidrRange_prefix_len(msg);
320 if (sub == NULL) {
321 sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
322 if (!sub) return NULL;
323 envoy_api_v2_core_CidrRange_set_prefix_len(msg, sub);
324 }
325 return sub;
326 }
327
328 #ifdef __cplusplus
329 } /* extern "C" */
330 #endif
331
332 #include "upb/port_undef.inc"
333
334 #endif /* ENVOY_API_V2_CORE_ADDRESS_PROTO_UPB_H_ */
335