1 /* This file was generated by upbc (the upb compiler) from the input
2 * file:
3 *
4 * envoy/api/v2/core/config_source.proto
5 *
6 * Do not edit -- your changes will be discarded when the file is
7 * regenerated. */
8
9 #ifndef ENVOY_API_V2_CORE_CONFIG_SOURCE_PROTO_UPB_H_
10 #define ENVOY_API_V2_CORE_CONFIG_SOURCE_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_ApiConfigSource;
23 struct envoy_api_v2_core_AggregatedConfigSource;
24 struct envoy_api_v2_core_SelfConfigSource;
25 struct envoy_api_v2_core_RateLimitSettings;
26 struct envoy_api_v2_core_ConfigSource;
27 typedef struct envoy_api_v2_core_ApiConfigSource envoy_api_v2_core_ApiConfigSource;
28 typedef struct envoy_api_v2_core_AggregatedConfigSource envoy_api_v2_core_AggregatedConfigSource;
29 typedef struct envoy_api_v2_core_SelfConfigSource envoy_api_v2_core_SelfConfigSource;
30 typedef struct envoy_api_v2_core_RateLimitSettings envoy_api_v2_core_RateLimitSettings;
31 typedef struct envoy_api_v2_core_ConfigSource envoy_api_v2_core_ConfigSource;
32 extern const upb_msglayout envoy_api_v2_core_ApiConfigSource_msginit;
33 extern const upb_msglayout envoy_api_v2_core_AggregatedConfigSource_msginit;
34 extern const upb_msglayout envoy_api_v2_core_SelfConfigSource_msginit;
35 extern const upb_msglayout envoy_api_v2_core_RateLimitSettings_msginit;
36 extern const upb_msglayout envoy_api_v2_core_ConfigSource_msginit;
37 struct envoy_api_v2_core_GrpcService;
38 struct google_protobuf_DoubleValue;
39 struct google_protobuf_Duration;
40 struct google_protobuf_UInt32Value;
41 extern const upb_msglayout envoy_api_v2_core_GrpcService_msginit;
42 extern const upb_msglayout google_protobuf_DoubleValue_msginit;
43 extern const upb_msglayout google_protobuf_Duration_msginit;
44 extern const upb_msglayout google_protobuf_UInt32Value_msginit;
45
46 typedef enum {
47 envoy_api_v2_core_ApiConfigSource_UNSUPPORTED_REST_LEGACY = 0,
48 envoy_api_v2_core_ApiConfigSource_REST = 1,
49 envoy_api_v2_core_ApiConfigSource_GRPC = 2,
50 envoy_api_v2_core_ApiConfigSource_DELTA_GRPC = 3
51 } envoy_api_v2_core_ApiConfigSource_ApiType;
52
53 typedef enum {
54 envoy_api_v2_core_AUTO = 0,
55 envoy_api_v2_core_V2 = 1,
56 envoy_api_v2_core_V3 = 2
57 } envoy_api_v2_core_ApiVersion;
58
59
60 /* envoy.api.v2.core.ApiConfigSource */
61
envoy_api_v2_core_ApiConfigSource_new(upb_arena * arena)62 UPB_INLINE envoy_api_v2_core_ApiConfigSource *envoy_api_v2_core_ApiConfigSource_new(upb_arena *arena) {
63 return (envoy_api_v2_core_ApiConfigSource *)_upb_msg_new(&envoy_api_v2_core_ApiConfigSource_msginit, arena);
64 }
envoy_api_v2_core_ApiConfigSource_parse(const char * buf,size_t size,upb_arena * arena)65 UPB_INLINE envoy_api_v2_core_ApiConfigSource *envoy_api_v2_core_ApiConfigSource_parse(const char *buf, size_t size,
66 upb_arena *arena) {
67 envoy_api_v2_core_ApiConfigSource *ret = envoy_api_v2_core_ApiConfigSource_new(arena);
68 return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_ApiConfigSource_msginit, arena)) ? ret : NULL;
69 }
envoy_api_v2_core_ApiConfigSource_serialize(const envoy_api_v2_core_ApiConfigSource * msg,upb_arena * arena,size_t * len)70 UPB_INLINE char *envoy_api_v2_core_ApiConfigSource_serialize(const envoy_api_v2_core_ApiConfigSource *msg, upb_arena *arena, size_t *len) {
71 return upb_encode(msg, &envoy_api_v2_core_ApiConfigSource_msginit, arena, len);
72 }
73
envoy_api_v2_core_ApiConfigSource_api_type(const envoy_api_v2_core_ApiConfigSource * msg)74 UPB_INLINE int32_t envoy_api_v2_core_ApiConfigSource_api_type(const envoy_api_v2_core_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
envoy_api_v2_core_ApiConfigSource_cluster_names(const envoy_api_v2_core_ApiConfigSource * msg,size_t * len)75 UPB_INLINE upb_strview const* envoy_api_v2_core_ApiConfigSource_cluster_names(const envoy_api_v2_core_ApiConfigSource *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(32, 48), len); }
envoy_api_v2_core_ApiConfigSource_has_refresh_delay(const envoy_api_v2_core_ApiConfigSource * msg)76 UPB_INLINE bool envoy_api_v2_core_ApiConfigSource_has_refresh_delay(const envoy_api_v2_core_ApiConfigSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 24)); }
envoy_api_v2_core_ApiConfigSource_refresh_delay(const envoy_api_v2_core_ApiConfigSource * msg)77 UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_refresh_delay(const envoy_api_v2_core_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 24), const struct google_protobuf_Duration*); }
envoy_api_v2_core_ApiConfigSource_has_grpc_services(const envoy_api_v2_core_ApiConfigSource * msg)78 UPB_INLINE bool envoy_api_v2_core_ApiConfigSource_has_grpc_services(const envoy_api_v2_core_ApiConfigSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 56)); }
envoy_api_v2_core_ApiConfigSource_grpc_services(const envoy_api_v2_core_ApiConfigSource * msg,size_t * len)79 UPB_INLINE const struct envoy_api_v2_core_GrpcService* const* envoy_api_v2_core_ApiConfigSource_grpc_services(const envoy_api_v2_core_ApiConfigSource *msg, size_t *len) { return (const struct envoy_api_v2_core_GrpcService* const*)_upb_array_accessor(msg, UPB_SIZE(36, 56), len); }
envoy_api_v2_core_ApiConfigSource_has_request_timeout(const envoy_api_v2_core_ApiConfigSource * msg)80 UPB_INLINE bool envoy_api_v2_core_ApiConfigSource_has_request_timeout(const envoy_api_v2_core_ApiConfigSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 32)); }
envoy_api_v2_core_ApiConfigSource_request_timeout(const envoy_api_v2_core_ApiConfigSource * msg)81 UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_request_timeout(const envoy_api_v2_core_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 32), const struct google_protobuf_Duration*); }
envoy_api_v2_core_ApiConfigSource_has_rate_limit_settings(const envoy_api_v2_core_ApiConfigSource * msg)82 UPB_INLINE bool envoy_api_v2_core_ApiConfigSource_has_rate_limit_settings(const envoy_api_v2_core_ApiConfigSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 40)); }
envoy_api_v2_core_ApiConfigSource_rate_limit_settings(const envoy_api_v2_core_ApiConfigSource * msg)83 UPB_INLINE const envoy_api_v2_core_RateLimitSettings* envoy_api_v2_core_ApiConfigSource_rate_limit_settings(const envoy_api_v2_core_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 40), const envoy_api_v2_core_RateLimitSettings*); }
envoy_api_v2_core_ApiConfigSource_set_node_on_first_message_only(const envoy_api_v2_core_ApiConfigSource * msg)84 UPB_INLINE bool envoy_api_v2_core_ApiConfigSource_set_node_on_first_message_only(const envoy_api_v2_core_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool); }
envoy_api_v2_core_ApiConfigSource_transport_api_version(const envoy_api_v2_core_ApiConfigSource * msg)85 UPB_INLINE int32_t envoy_api_v2_core_ApiConfigSource_transport_api_version(const envoy_api_v2_core_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); }
86
envoy_api_v2_core_ApiConfigSource_set_api_type(envoy_api_v2_core_ApiConfigSource * msg,int32_t value)87 UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_api_type(envoy_api_v2_core_ApiConfigSource *msg, int32_t value) {
88 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
89 }
envoy_api_v2_core_ApiConfigSource_mutable_cluster_names(envoy_api_v2_core_ApiConfigSource * msg,size_t * len)90 UPB_INLINE upb_strview* envoy_api_v2_core_ApiConfigSource_mutable_cluster_names(envoy_api_v2_core_ApiConfigSource *msg, size_t *len) {
91 return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 48), len);
92 }
envoy_api_v2_core_ApiConfigSource_resize_cluster_names(envoy_api_v2_core_ApiConfigSource * msg,size_t len,upb_arena * arena)93 UPB_INLINE upb_strview* envoy_api_v2_core_ApiConfigSource_resize_cluster_names(envoy_api_v2_core_ApiConfigSource *msg, size_t len, upb_arena *arena) {
94 return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(32, 48), len, UPB_TYPE_STRING, arena);
95 }
envoy_api_v2_core_ApiConfigSource_add_cluster_names(envoy_api_v2_core_ApiConfigSource * msg,upb_strview val,upb_arena * arena)96 UPB_INLINE bool envoy_api_v2_core_ApiConfigSource_add_cluster_names(envoy_api_v2_core_ApiConfigSource *msg, upb_strview val, upb_arena *arena) {
97 return _upb_array_append_accessor(msg, UPB_SIZE(32, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
98 arena);
99 }
envoy_api_v2_core_ApiConfigSource_set_refresh_delay(envoy_api_v2_core_ApiConfigSource * msg,struct google_protobuf_Duration * value)100 UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_refresh_delay(envoy_api_v2_core_ApiConfigSource *msg, struct google_protobuf_Duration* value) {
101 *UPB_PTR_AT(msg, UPB_SIZE(20, 24), struct google_protobuf_Duration*) = value;
102 }
envoy_api_v2_core_ApiConfigSource_mutable_refresh_delay(envoy_api_v2_core_ApiConfigSource * msg,upb_arena * arena)103 UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_mutable_refresh_delay(envoy_api_v2_core_ApiConfigSource *msg, upb_arena *arena) {
104 struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_ApiConfigSource_refresh_delay(msg);
105 if (sub == NULL) {
106 sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
107 if (!sub) return NULL;
108 envoy_api_v2_core_ApiConfigSource_set_refresh_delay(msg, sub);
109 }
110 return sub;
111 }
envoy_api_v2_core_ApiConfigSource_mutable_grpc_services(envoy_api_v2_core_ApiConfigSource * msg,size_t * len)112 UPB_INLINE struct envoy_api_v2_core_GrpcService** envoy_api_v2_core_ApiConfigSource_mutable_grpc_services(envoy_api_v2_core_ApiConfigSource *msg, size_t *len) {
113 return (struct envoy_api_v2_core_GrpcService**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 56), len);
114 }
envoy_api_v2_core_ApiConfigSource_resize_grpc_services(envoy_api_v2_core_ApiConfigSource * msg,size_t len,upb_arena * arena)115 UPB_INLINE struct envoy_api_v2_core_GrpcService** envoy_api_v2_core_ApiConfigSource_resize_grpc_services(envoy_api_v2_core_ApiConfigSource *msg, size_t len, upb_arena *arena) {
116 return (struct envoy_api_v2_core_GrpcService**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 56), len, UPB_TYPE_MESSAGE, arena);
117 }
envoy_api_v2_core_ApiConfigSource_add_grpc_services(envoy_api_v2_core_ApiConfigSource * msg,upb_arena * arena)118 UPB_INLINE struct envoy_api_v2_core_GrpcService* envoy_api_v2_core_ApiConfigSource_add_grpc_services(envoy_api_v2_core_ApiConfigSource *msg, upb_arena *arena) {
119 struct envoy_api_v2_core_GrpcService* sub = (struct envoy_api_v2_core_GrpcService*)_upb_msg_new(&envoy_api_v2_core_GrpcService_msginit, arena);
120 bool ok = _upb_array_append_accessor(
121 msg, UPB_SIZE(36, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
122 if (!ok) return NULL;
123 return sub;
124 }
envoy_api_v2_core_ApiConfigSource_set_request_timeout(envoy_api_v2_core_ApiConfigSource * msg,struct google_protobuf_Duration * value)125 UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_request_timeout(envoy_api_v2_core_ApiConfigSource *msg, struct google_protobuf_Duration* value) {
126 *UPB_PTR_AT(msg, UPB_SIZE(24, 32), struct google_protobuf_Duration*) = value;
127 }
envoy_api_v2_core_ApiConfigSource_mutable_request_timeout(envoy_api_v2_core_ApiConfigSource * msg,upb_arena * arena)128 UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_mutable_request_timeout(envoy_api_v2_core_ApiConfigSource *msg, upb_arena *arena) {
129 struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_ApiConfigSource_request_timeout(msg);
130 if (sub == NULL) {
131 sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
132 if (!sub) return NULL;
133 envoy_api_v2_core_ApiConfigSource_set_request_timeout(msg, sub);
134 }
135 return sub;
136 }
envoy_api_v2_core_ApiConfigSource_set_rate_limit_settings(envoy_api_v2_core_ApiConfigSource * msg,envoy_api_v2_core_RateLimitSettings * value)137 UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_rate_limit_settings(envoy_api_v2_core_ApiConfigSource *msg, envoy_api_v2_core_RateLimitSettings* value) {
138 *UPB_PTR_AT(msg, UPB_SIZE(28, 40), envoy_api_v2_core_RateLimitSettings*) = value;
139 }
envoy_api_v2_core_ApiConfigSource_mutable_rate_limit_settings(envoy_api_v2_core_ApiConfigSource * msg,upb_arena * arena)140 UPB_INLINE struct envoy_api_v2_core_RateLimitSettings* envoy_api_v2_core_ApiConfigSource_mutable_rate_limit_settings(envoy_api_v2_core_ApiConfigSource *msg, upb_arena *arena) {
141 struct envoy_api_v2_core_RateLimitSettings* sub = (struct envoy_api_v2_core_RateLimitSettings*)envoy_api_v2_core_ApiConfigSource_rate_limit_settings(msg);
142 if (sub == NULL) {
143 sub = (struct envoy_api_v2_core_RateLimitSettings*)_upb_msg_new(&envoy_api_v2_core_RateLimitSettings_msginit, arena);
144 if (!sub) return NULL;
145 envoy_api_v2_core_ApiConfigSource_set_rate_limit_settings(msg, sub);
146 }
147 return sub;
148 }
envoy_api_v2_core_ApiConfigSource_set_set_node_on_first_message_only(envoy_api_v2_core_ApiConfigSource * msg,bool value)149 UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_set_node_on_first_message_only(envoy_api_v2_core_ApiConfigSource *msg, bool value) {
150 *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool) = value;
151 }
envoy_api_v2_core_ApiConfigSource_set_transport_api_version(envoy_api_v2_core_ApiConfigSource * msg,int32_t value)152 UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_transport_api_version(envoy_api_v2_core_ApiConfigSource *msg, int32_t value) {
153 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
154 }
155
156 /* envoy.api.v2.core.AggregatedConfigSource */
157
envoy_api_v2_core_AggregatedConfigSource_new(upb_arena * arena)158 UPB_INLINE envoy_api_v2_core_AggregatedConfigSource *envoy_api_v2_core_AggregatedConfigSource_new(upb_arena *arena) {
159 return (envoy_api_v2_core_AggregatedConfigSource *)_upb_msg_new(&envoy_api_v2_core_AggregatedConfigSource_msginit, arena);
160 }
envoy_api_v2_core_AggregatedConfigSource_parse(const char * buf,size_t size,upb_arena * arena)161 UPB_INLINE envoy_api_v2_core_AggregatedConfigSource *envoy_api_v2_core_AggregatedConfigSource_parse(const char *buf, size_t size,
162 upb_arena *arena) {
163 envoy_api_v2_core_AggregatedConfigSource *ret = envoy_api_v2_core_AggregatedConfigSource_new(arena);
164 return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_AggregatedConfigSource_msginit, arena)) ? ret : NULL;
165 }
envoy_api_v2_core_AggregatedConfigSource_serialize(const envoy_api_v2_core_AggregatedConfigSource * msg,upb_arena * arena,size_t * len)166 UPB_INLINE char *envoy_api_v2_core_AggregatedConfigSource_serialize(const envoy_api_v2_core_AggregatedConfigSource *msg, upb_arena *arena, size_t *len) {
167 return upb_encode(msg, &envoy_api_v2_core_AggregatedConfigSource_msginit, arena, len);
168 }
169
170
171
172 /* envoy.api.v2.core.SelfConfigSource */
173
envoy_api_v2_core_SelfConfigSource_new(upb_arena * arena)174 UPB_INLINE envoy_api_v2_core_SelfConfigSource *envoy_api_v2_core_SelfConfigSource_new(upb_arena *arena) {
175 return (envoy_api_v2_core_SelfConfigSource *)_upb_msg_new(&envoy_api_v2_core_SelfConfigSource_msginit, arena);
176 }
envoy_api_v2_core_SelfConfigSource_parse(const char * buf,size_t size,upb_arena * arena)177 UPB_INLINE envoy_api_v2_core_SelfConfigSource *envoy_api_v2_core_SelfConfigSource_parse(const char *buf, size_t size,
178 upb_arena *arena) {
179 envoy_api_v2_core_SelfConfigSource *ret = envoy_api_v2_core_SelfConfigSource_new(arena);
180 return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_SelfConfigSource_msginit, arena)) ? ret : NULL;
181 }
envoy_api_v2_core_SelfConfigSource_serialize(const envoy_api_v2_core_SelfConfigSource * msg,upb_arena * arena,size_t * len)182 UPB_INLINE char *envoy_api_v2_core_SelfConfigSource_serialize(const envoy_api_v2_core_SelfConfigSource *msg, upb_arena *arena, size_t *len) {
183 return upb_encode(msg, &envoy_api_v2_core_SelfConfigSource_msginit, arena, len);
184 }
185
186
187
188 /* envoy.api.v2.core.RateLimitSettings */
189
envoy_api_v2_core_RateLimitSettings_new(upb_arena * arena)190 UPB_INLINE envoy_api_v2_core_RateLimitSettings *envoy_api_v2_core_RateLimitSettings_new(upb_arena *arena) {
191 return (envoy_api_v2_core_RateLimitSettings *)_upb_msg_new(&envoy_api_v2_core_RateLimitSettings_msginit, arena);
192 }
envoy_api_v2_core_RateLimitSettings_parse(const char * buf,size_t size,upb_arena * arena)193 UPB_INLINE envoy_api_v2_core_RateLimitSettings *envoy_api_v2_core_RateLimitSettings_parse(const char *buf, size_t size,
194 upb_arena *arena) {
195 envoy_api_v2_core_RateLimitSettings *ret = envoy_api_v2_core_RateLimitSettings_new(arena);
196 return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_RateLimitSettings_msginit, arena)) ? ret : NULL;
197 }
envoy_api_v2_core_RateLimitSettings_serialize(const envoy_api_v2_core_RateLimitSettings * msg,upb_arena * arena,size_t * len)198 UPB_INLINE char *envoy_api_v2_core_RateLimitSettings_serialize(const envoy_api_v2_core_RateLimitSettings *msg, upb_arena *arena, size_t *len) {
199 return upb_encode(msg, &envoy_api_v2_core_RateLimitSettings_msginit, arena, len);
200 }
201
envoy_api_v2_core_RateLimitSettings_has_max_tokens(const envoy_api_v2_core_RateLimitSettings * msg)202 UPB_INLINE bool envoy_api_v2_core_RateLimitSettings_has_max_tokens(const envoy_api_v2_core_RateLimitSettings *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
envoy_api_v2_core_RateLimitSettings_max_tokens(const envoy_api_v2_core_RateLimitSettings * msg)203 UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_RateLimitSettings_max_tokens(const envoy_api_v2_core_RateLimitSettings *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_UInt32Value*); }
envoy_api_v2_core_RateLimitSettings_has_fill_rate(const envoy_api_v2_core_RateLimitSettings * msg)204 UPB_INLINE bool envoy_api_v2_core_RateLimitSettings_has_fill_rate(const envoy_api_v2_core_RateLimitSettings *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
envoy_api_v2_core_RateLimitSettings_fill_rate(const envoy_api_v2_core_RateLimitSettings * msg)205 UPB_INLINE const struct google_protobuf_DoubleValue* envoy_api_v2_core_RateLimitSettings_fill_rate(const envoy_api_v2_core_RateLimitSettings *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_DoubleValue*); }
206
envoy_api_v2_core_RateLimitSettings_set_max_tokens(envoy_api_v2_core_RateLimitSettings * msg,struct google_protobuf_UInt32Value * value)207 UPB_INLINE void envoy_api_v2_core_RateLimitSettings_set_max_tokens(envoy_api_v2_core_RateLimitSettings *msg, struct google_protobuf_UInt32Value* value) {
208 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_UInt32Value*) = value;
209 }
envoy_api_v2_core_RateLimitSettings_mutable_max_tokens(envoy_api_v2_core_RateLimitSettings * msg,upb_arena * arena)210 UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_RateLimitSettings_mutable_max_tokens(envoy_api_v2_core_RateLimitSettings *msg, upb_arena *arena) {
211 struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_RateLimitSettings_max_tokens(msg);
212 if (sub == NULL) {
213 sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
214 if (!sub) return NULL;
215 envoy_api_v2_core_RateLimitSettings_set_max_tokens(msg, sub);
216 }
217 return sub;
218 }
envoy_api_v2_core_RateLimitSettings_set_fill_rate(envoy_api_v2_core_RateLimitSettings * msg,struct google_protobuf_DoubleValue * value)219 UPB_INLINE void envoy_api_v2_core_RateLimitSettings_set_fill_rate(envoy_api_v2_core_RateLimitSettings *msg, struct google_protobuf_DoubleValue* value) {
220 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_DoubleValue*) = value;
221 }
envoy_api_v2_core_RateLimitSettings_mutable_fill_rate(envoy_api_v2_core_RateLimitSettings * msg,upb_arena * arena)222 UPB_INLINE struct google_protobuf_DoubleValue* envoy_api_v2_core_RateLimitSettings_mutable_fill_rate(envoy_api_v2_core_RateLimitSettings *msg, upb_arena *arena) {
223 struct google_protobuf_DoubleValue* sub = (struct google_protobuf_DoubleValue*)envoy_api_v2_core_RateLimitSettings_fill_rate(msg);
224 if (sub == NULL) {
225 sub = (struct google_protobuf_DoubleValue*)_upb_msg_new(&google_protobuf_DoubleValue_msginit, arena);
226 if (!sub) return NULL;
227 envoy_api_v2_core_RateLimitSettings_set_fill_rate(msg, sub);
228 }
229 return sub;
230 }
231
232 /* envoy.api.v2.core.ConfigSource */
233
envoy_api_v2_core_ConfigSource_new(upb_arena * arena)234 UPB_INLINE envoy_api_v2_core_ConfigSource *envoy_api_v2_core_ConfigSource_new(upb_arena *arena) {
235 return (envoy_api_v2_core_ConfigSource *)_upb_msg_new(&envoy_api_v2_core_ConfigSource_msginit, arena);
236 }
envoy_api_v2_core_ConfigSource_parse(const char * buf,size_t size,upb_arena * arena)237 UPB_INLINE envoy_api_v2_core_ConfigSource *envoy_api_v2_core_ConfigSource_parse(const char *buf, size_t size,
238 upb_arena *arena) {
239 envoy_api_v2_core_ConfigSource *ret = envoy_api_v2_core_ConfigSource_new(arena);
240 return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_ConfigSource_msginit, arena)) ? ret : NULL;
241 }
envoy_api_v2_core_ConfigSource_serialize(const envoy_api_v2_core_ConfigSource * msg,upb_arena * arena,size_t * len)242 UPB_INLINE char *envoy_api_v2_core_ConfigSource_serialize(const envoy_api_v2_core_ConfigSource *msg, upb_arena *arena, size_t *len) {
243 return upb_encode(msg, &envoy_api_v2_core_ConfigSource_msginit, arena, len);
244 }
245
246 typedef enum {
247 envoy_api_v2_core_ConfigSource_config_source_specifier_path = 1,
248 envoy_api_v2_core_ConfigSource_config_source_specifier_api_config_source = 2,
249 envoy_api_v2_core_ConfigSource_config_source_specifier_ads = 3,
250 envoy_api_v2_core_ConfigSource_config_source_specifier_self = 5,
251 envoy_api_v2_core_ConfigSource_config_source_specifier_NOT_SET = 0
252 } envoy_api_v2_core_ConfigSource_config_source_specifier_oneofcases;
envoy_api_v2_core_ConfigSource_config_source_specifier_case(const envoy_api_v2_core_ConfigSource * msg)253 UPB_INLINE envoy_api_v2_core_ConfigSource_config_source_specifier_oneofcases envoy_api_v2_core_ConfigSource_config_source_specifier_case(const envoy_api_v2_core_ConfigSource* msg) { return (envoy_api_v2_core_ConfigSource_config_source_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(20, 32), int32_t); }
254
envoy_api_v2_core_ConfigSource_has_path(const envoy_api_v2_core_ConfigSource * msg)255 UPB_INLINE bool envoy_api_v2_core_ConfigSource_has_path(const envoy_api_v2_core_ConfigSource *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 32)) == 1; }
envoy_api_v2_core_ConfigSource_path(const envoy_api_v2_core_ConfigSource * msg)256 UPB_INLINE upb_strview envoy_api_v2_core_ConfigSource_path(const envoy_api_v2_core_ConfigSource *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(12, 16), UPB_SIZE(20, 32), 1, upb_strview_make("", strlen(""))); }
envoy_api_v2_core_ConfigSource_has_api_config_source(const envoy_api_v2_core_ConfigSource * msg)257 UPB_INLINE bool envoy_api_v2_core_ConfigSource_has_api_config_source(const envoy_api_v2_core_ConfigSource *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 32)) == 2; }
envoy_api_v2_core_ConfigSource_api_config_source(const envoy_api_v2_core_ConfigSource * msg)258 UPB_INLINE const envoy_api_v2_core_ApiConfigSource* envoy_api_v2_core_ConfigSource_api_config_source(const envoy_api_v2_core_ConfigSource *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_ApiConfigSource*, UPB_SIZE(12, 16), UPB_SIZE(20, 32), 2, NULL); }
envoy_api_v2_core_ConfigSource_has_ads(const envoy_api_v2_core_ConfigSource * msg)259 UPB_INLINE bool envoy_api_v2_core_ConfigSource_has_ads(const envoy_api_v2_core_ConfigSource *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 32)) == 3; }
envoy_api_v2_core_ConfigSource_ads(const envoy_api_v2_core_ConfigSource * msg)260 UPB_INLINE const envoy_api_v2_core_AggregatedConfigSource* envoy_api_v2_core_ConfigSource_ads(const envoy_api_v2_core_ConfigSource *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_AggregatedConfigSource*, UPB_SIZE(12, 16), UPB_SIZE(20, 32), 3, NULL); }
envoy_api_v2_core_ConfigSource_has_initial_fetch_timeout(const envoy_api_v2_core_ConfigSource * msg)261 UPB_INLINE bool envoy_api_v2_core_ConfigSource_has_initial_fetch_timeout(const envoy_api_v2_core_ConfigSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); }
envoy_api_v2_core_ConfigSource_initial_fetch_timeout(const envoy_api_v2_core_ConfigSource * msg)262 UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_ConfigSource_initial_fetch_timeout(const envoy_api_v2_core_ConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const struct google_protobuf_Duration*); }
envoy_api_v2_core_ConfigSource_has_self(const envoy_api_v2_core_ConfigSource * msg)263 UPB_INLINE bool envoy_api_v2_core_ConfigSource_has_self(const envoy_api_v2_core_ConfigSource *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 32)) == 5; }
envoy_api_v2_core_ConfigSource_self(const envoy_api_v2_core_ConfigSource * msg)264 UPB_INLINE const envoy_api_v2_core_SelfConfigSource* envoy_api_v2_core_ConfigSource_self(const envoy_api_v2_core_ConfigSource *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_SelfConfigSource*, UPB_SIZE(12, 16), UPB_SIZE(20, 32), 5, NULL); }
envoy_api_v2_core_ConfigSource_resource_api_version(const envoy_api_v2_core_ConfigSource * msg)265 UPB_INLINE int32_t envoy_api_v2_core_ConfigSource_resource_api_version(const envoy_api_v2_core_ConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
266
envoy_api_v2_core_ConfigSource_set_path(envoy_api_v2_core_ConfigSource * msg,upb_strview value)267 UPB_INLINE void envoy_api_v2_core_ConfigSource_set_path(envoy_api_v2_core_ConfigSource *msg, upb_strview value) {
268 UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(12, 16), value, UPB_SIZE(20, 32), 1);
269 }
envoy_api_v2_core_ConfigSource_set_api_config_source(envoy_api_v2_core_ConfigSource * msg,envoy_api_v2_core_ApiConfigSource * value)270 UPB_INLINE void envoy_api_v2_core_ConfigSource_set_api_config_source(envoy_api_v2_core_ConfigSource *msg, envoy_api_v2_core_ApiConfigSource* value) {
271 UPB_WRITE_ONEOF(msg, envoy_api_v2_core_ApiConfigSource*, UPB_SIZE(12, 16), value, UPB_SIZE(20, 32), 2);
272 }
envoy_api_v2_core_ConfigSource_mutable_api_config_source(envoy_api_v2_core_ConfigSource * msg,upb_arena * arena)273 UPB_INLINE struct envoy_api_v2_core_ApiConfigSource* envoy_api_v2_core_ConfigSource_mutable_api_config_source(envoy_api_v2_core_ConfigSource *msg, upb_arena *arena) {
274 struct envoy_api_v2_core_ApiConfigSource* sub = (struct envoy_api_v2_core_ApiConfigSource*)envoy_api_v2_core_ConfigSource_api_config_source(msg);
275 if (sub == NULL) {
276 sub = (struct envoy_api_v2_core_ApiConfigSource*)_upb_msg_new(&envoy_api_v2_core_ApiConfigSource_msginit, arena);
277 if (!sub) return NULL;
278 envoy_api_v2_core_ConfigSource_set_api_config_source(msg, sub);
279 }
280 return sub;
281 }
envoy_api_v2_core_ConfigSource_set_ads(envoy_api_v2_core_ConfigSource * msg,envoy_api_v2_core_AggregatedConfigSource * value)282 UPB_INLINE void envoy_api_v2_core_ConfigSource_set_ads(envoy_api_v2_core_ConfigSource *msg, envoy_api_v2_core_AggregatedConfigSource* value) {
283 UPB_WRITE_ONEOF(msg, envoy_api_v2_core_AggregatedConfigSource*, UPB_SIZE(12, 16), value, UPB_SIZE(20, 32), 3);
284 }
envoy_api_v2_core_ConfigSource_mutable_ads(envoy_api_v2_core_ConfigSource * msg,upb_arena * arena)285 UPB_INLINE struct envoy_api_v2_core_AggregatedConfigSource* envoy_api_v2_core_ConfigSource_mutable_ads(envoy_api_v2_core_ConfigSource *msg, upb_arena *arena) {
286 struct envoy_api_v2_core_AggregatedConfigSource* sub = (struct envoy_api_v2_core_AggregatedConfigSource*)envoy_api_v2_core_ConfigSource_ads(msg);
287 if (sub == NULL) {
288 sub = (struct envoy_api_v2_core_AggregatedConfigSource*)_upb_msg_new(&envoy_api_v2_core_AggregatedConfigSource_msginit, arena);
289 if (!sub) return NULL;
290 envoy_api_v2_core_ConfigSource_set_ads(msg, sub);
291 }
292 return sub;
293 }
envoy_api_v2_core_ConfigSource_set_initial_fetch_timeout(envoy_api_v2_core_ConfigSource * msg,struct google_protobuf_Duration * value)294 UPB_INLINE void envoy_api_v2_core_ConfigSource_set_initial_fetch_timeout(envoy_api_v2_core_ConfigSource *msg, struct google_protobuf_Duration* value) {
295 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), struct google_protobuf_Duration*) = value;
296 }
envoy_api_v2_core_ConfigSource_mutable_initial_fetch_timeout(envoy_api_v2_core_ConfigSource * msg,upb_arena * arena)297 UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_ConfigSource_mutable_initial_fetch_timeout(envoy_api_v2_core_ConfigSource *msg, upb_arena *arena) {
298 struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_ConfigSource_initial_fetch_timeout(msg);
299 if (sub == NULL) {
300 sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
301 if (!sub) return NULL;
302 envoy_api_v2_core_ConfigSource_set_initial_fetch_timeout(msg, sub);
303 }
304 return sub;
305 }
envoy_api_v2_core_ConfigSource_set_self(envoy_api_v2_core_ConfigSource * msg,envoy_api_v2_core_SelfConfigSource * value)306 UPB_INLINE void envoy_api_v2_core_ConfigSource_set_self(envoy_api_v2_core_ConfigSource *msg, envoy_api_v2_core_SelfConfigSource* value) {
307 UPB_WRITE_ONEOF(msg, envoy_api_v2_core_SelfConfigSource*, UPB_SIZE(12, 16), value, UPB_SIZE(20, 32), 5);
308 }
envoy_api_v2_core_ConfigSource_mutable_self(envoy_api_v2_core_ConfigSource * msg,upb_arena * arena)309 UPB_INLINE struct envoy_api_v2_core_SelfConfigSource* envoy_api_v2_core_ConfigSource_mutable_self(envoy_api_v2_core_ConfigSource *msg, upb_arena *arena) {
310 struct envoy_api_v2_core_SelfConfigSource* sub = (struct envoy_api_v2_core_SelfConfigSource*)envoy_api_v2_core_ConfigSource_self(msg);
311 if (sub == NULL) {
312 sub = (struct envoy_api_v2_core_SelfConfigSource*)_upb_msg_new(&envoy_api_v2_core_SelfConfigSource_msginit, arena);
313 if (!sub) return NULL;
314 envoy_api_v2_core_ConfigSource_set_self(msg, sub);
315 }
316 return sub;
317 }
envoy_api_v2_core_ConfigSource_set_resource_api_version(envoy_api_v2_core_ConfigSource * msg,int32_t value)318 UPB_INLINE void envoy_api_v2_core_ConfigSource_set_resource_api_version(envoy_api_v2_core_ConfigSource *msg, int32_t value) {
319 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
320 }
321
322 #ifdef __cplusplus
323 } /* extern "C" */
324 #endif
325
326 #include "upb/port_undef.inc"
327
328 #endif /* ENVOY_API_V2_CORE_CONFIG_SOURCE_PROTO_UPB_H_ */
329