1 /* This file was generated by upbc (the upb compiler) from the input
2 * file:
3 *
4 * envoy/config/core/v3/config_source.proto
5 *
6 * Do not edit -- your changes will be discarded when the file is
7 * regenerated. */
8
9 #ifndef ENVOY_CONFIG_CORE_V3_CONFIG_SOURCE_PROTO_UPB_H_
10 #define ENVOY_CONFIG_CORE_V3_CONFIG_SOURCE_PROTO_UPB_H_
11
12 #include "upb/msg.h"
13 #include "upb/decode.h"
14 #include "upb/decode_fast.h"
15 #include "upb/encode.h"
16
17 #include "upb/port_def.inc"
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23 struct envoy_config_core_v3_ApiConfigSource;
24 struct envoy_config_core_v3_AggregatedConfigSource;
25 struct envoy_config_core_v3_SelfConfigSource;
26 struct envoy_config_core_v3_RateLimitSettings;
27 struct envoy_config_core_v3_ConfigSource;
28 typedef struct envoy_config_core_v3_ApiConfigSource envoy_config_core_v3_ApiConfigSource;
29 typedef struct envoy_config_core_v3_AggregatedConfigSource envoy_config_core_v3_AggregatedConfigSource;
30 typedef struct envoy_config_core_v3_SelfConfigSource envoy_config_core_v3_SelfConfigSource;
31 typedef struct envoy_config_core_v3_RateLimitSettings envoy_config_core_v3_RateLimitSettings;
32 typedef struct envoy_config_core_v3_ConfigSource envoy_config_core_v3_ConfigSource;
33 extern const upb_msglayout envoy_config_core_v3_ApiConfigSource_msginit;
34 extern const upb_msglayout envoy_config_core_v3_AggregatedConfigSource_msginit;
35 extern const upb_msglayout envoy_config_core_v3_SelfConfigSource_msginit;
36 extern const upb_msglayout envoy_config_core_v3_RateLimitSettings_msginit;
37 extern const upb_msglayout envoy_config_core_v3_ConfigSource_msginit;
38 struct envoy_config_core_v3_GrpcService;
39 struct google_protobuf_DoubleValue;
40 struct google_protobuf_Duration;
41 struct google_protobuf_UInt32Value;
42 struct udpa_core_v1_Authority;
43 extern const upb_msglayout envoy_config_core_v3_GrpcService_msginit;
44 extern const upb_msglayout google_protobuf_DoubleValue_msginit;
45 extern const upb_msglayout google_protobuf_Duration_msginit;
46 extern const upb_msglayout google_protobuf_UInt32Value_msginit;
47 extern const upb_msglayout udpa_core_v1_Authority_msginit;
48
49 typedef enum {
50 envoy_config_core_v3_ApiConfigSource_DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE = 0,
51 envoy_config_core_v3_ApiConfigSource_REST = 1,
52 envoy_config_core_v3_ApiConfigSource_GRPC = 2,
53 envoy_config_core_v3_ApiConfigSource_DELTA_GRPC = 3,
54 envoy_config_core_v3_ApiConfigSource_AGGREGATED_GRPC = 5,
55 envoy_config_core_v3_ApiConfigSource_AGGREGATED_DELTA_GRPC = 6
56 } envoy_config_core_v3_ApiConfigSource_ApiType;
57
58 typedef enum {
59 envoy_config_core_v3_AUTO = 0,
60 envoy_config_core_v3_V2 = 1,
61 envoy_config_core_v3_V3 = 2
62 } envoy_config_core_v3_ApiVersion;
63
64
65 /* envoy.config.core.v3.ApiConfigSource */
66
envoy_config_core_v3_ApiConfigSource_new(upb_arena * arena)67 UPB_INLINE envoy_config_core_v3_ApiConfigSource *envoy_config_core_v3_ApiConfigSource_new(upb_arena *arena) {
68 return (envoy_config_core_v3_ApiConfigSource *)_upb_msg_new(&envoy_config_core_v3_ApiConfigSource_msginit, arena);
69 }
envoy_config_core_v3_ApiConfigSource_parse(const char * buf,size_t size,upb_arena * arena)70 UPB_INLINE envoy_config_core_v3_ApiConfigSource *envoy_config_core_v3_ApiConfigSource_parse(const char *buf, size_t size,
71 upb_arena *arena) {
72 envoy_config_core_v3_ApiConfigSource *ret = envoy_config_core_v3_ApiConfigSource_new(arena);
73 return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_ApiConfigSource_msginit, arena)) ? ret : NULL;
74 }
envoy_config_core_v3_ApiConfigSource_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)75 UPB_INLINE envoy_config_core_v3_ApiConfigSource *envoy_config_core_v3_ApiConfigSource_parse_ex(const char *buf, size_t size,
76 upb_arena *arena, int options) {
77 envoy_config_core_v3_ApiConfigSource *ret = envoy_config_core_v3_ApiConfigSource_new(arena);
78 return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_ApiConfigSource_msginit, arena, options))
79 ? ret : NULL;
80 }
envoy_config_core_v3_ApiConfigSource_serialize(const envoy_config_core_v3_ApiConfigSource * msg,upb_arena * arena,size_t * len)81 UPB_INLINE char *envoy_config_core_v3_ApiConfigSource_serialize(const envoy_config_core_v3_ApiConfigSource *msg, upb_arena *arena, size_t *len) {
82 return upb_encode(msg, &envoy_config_core_v3_ApiConfigSource_msginit, arena, len);
83 }
84
envoy_config_core_v3_ApiConfigSource_api_type(const envoy_config_core_v3_ApiConfigSource * msg)85 UPB_INLINE int32_t envoy_config_core_v3_ApiConfigSource_api_type(const envoy_config_core_v3_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
envoy_config_core_v3_ApiConfigSource_cluster_names(const envoy_config_core_v3_ApiConfigSource * msg,size_t * len)86 UPB_INLINE upb_strview const* envoy_config_core_v3_ApiConfigSource_cluster_names(const envoy_config_core_v3_ApiConfigSource *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 40), len); }
envoy_config_core_v3_ApiConfigSource_has_refresh_delay(const envoy_config_core_v3_ApiConfigSource * msg)87 UPB_INLINE bool envoy_config_core_v3_ApiConfigSource_has_refresh_delay(const envoy_config_core_v3_ApiConfigSource *msg) { return _upb_hasbit(msg, 1); }
envoy_config_core_v3_ApiConfigSource_refresh_delay(const envoy_config_core_v3_ApiConfigSource * msg)88 UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_ApiConfigSource_refresh_delay(const envoy_config_core_v3_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), const struct google_protobuf_Duration*); }
envoy_config_core_v3_ApiConfigSource_has_grpc_services(const envoy_config_core_v3_ApiConfigSource * msg)89 UPB_INLINE bool envoy_config_core_v3_ApiConfigSource_has_grpc_services(const envoy_config_core_v3_ApiConfigSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 48)); }
envoy_config_core_v3_ApiConfigSource_grpc_services(const envoy_config_core_v3_ApiConfigSource * msg,size_t * len)90 UPB_INLINE const struct envoy_config_core_v3_GrpcService* const* envoy_config_core_v3_ApiConfigSource_grpc_services(const envoy_config_core_v3_ApiConfigSource *msg, size_t *len) { return (const struct envoy_config_core_v3_GrpcService* const*)_upb_array_accessor(msg, UPB_SIZE(32, 48), len); }
envoy_config_core_v3_ApiConfigSource_has_request_timeout(const envoy_config_core_v3_ApiConfigSource * msg)91 UPB_INLINE bool envoy_config_core_v3_ApiConfigSource_has_request_timeout(const envoy_config_core_v3_ApiConfigSource *msg) { return _upb_hasbit(msg, 2); }
envoy_config_core_v3_ApiConfigSource_request_timeout(const envoy_config_core_v3_ApiConfigSource * msg)92 UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_ApiConfigSource_request_timeout(const envoy_config_core_v3_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 24), const struct google_protobuf_Duration*); }
envoy_config_core_v3_ApiConfigSource_has_rate_limit_settings(const envoy_config_core_v3_ApiConfigSource * msg)93 UPB_INLINE bool envoy_config_core_v3_ApiConfigSource_has_rate_limit_settings(const envoy_config_core_v3_ApiConfigSource *msg) { return _upb_hasbit(msg, 3); }
envoy_config_core_v3_ApiConfigSource_rate_limit_settings(const envoy_config_core_v3_ApiConfigSource * msg)94 UPB_INLINE const envoy_config_core_v3_RateLimitSettings* envoy_config_core_v3_ApiConfigSource_rate_limit_settings(const envoy_config_core_v3_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 32), const envoy_config_core_v3_RateLimitSettings*); }
envoy_config_core_v3_ApiConfigSource_set_node_on_first_message_only(const envoy_config_core_v3_ApiConfigSource * msg)95 UPB_INLINE bool envoy_config_core_v3_ApiConfigSource_set_node_on_first_message_only(const envoy_config_core_v3_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool); }
envoy_config_core_v3_ApiConfigSource_transport_api_version(const envoy_config_core_v3_ApiConfigSource * msg)96 UPB_INLINE int32_t envoy_config_core_v3_ApiConfigSource_transport_api_version(const envoy_config_core_v3_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); }
97
envoy_config_core_v3_ApiConfigSource_set_api_type(envoy_config_core_v3_ApiConfigSource * msg,int32_t value)98 UPB_INLINE void envoy_config_core_v3_ApiConfigSource_set_api_type(envoy_config_core_v3_ApiConfigSource *msg, int32_t value) {
99 *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
100 }
envoy_config_core_v3_ApiConfigSource_mutable_cluster_names(envoy_config_core_v3_ApiConfigSource * msg,size_t * len)101 UPB_INLINE upb_strview* envoy_config_core_v3_ApiConfigSource_mutable_cluster_names(envoy_config_core_v3_ApiConfigSource *msg, size_t *len) {
102 return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 40), len);
103 }
envoy_config_core_v3_ApiConfigSource_resize_cluster_names(envoy_config_core_v3_ApiConfigSource * msg,size_t len,upb_arena * arena)104 UPB_INLINE upb_strview* envoy_config_core_v3_ApiConfigSource_resize_cluster_names(envoy_config_core_v3_ApiConfigSource *msg, size_t len, upb_arena *arena) {
105 return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 40), len, UPB_SIZE(3, 4), arena);
106 }
envoy_config_core_v3_ApiConfigSource_add_cluster_names(envoy_config_core_v3_ApiConfigSource * msg,upb_strview val,upb_arena * arena)107 UPB_INLINE bool envoy_config_core_v3_ApiConfigSource_add_cluster_names(envoy_config_core_v3_ApiConfigSource *msg, upb_strview val, upb_arena *arena) {
108 return _upb_array_append_accessor2(msg, UPB_SIZE(28, 40), UPB_SIZE(3, 4), &val,
109 arena);
110 }
envoy_config_core_v3_ApiConfigSource_set_refresh_delay(envoy_config_core_v3_ApiConfigSource * msg,struct google_protobuf_Duration * value)111 UPB_INLINE void envoy_config_core_v3_ApiConfigSource_set_refresh_delay(envoy_config_core_v3_ApiConfigSource *msg, struct google_protobuf_Duration* value) {
112 _upb_sethas(msg, 1);
113 *UPB_PTR_AT(msg, UPB_SIZE(16, 16), struct google_protobuf_Duration*) = value;
114 }
envoy_config_core_v3_ApiConfigSource_mutable_refresh_delay(envoy_config_core_v3_ApiConfigSource * msg,upb_arena * arena)115 UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_ApiConfigSource_mutable_refresh_delay(envoy_config_core_v3_ApiConfigSource *msg, upb_arena *arena) {
116 struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_core_v3_ApiConfigSource_refresh_delay(msg);
117 if (sub == NULL) {
118 sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
119 if (!sub) return NULL;
120 envoy_config_core_v3_ApiConfigSource_set_refresh_delay(msg, sub);
121 }
122 return sub;
123 }
envoy_config_core_v3_ApiConfigSource_mutable_grpc_services(envoy_config_core_v3_ApiConfigSource * msg,size_t * len)124 UPB_INLINE struct envoy_config_core_v3_GrpcService** envoy_config_core_v3_ApiConfigSource_mutable_grpc_services(envoy_config_core_v3_ApiConfigSource *msg, size_t *len) {
125 return (struct envoy_config_core_v3_GrpcService**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 48), len);
126 }
envoy_config_core_v3_ApiConfigSource_resize_grpc_services(envoy_config_core_v3_ApiConfigSource * msg,size_t len,upb_arena * arena)127 UPB_INLINE struct envoy_config_core_v3_GrpcService** envoy_config_core_v3_ApiConfigSource_resize_grpc_services(envoy_config_core_v3_ApiConfigSource *msg, size_t len, upb_arena *arena) {
128 return (struct envoy_config_core_v3_GrpcService**)_upb_array_resize_accessor2(msg, UPB_SIZE(32, 48), len, UPB_SIZE(2, 3), arena);
129 }
envoy_config_core_v3_ApiConfigSource_add_grpc_services(envoy_config_core_v3_ApiConfigSource * msg,upb_arena * arena)130 UPB_INLINE struct envoy_config_core_v3_GrpcService* envoy_config_core_v3_ApiConfigSource_add_grpc_services(envoy_config_core_v3_ApiConfigSource *msg, upb_arena *arena) {
131 struct envoy_config_core_v3_GrpcService* sub = (struct envoy_config_core_v3_GrpcService*)_upb_msg_new(&envoy_config_core_v3_GrpcService_msginit, arena);
132 bool ok = _upb_array_append_accessor2(
133 msg, UPB_SIZE(32, 48), UPB_SIZE(2, 3), &sub, arena);
134 if (!ok) return NULL;
135 return sub;
136 }
envoy_config_core_v3_ApiConfigSource_set_request_timeout(envoy_config_core_v3_ApiConfigSource * msg,struct google_protobuf_Duration * value)137 UPB_INLINE void envoy_config_core_v3_ApiConfigSource_set_request_timeout(envoy_config_core_v3_ApiConfigSource *msg, struct google_protobuf_Duration* value) {
138 _upb_sethas(msg, 2);
139 *UPB_PTR_AT(msg, UPB_SIZE(20, 24), struct google_protobuf_Duration*) = value;
140 }
envoy_config_core_v3_ApiConfigSource_mutable_request_timeout(envoy_config_core_v3_ApiConfigSource * msg,upb_arena * arena)141 UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_ApiConfigSource_mutable_request_timeout(envoy_config_core_v3_ApiConfigSource *msg, upb_arena *arena) {
142 struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_core_v3_ApiConfigSource_request_timeout(msg);
143 if (sub == NULL) {
144 sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
145 if (!sub) return NULL;
146 envoy_config_core_v3_ApiConfigSource_set_request_timeout(msg, sub);
147 }
148 return sub;
149 }
envoy_config_core_v3_ApiConfigSource_set_rate_limit_settings(envoy_config_core_v3_ApiConfigSource * msg,envoy_config_core_v3_RateLimitSettings * value)150 UPB_INLINE void envoy_config_core_v3_ApiConfigSource_set_rate_limit_settings(envoy_config_core_v3_ApiConfigSource *msg, envoy_config_core_v3_RateLimitSettings* value) {
151 _upb_sethas(msg, 3);
152 *UPB_PTR_AT(msg, UPB_SIZE(24, 32), envoy_config_core_v3_RateLimitSettings*) = value;
153 }
envoy_config_core_v3_ApiConfigSource_mutable_rate_limit_settings(envoy_config_core_v3_ApiConfigSource * msg,upb_arena * arena)154 UPB_INLINE struct envoy_config_core_v3_RateLimitSettings* envoy_config_core_v3_ApiConfigSource_mutable_rate_limit_settings(envoy_config_core_v3_ApiConfigSource *msg, upb_arena *arena) {
155 struct envoy_config_core_v3_RateLimitSettings* sub = (struct envoy_config_core_v3_RateLimitSettings*)envoy_config_core_v3_ApiConfigSource_rate_limit_settings(msg);
156 if (sub == NULL) {
157 sub = (struct envoy_config_core_v3_RateLimitSettings*)_upb_msg_new(&envoy_config_core_v3_RateLimitSettings_msginit, arena);
158 if (!sub) return NULL;
159 envoy_config_core_v3_ApiConfigSource_set_rate_limit_settings(msg, sub);
160 }
161 return sub;
162 }
envoy_config_core_v3_ApiConfigSource_set_set_node_on_first_message_only(envoy_config_core_v3_ApiConfigSource * msg,bool value)163 UPB_INLINE void envoy_config_core_v3_ApiConfigSource_set_set_node_on_first_message_only(envoy_config_core_v3_ApiConfigSource *msg, bool value) {
164 *UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool) = value;
165 }
envoy_config_core_v3_ApiConfigSource_set_transport_api_version(envoy_config_core_v3_ApiConfigSource * msg,int32_t value)166 UPB_INLINE void envoy_config_core_v3_ApiConfigSource_set_transport_api_version(envoy_config_core_v3_ApiConfigSource *msg, int32_t value) {
167 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
168 }
169
170 /* envoy.config.core.v3.AggregatedConfigSource */
171
envoy_config_core_v3_AggregatedConfigSource_new(upb_arena * arena)172 UPB_INLINE envoy_config_core_v3_AggregatedConfigSource *envoy_config_core_v3_AggregatedConfigSource_new(upb_arena *arena) {
173 return (envoy_config_core_v3_AggregatedConfigSource *)_upb_msg_new(&envoy_config_core_v3_AggregatedConfigSource_msginit, arena);
174 }
envoy_config_core_v3_AggregatedConfigSource_parse(const char * buf,size_t size,upb_arena * arena)175 UPB_INLINE envoy_config_core_v3_AggregatedConfigSource *envoy_config_core_v3_AggregatedConfigSource_parse(const char *buf, size_t size,
176 upb_arena *arena) {
177 envoy_config_core_v3_AggregatedConfigSource *ret = envoy_config_core_v3_AggregatedConfigSource_new(arena);
178 return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_AggregatedConfigSource_msginit, arena)) ? ret : NULL;
179 }
envoy_config_core_v3_AggregatedConfigSource_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)180 UPB_INLINE envoy_config_core_v3_AggregatedConfigSource *envoy_config_core_v3_AggregatedConfigSource_parse_ex(const char *buf, size_t size,
181 upb_arena *arena, int options) {
182 envoy_config_core_v3_AggregatedConfigSource *ret = envoy_config_core_v3_AggregatedConfigSource_new(arena);
183 return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_AggregatedConfigSource_msginit, arena, options))
184 ? ret : NULL;
185 }
envoy_config_core_v3_AggregatedConfigSource_serialize(const envoy_config_core_v3_AggregatedConfigSource * msg,upb_arena * arena,size_t * len)186 UPB_INLINE char *envoy_config_core_v3_AggregatedConfigSource_serialize(const envoy_config_core_v3_AggregatedConfigSource *msg, upb_arena *arena, size_t *len) {
187 return upb_encode(msg, &envoy_config_core_v3_AggregatedConfigSource_msginit, arena, len);
188 }
189
190
191
192 /* envoy.config.core.v3.SelfConfigSource */
193
envoy_config_core_v3_SelfConfigSource_new(upb_arena * arena)194 UPB_INLINE envoy_config_core_v3_SelfConfigSource *envoy_config_core_v3_SelfConfigSource_new(upb_arena *arena) {
195 return (envoy_config_core_v3_SelfConfigSource *)_upb_msg_new(&envoy_config_core_v3_SelfConfigSource_msginit, arena);
196 }
envoy_config_core_v3_SelfConfigSource_parse(const char * buf,size_t size,upb_arena * arena)197 UPB_INLINE envoy_config_core_v3_SelfConfigSource *envoy_config_core_v3_SelfConfigSource_parse(const char *buf, size_t size,
198 upb_arena *arena) {
199 envoy_config_core_v3_SelfConfigSource *ret = envoy_config_core_v3_SelfConfigSource_new(arena);
200 return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_SelfConfigSource_msginit, arena)) ? ret : NULL;
201 }
envoy_config_core_v3_SelfConfigSource_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)202 UPB_INLINE envoy_config_core_v3_SelfConfigSource *envoy_config_core_v3_SelfConfigSource_parse_ex(const char *buf, size_t size,
203 upb_arena *arena, int options) {
204 envoy_config_core_v3_SelfConfigSource *ret = envoy_config_core_v3_SelfConfigSource_new(arena);
205 return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_SelfConfigSource_msginit, arena, options))
206 ? ret : NULL;
207 }
envoy_config_core_v3_SelfConfigSource_serialize(const envoy_config_core_v3_SelfConfigSource * msg,upb_arena * arena,size_t * len)208 UPB_INLINE char *envoy_config_core_v3_SelfConfigSource_serialize(const envoy_config_core_v3_SelfConfigSource *msg, upb_arena *arena, size_t *len) {
209 return upb_encode(msg, &envoy_config_core_v3_SelfConfigSource_msginit, arena, len);
210 }
211
envoy_config_core_v3_SelfConfigSource_transport_api_version(const envoy_config_core_v3_SelfConfigSource * msg)212 UPB_INLINE int32_t envoy_config_core_v3_SelfConfigSource_transport_api_version(const envoy_config_core_v3_SelfConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
213
envoy_config_core_v3_SelfConfigSource_set_transport_api_version(envoy_config_core_v3_SelfConfigSource * msg,int32_t value)214 UPB_INLINE void envoy_config_core_v3_SelfConfigSource_set_transport_api_version(envoy_config_core_v3_SelfConfigSource *msg, int32_t value) {
215 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
216 }
217
218 /* envoy.config.core.v3.RateLimitSettings */
219
envoy_config_core_v3_RateLimitSettings_new(upb_arena * arena)220 UPB_INLINE envoy_config_core_v3_RateLimitSettings *envoy_config_core_v3_RateLimitSettings_new(upb_arena *arena) {
221 return (envoy_config_core_v3_RateLimitSettings *)_upb_msg_new(&envoy_config_core_v3_RateLimitSettings_msginit, arena);
222 }
envoy_config_core_v3_RateLimitSettings_parse(const char * buf,size_t size,upb_arena * arena)223 UPB_INLINE envoy_config_core_v3_RateLimitSettings *envoy_config_core_v3_RateLimitSettings_parse(const char *buf, size_t size,
224 upb_arena *arena) {
225 envoy_config_core_v3_RateLimitSettings *ret = envoy_config_core_v3_RateLimitSettings_new(arena);
226 return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_RateLimitSettings_msginit, arena)) ? ret : NULL;
227 }
envoy_config_core_v3_RateLimitSettings_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)228 UPB_INLINE envoy_config_core_v3_RateLimitSettings *envoy_config_core_v3_RateLimitSettings_parse_ex(const char *buf, size_t size,
229 upb_arena *arena, int options) {
230 envoy_config_core_v3_RateLimitSettings *ret = envoy_config_core_v3_RateLimitSettings_new(arena);
231 return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_RateLimitSettings_msginit, arena, options))
232 ? ret : NULL;
233 }
envoy_config_core_v3_RateLimitSettings_serialize(const envoy_config_core_v3_RateLimitSettings * msg,upb_arena * arena,size_t * len)234 UPB_INLINE char *envoy_config_core_v3_RateLimitSettings_serialize(const envoy_config_core_v3_RateLimitSettings *msg, upb_arena *arena, size_t *len) {
235 return upb_encode(msg, &envoy_config_core_v3_RateLimitSettings_msginit, arena, len);
236 }
237
envoy_config_core_v3_RateLimitSettings_has_max_tokens(const envoy_config_core_v3_RateLimitSettings * msg)238 UPB_INLINE bool envoy_config_core_v3_RateLimitSettings_has_max_tokens(const envoy_config_core_v3_RateLimitSettings *msg) { return _upb_hasbit(msg, 1); }
envoy_config_core_v3_RateLimitSettings_max_tokens(const envoy_config_core_v3_RateLimitSettings * msg)239 UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_RateLimitSettings_max_tokens(const envoy_config_core_v3_RateLimitSettings *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); }
envoy_config_core_v3_RateLimitSettings_has_fill_rate(const envoy_config_core_v3_RateLimitSettings * msg)240 UPB_INLINE bool envoy_config_core_v3_RateLimitSettings_has_fill_rate(const envoy_config_core_v3_RateLimitSettings *msg) { return _upb_hasbit(msg, 2); }
envoy_config_core_v3_RateLimitSettings_fill_rate(const envoy_config_core_v3_RateLimitSettings * msg)241 UPB_INLINE const struct google_protobuf_DoubleValue* envoy_config_core_v3_RateLimitSettings_fill_rate(const envoy_config_core_v3_RateLimitSettings *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_DoubleValue*); }
242
envoy_config_core_v3_RateLimitSettings_set_max_tokens(envoy_config_core_v3_RateLimitSettings * msg,struct google_protobuf_UInt32Value * value)243 UPB_INLINE void envoy_config_core_v3_RateLimitSettings_set_max_tokens(envoy_config_core_v3_RateLimitSettings *msg, struct google_protobuf_UInt32Value* value) {
244 _upb_sethas(msg, 1);
245 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value;
246 }
envoy_config_core_v3_RateLimitSettings_mutable_max_tokens(envoy_config_core_v3_RateLimitSettings * msg,upb_arena * arena)247 UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_RateLimitSettings_mutable_max_tokens(envoy_config_core_v3_RateLimitSettings *msg, upb_arena *arena) {
248 struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_RateLimitSettings_max_tokens(msg);
249 if (sub == NULL) {
250 sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
251 if (!sub) return NULL;
252 envoy_config_core_v3_RateLimitSettings_set_max_tokens(msg, sub);
253 }
254 return sub;
255 }
envoy_config_core_v3_RateLimitSettings_set_fill_rate(envoy_config_core_v3_RateLimitSettings * msg,struct google_protobuf_DoubleValue * value)256 UPB_INLINE void envoy_config_core_v3_RateLimitSettings_set_fill_rate(envoy_config_core_v3_RateLimitSettings *msg, struct google_protobuf_DoubleValue* value) {
257 _upb_sethas(msg, 2);
258 *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_DoubleValue*) = value;
259 }
envoy_config_core_v3_RateLimitSettings_mutable_fill_rate(envoy_config_core_v3_RateLimitSettings * msg,upb_arena * arena)260 UPB_INLINE struct google_protobuf_DoubleValue* envoy_config_core_v3_RateLimitSettings_mutable_fill_rate(envoy_config_core_v3_RateLimitSettings *msg, upb_arena *arena) {
261 struct google_protobuf_DoubleValue* sub = (struct google_protobuf_DoubleValue*)envoy_config_core_v3_RateLimitSettings_fill_rate(msg);
262 if (sub == NULL) {
263 sub = (struct google_protobuf_DoubleValue*)_upb_msg_new(&google_protobuf_DoubleValue_msginit, arena);
264 if (!sub) return NULL;
265 envoy_config_core_v3_RateLimitSettings_set_fill_rate(msg, sub);
266 }
267 return sub;
268 }
269
270 /* envoy.config.core.v3.ConfigSource */
271
envoy_config_core_v3_ConfigSource_new(upb_arena * arena)272 UPB_INLINE envoy_config_core_v3_ConfigSource *envoy_config_core_v3_ConfigSource_new(upb_arena *arena) {
273 return (envoy_config_core_v3_ConfigSource *)_upb_msg_new(&envoy_config_core_v3_ConfigSource_msginit, arena);
274 }
envoy_config_core_v3_ConfigSource_parse(const char * buf,size_t size,upb_arena * arena)275 UPB_INLINE envoy_config_core_v3_ConfigSource *envoy_config_core_v3_ConfigSource_parse(const char *buf, size_t size,
276 upb_arena *arena) {
277 envoy_config_core_v3_ConfigSource *ret = envoy_config_core_v3_ConfigSource_new(arena);
278 return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_ConfigSource_msginit, arena)) ? ret : NULL;
279 }
envoy_config_core_v3_ConfigSource_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)280 UPB_INLINE envoy_config_core_v3_ConfigSource *envoy_config_core_v3_ConfigSource_parse_ex(const char *buf, size_t size,
281 upb_arena *arena, int options) {
282 envoy_config_core_v3_ConfigSource *ret = envoy_config_core_v3_ConfigSource_new(arena);
283 return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_ConfigSource_msginit, arena, options))
284 ? ret : NULL;
285 }
envoy_config_core_v3_ConfigSource_serialize(const envoy_config_core_v3_ConfigSource * msg,upb_arena * arena,size_t * len)286 UPB_INLINE char *envoy_config_core_v3_ConfigSource_serialize(const envoy_config_core_v3_ConfigSource *msg, upb_arena *arena, size_t *len) {
287 return upb_encode(msg, &envoy_config_core_v3_ConfigSource_msginit, arena, len);
288 }
289
290 typedef enum {
291 envoy_config_core_v3_ConfigSource_config_source_specifier_path = 1,
292 envoy_config_core_v3_ConfigSource_config_source_specifier_api_config_source = 2,
293 envoy_config_core_v3_ConfigSource_config_source_specifier_ads = 3,
294 envoy_config_core_v3_ConfigSource_config_source_specifier_self = 5,
295 envoy_config_core_v3_ConfigSource_config_source_specifier_NOT_SET = 0
296 } envoy_config_core_v3_ConfigSource_config_source_specifier_oneofcases;
envoy_config_core_v3_ConfigSource_config_source_specifier_case(const envoy_config_core_v3_ConfigSource * msg)297 UPB_INLINE envoy_config_core_v3_ConfigSource_config_source_specifier_oneofcases envoy_config_core_v3_ConfigSource_config_source_specifier_case(const envoy_config_core_v3_ConfigSource* msg) { return (envoy_config_core_v3_ConfigSource_config_source_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(24, 40), int32_t); }
298
envoy_config_core_v3_ConfigSource_has_path(const envoy_config_core_v3_ConfigSource * msg)299 UPB_INLINE bool envoy_config_core_v3_ConfigSource_has_path(const envoy_config_core_v3_ConfigSource *msg) { return _upb_getoneofcase(msg, UPB_SIZE(24, 40)) == 1; }
envoy_config_core_v3_ConfigSource_path(const envoy_config_core_v3_ConfigSource * msg)300 UPB_INLINE upb_strview envoy_config_core_v3_ConfigSource_path(const envoy_config_core_v3_ConfigSource *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(16, 24), UPB_SIZE(24, 40), 1, upb_strview_make("", strlen(""))); }
envoy_config_core_v3_ConfigSource_has_api_config_source(const envoy_config_core_v3_ConfigSource * msg)301 UPB_INLINE bool envoy_config_core_v3_ConfigSource_has_api_config_source(const envoy_config_core_v3_ConfigSource *msg) { return _upb_getoneofcase(msg, UPB_SIZE(24, 40)) == 2; }
envoy_config_core_v3_ConfigSource_api_config_source(const envoy_config_core_v3_ConfigSource * msg)302 UPB_INLINE const envoy_config_core_v3_ApiConfigSource* envoy_config_core_v3_ConfigSource_api_config_source(const envoy_config_core_v3_ConfigSource *msg) { return UPB_READ_ONEOF(msg, const envoy_config_core_v3_ApiConfigSource*, UPB_SIZE(16, 24), UPB_SIZE(24, 40), 2, NULL); }
envoy_config_core_v3_ConfigSource_has_ads(const envoy_config_core_v3_ConfigSource * msg)303 UPB_INLINE bool envoy_config_core_v3_ConfigSource_has_ads(const envoy_config_core_v3_ConfigSource *msg) { return _upb_getoneofcase(msg, UPB_SIZE(24, 40)) == 3; }
envoy_config_core_v3_ConfigSource_ads(const envoy_config_core_v3_ConfigSource * msg)304 UPB_INLINE const envoy_config_core_v3_AggregatedConfigSource* envoy_config_core_v3_ConfigSource_ads(const envoy_config_core_v3_ConfigSource *msg) { return UPB_READ_ONEOF(msg, const envoy_config_core_v3_AggregatedConfigSource*, UPB_SIZE(16, 24), UPB_SIZE(24, 40), 3, NULL); }
envoy_config_core_v3_ConfigSource_has_initial_fetch_timeout(const envoy_config_core_v3_ConfigSource * msg)305 UPB_INLINE bool envoy_config_core_v3_ConfigSource_has_initial_fetch_timeout(const envoy_config_core_v3_ConfigSource *msg) { return _upb_hasbit(msg, 1); }
envoy_config_core_v3_ConfigSource_initial_fetch_timeout(const envoy_config_core_v3_ConfigSource * msg)306 UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_ConfigSource_initial_fetch_timeout(const envoy_config_core_v3_ConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const struct google_protobuf_Duration*); }
envoy_config_core_v3_ConfigSource_has_self(const envoy_config_core_v3_ConfigSource * msg)307 UPB_INLINE bool envoy_config_core_v3_ConfigSource_has_self(const envoy_config_core_v3_ConfigSource *msg) { return _upb_getoneofcase(msg, UPB_SIZE(24, 40)) == 5; }
envoy_config_core_v3_ConfigSource_self(const envoy_config_core_v3_ConfigSource * msg)308 UPB_INLINE const envoy_config_core_v3_SelfConfigSource* envoy_config_core_v3_ConfigSource_self(const envoy_config_core_v3_ConfigSource *msg) { return UPB_READ_ONEOF(msg, const envoy_config_core_v3_SelfConfigSource*, UPB_SIZE(16, 24), UPB_SIZE(24, 40), 5, NULL); }
envoy_config_core_v3_ConfigSource_resource_api_version(const envoy_config_core_v3_ConfigSource * msg)309 UPB_INLINE int32_t envoy_config_core_v3_ConfigSource_resource_api_version(const envoy_config_core_v3_ConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
envoy_config_core_v3_ConfigSource_has_authorities(const envoy_config_core_v3_ConfigSource * msg)310 UPB_INLINE bool envoy_config_core_v3_ConfigSource_has_authorities(const envoy_config_core_v3_ConfigSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 16)); }
envoy_config_core_v3_ConfigSource_authorities(const envoy_config_core_v3_ConfigSource * msg,size_t * len)311 UPB_INLINE const struct udpa_core_v1_Authority* const* envoy_config_core_v3_ConfigSource_authorities(const envoy_config_core_v3_ConfigSource *msg, size_t *len) { return (const struct udpa_core_v1_Authority* const*)_upb_array_accessor(msg, UPB_SIZE(12, 16), len); }
312
envoy_config_core_v3_ConfigSource_set_path(envoy_config_core_v3_ConfigSource * msg,upb_strview value)313 UPB_INLINE void envoy_config_core_v3_ConfigSource_set_path(envoy_config_core_v3_ConfigSource *msg, upb_strview value) {
314 UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(16, 24), value, UPB_SIZE(24, 40), 1);
315 }
envoy_config_core_v3_ConfigSource_set_api_config_source(envoy_config_core_v3_ConfigSource * msg,envoy_config_core_v3_ApiConfigSource * value)316 UPB_INLINE void envoy_config_core_v3_ConfigSource_set_api_config_source(envoy_config_core_v3_ConfigSource *msg, envoy_config_core_v3_ApiConfigSource* value) {
317 UPB_WRITE_ONEOF(msg, envoy_config_core_v3_ApiConfigSource*, UPB_SIZE(16, 24), value, UPB_SIZE(24, 40), 2);
318 }
envoy_config_core_v3_ConfigSource_mutable_api_config_source(envoy_config_core_v3_ConfigSource * msg,upb_arena * arena)319 UPB_INLINE struct envoy_config_core_v3_ApiConfigSource* envoy_config_core_v3_ConfigSource_mutable_api_config_source(envoy_config_core_v3_ConfigSource *msg, upb_arena *arena) {
320 struct envoy_config_core_v3_ApiConfigSource* sub = (struct envoy_config_core_v3_ApiConfigSource*)envoy_config_core_v3_ConfigSource_api_config_source(msg);
321 if (sub == NULL) {
322 sub = (struct envoy_config_core_v3_ApiConfigSource*)_upb_msg_new(&envoy_config_core_v3_ApiConfigSource_msginit, arena);
323 if (!sub) return NULL;
324 envoy_config_core_v3_ConfigSource_set_api_config_source(msg, sub);
325 }
326 return sub;
327 }
envoy_config_core_v3_ConfigSource_set_ads(envoy_config_core_v3_ConfigSource * msg,envoy_config_core_v3_AggregatedConfigSource * value)328 UPB_INLINE void envoy_config_core_v3_ConfigSource_set_ads(envoy_config_core_v3_ConfigSource *msg, envoy_config_core_v3_AggregatedConfigSource* value) {
329 UPB_WRITE_ONEOF(msg, envoy_config_core_v3_AggregatedConfigSource*, UPB_SIZE(16, 24), value, UPB_SIZE(24, 40), 3);
330 }
envoy_config_core_v3_ConfigSource_mutable_ads(envoy_config_core_v3_ConfigSource * msg,upb_arena * arena)331 UPB_INLINE struct envoy_config_core_v3_AggregatedConfigSource* envoy_config_core_v3_ConfigSource_mutable_ads(envoy_config_core_v3_ConfigSource *msg, upb_arena *arena) {
332 struct envoy_config_core_v3_AggregatedConfigSource* sub = (struct envoy_config_core_v3_AggregatedConfigSource*)envoy_config_core_v3_ConfigSource_ads(msg);
333 if (sub == NULL) {
334 sub = (struct envoy_config_core_v3_AggregatedConfigSource*)_upb_msg_new(&envoy_config_core_v3_AggregatedConfigSource_msginit, arena);
335 if (!sub) return NULL;
336 envoy_config_core_v3_ConfigSource_set_ads(msg, sub);
337 }
338 return sub;
339 }
envoy_config_core_v3_ConfigSource_set_initial_fetch_timeout(envoy_config_core_v3_ConfigSource * msg,struct google_protobuf_Duration * value)340 UPB_INLINE void envoy_config_core_v3_ConfigSource_set_initial_fetch_timeout(envoy_config_core_v3_ConfigSource *msg, struct google_protobuf_Duration* value) {
341 _upb_sethas(msg, 1);
342 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), struct google_protobuf_Duration*) = value;
343 }
envoy_config_core_v3_ConfigSource_mutable_initial_fetch_timeout(envoy_config_core_v3_ConfigSource * msg,upb_arena * arena)344 UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_ConfigSource_mutable_initial_fetch_timeout(envoy_config_core_v3_ConfigSource *msg, upb_arena *arena) {
345 struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_core_v3_ConfigSource_initial_fetch_timeout(msg);
346 if (sub == NULL) {
347 sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
348 if (!sub) return NULL;
349 envoy_config_core_v3_ConfigSource_set_initial_fetch_timeout(msg, sub);
350 }
351 return sub;
352 }
envoy_config_core_v3_ConfigSource_set_self(envoy_config_core_v3_ConfigSource * msg,envoy_config_core_v3_SelfConfigSource * value)353 UPB_INLINE void envoy_config_core_v3_ConfigSource_set_self(envoy_config_core_v3_ConfigSource *msg, envoy_config_core_v3_SelfConfigSource* value) {
354 UPB_WRITE_ONEOF(msg, envoy_config_core_v3_SelfConfigSource*, UPB_SIZE(16, 24), value, UPB_SIZE(24, 40), 5);
355 }
envoy_config_core_v3_ConfigSource_mutable_self(envoy_config_core_v3_ConfigSource * msg,upb_arena * arena)356 UPB_INLINE struct envoy_config_core_v3_SelfConfigSource* envoy_config_core_v3_ConfigSource_mutable_self(envoy_config_core_v3_ConfigSource *msg, upb_arena *arena) {
357 struct envoy_config_core_v3_SelfConfigSource* sub = (struct envoy_config_core_v3_SelfConfigSource*)envoy_config_core_v3_ConfigSource_self(msg);
358 if (sub == NULL) {
359 sub = (struct envoy_config_core_v3_SelfConfigSource*)_upb_msg_new(&envoy_config_core_v3_SelfConfigSource_msginit, arena);
360 if (!sub) return NULL;
361 envoy_config_core_v3_ConfigSource_set_self(msg, sub);
362 }
363 return sub;
364 }
envoy_config_core_v3_ConfigSource_set_resource_api_version(envoy_config_core_v3_ConfigSource * msg,int32_t value)365 UPB_INLINE void envoy_config_core_v3_ConfigSource_set_resource_api_version(envoy_config_core_v3_ConfigSource *msg, int32_t value) {
366 *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
367 }
envoy_config_core_v3_ConfigSource_mutable_authorities(envoy_config_core_v3_ConfigSource * msg,size_t * len)368 UPB_INLINE struct udpa_core_v1_Authority** envoy_config_core_v3_ConfigSource_mutable_authorities(envoy_config_core_v3_ConfigSource *msg, size_t *len) {
369 return (struct udpa_core_v1_Authority**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 16), len);
370 }
envoy_config_core_v3_ConfigSource_resize_authorities(envoy_config_core_v3_ConfigSource * msg,size_t len,upb_arena * arena)371 UPB_INLINE struct udpa_core_v1_Authority** envoy_config_core_v3_ConfigSource_resize_authorities(envoy_config_core_v3_ConfigSource *msg, size_t len, upb_arena *arena) {
372 return (struct udpa_core_v1_Authority**)_upb_array_resize_accessor2(msg, UPB_SIZE(12, 16), len, UPB_SIZE(2, 3), arena);
373 }
envoy_config_core_v3_ConfigSource_add_authorities(envoy_config_core_v3_ConfigSource * msg,upb_arena * arena)374 UPB_INLINE struct udpa_core_v1_Authority* envoy_config_core_v3_ConfigSource_add_authorities(envoy_config_core_v3_ConfigSource *msg, upb_arena *arena) {
375 struct udpa_core_v1_Authority* sub = (struct udpa_core_v1_Authority*)_upb_msg_new(&udpa_core_v1_Authority_msginit, arena);
376 bool ok = _upb_array_append_accessor2(
377 msg, UPB_SIZE(12, 16), UPB_SIZE(2, 3), &sub, arena);
378 if (!ok) return NULL;
379 return sub;
380 }
381
382 #ifdef __cplusplus
383 } /* extern "C" */
384 #endif
385
386 #include "upb/port_undef.inc"
387
388 #endif /* ENVOY_CONFIG_CORE_V3_CONFIG_SOURCE_PROTO_UPB_H_ */
389