Debian Codegraph @

src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.h

raw
1 /* This file was generated by upbc (the upb compiler) from the input
2 * file:
3 *
4 * envoy/config/metrics/v3/stats.proto
5 *
6 * Do not edit -- your changes will be discarded when the file is
7 * regenerated. */
8
9 #ifndef ENVOY_CONFIG_METRICS_V3_STATS_PROTO_UPB_H_
10 #define ENVOY_CONFIG_METRICS_V3_STATS_PROTO_UPB_H_
11
12 #include "upb/msg_internal.h"
13 #include "upb/decode.h"
14 #include "upb/decode_fast.h"
15 #include "upb/encode.h"
16
17 #include "upb/port_def.inc"
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23 struct envoy_config_metrics_v3_StatsSink;
24 struct envoy_config_metrics_v3_StatsConfig;
25 struct envoy_config_metrics_v3_StatsMatcher;
26 struct envoy_config_metrics_v3_TagSpecifier;
27 struct envoy_config_metrics_v3_HistogramBucketSettings;
28 struct envoy_config_metrics_v3_StatsdSink;
29 struct envoy_config_metrics_v3_DogStatsdSink;
30 struct envoy_config_metrics_v3_HystrixSink;
31 typedef struct envoy_config_metrics_v3_StatsSink envoy_config_metrics_v3_StatsSink;
32 typedef struct envoy_config_metrics_v3_StatsConfig envoy_config_metrics_v3_StatsConfig;
33 typedef struct envoy_config_metrics_v3_StatsMatcher envoy_config_metrics_v3_StatsMatcher;
34 typedef struct envoy_config_metrics_v3_TagSpecifier envoy_config_metrics_v3_TagSpecifier;
35 typedef struct envoy_config_metrics_v3_HistogramBucketSettings envoy_config_metrics_v3_HistogramBucketSettings;
36 typedef struct envoy_config_metrics_v3_StatsdSink envoy_config_metrics_v3_StatsdSink;
37 typedef struct envoy_config_metrics_v3_DogStatsdSink envoy_config_metrics_v3_DogStatsdSink;
38 typedef struct envoy_config_metrics_v3_HystrixSink envoy_config_metrics_v3_HystrixSink;
39 extern const upb_MiniTable envoy_config_metrics_v3_StatsSink_msginit;
40 extern const upb_MiniTable envoy_config_metrics_v3_StatsConfig_msginit;
41 extern const upb_MiniTable envoy_config_metrics_v3_StatsMatcher_msginit;
42 extern const upb_MiniTable envoy_config_metrics_v3_TagSpecifier_msginit;
43 extern const upb_MiniTable envoy_config_metrics_v3_HistogramBucketSettings_msginit;
44 extern const upb_MiniTable envoy_config_metrics_v3_StatsdSink_msginit;
45 extern const upb_MiniTable envoy_config_metrics_v3_DogStatsdSink_msginit;
46 extern const upb_MiniTable envoy_config_metrics_v3_HystrixSink_msginit;
47 struct envoy_config_core_v3_Address;
48 struct envoy_type_matcher_v3_ListStringMatcher;
49 struct envoy_type_matcher_v3_StringMatcher;
50 struct google_protobuf_Any;
51 struct google_protobuf_BoolValue;
52 struct google_protobuf_UInt64Value;
53 extern const upb_MiniTable envoy_config_core_v3_Address_msginit;
54 extern const upb_MiniTable envoy_type_matcher_v3_ListStringMatcher_msginit;
55 extern const upb_MiniTable envoy_type_matcher_v3_StringMatcher_msginit;
56 extern const upb_MiniTable google_protobuf_Any_msginit;
57 extern const upb_MiniTable google_protobuf_BoolValue_msginit;
58 extern const upb_MiniTable google_protobuf_UInt64Value_msginit;
59
60
61
62 /* envoy.config.metrics.v3.StatsSink */
63
64 UPB_INLINE envoy_config_metrics_v3_StatsSink* envoy_config_metrics_v3_StatsSink_new(upb_Arena* arena) {
65 return (envoy_config_metrics_v3_StatsSink*)_upb_Message_New(&envoy_config_metrics_v3_StatsSink_msginit, arena);
66 }
67 UPB_INLINE envoy_config_metrics_v3_StatsSink* envoy_config_metrics_v3_StatsSink_parse(const char* buf, size_t size, upb_Arena* arena) {
68 envoy_config_metrics_v3_StatsSink* ret = envoy_config_metrics_v3_StatsSink_new(arena);
69 if (!ret) return NULL;
70 if (upb_Decode(buf, size, ret, &envoy_config_metrics_v3_StatsSink_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
71 return NULL;
72 }
73 return ret;
74 }
75 UPB_INLINE envoy_config_metrics_v3_StatsSink* envoy_config_metrics_v3_StatsSink_parse_ex(const char* buf, size_t size,
76 const upb_ExtensionRegistry* extreg,
77 int options, upb_Arena* arena) {
78 envoy_config_metrics_v3_StatsSink* ret = envoy_config_metrics_v3_StatsSink_new(arena);
79 if (!ret) return NULL;
80 if (upb_Decode(buf, size, ret, &envoy_config_metrics_v3_StatsSink_msginit, extreg, options, arena) !=
81 kUpb_DecodeStatus_Ok) {
82 return NULL;
83 }
84 return ret;
85 }
86 UPB_INLINE char* envoy_config_metrics_v3_StatsSink_serialize(const envoy_config_metrics_v3_StatsSink* msg, upb_Arena* arena, size_t* len) {
87 char* ptr;
88 (void)upb_Encode(msg, &envoy_config_metrics_v3_StatsSink_msginit, 0, arena, &ptr, len);
89 return ptr;
90 }
91 UPB_INLINE char* envoy_config_metrics_v3_StatsSink_serialize_ex(const envoy_config_metrics_v3_StatsSink* msg, int options,
92 upb_Arena* arena, size_t* len) {
93 char* ptr;
94 (void)upb_Encode(msg, &envoy_config_metrics_v3_StatsSink_msginit, options, arena, &ptr, len);
95 return ptr;
96 }
97 typedef enum {
98 envoy_config_metrics_v3_StatsSink_config_type_typed_config = 3,
99 envoy_config_metrics_v3_StatsSink_config_type_NOT_SET = 0
100 } envoy_config_metrics_v3_StatsSink_config_type_oneofcases;
101 UPB_INLINE envoy_config_metrics_v3_StatsSink_config_type_oneofcases envoy_config_metrics_v3_StatsSink_config_type_case(const envoy_config_metrics_v3_StatsSink* msg) {
102 return (envoy_config_metrics_v3_StatsSink_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t);
103 }
104 UPB_INLINE void envoy_config_metrics_v3_StatsSink_clear_name(const envoy_config_metrics_v3_StatsSink* msg) {
105 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
106 }
107 UPB_INLINE upb_StringView envoy_config_metrics_v3_StatsSink_name(const envoy_config_metrics_v3_StatsSink* msg) {
108 return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView);
109 }
110 UPB_INLINE bool envoy_config_metrics_v3_StatsSink_has_typed_config(const envoy_config_metrics_v3_StatsSink* msg) {
111 return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 3;
112 }
113 UPB_INLINE void envoy_config_metrics_v3_StatsSink_clear_typed_config(const envoy_config_metrics_v3_StatsSink* msg) {
114 UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(12, 24), 0, UPB_SIZE(0, 0), envoy_config_metrics_v3_StatsSink_config_type_NOT_SET);
115 }
116 UPB_INLINE const struct google_protobuf_Any* envoy_config_metrics_v3_StatsSink_typed_config(const envoy_config_metrics_v3_StatsSink* msg) {
117 return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(12, 24), UPB_SIZE(0, 0), 3, NULL);
118 }
119
120 UPB_INLINE void envoy_config_metrics_v3_StatsSink_set_name(envoy_config_metrics_v3_StatsSink *msg, upb_StringView value) {
121 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value;
122 }
123 UPB_INLINE void envoy_config_metrics_v3_StatsSink_set_typed_config(envoy_config_metrics_v3_StatsSink *msg, struct google_protobuf_Any* value) {
124 UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(12, 24), value, UPB_SIZE(0, 0), 3);
125 }
126 UPB_INLINE struct google_protobuf_Any* envoy_config_metrics_v3_StatsSink_mutable_typed_config(envoy_config_metrics_v3_StatsSink* msg, upb_Arena* arena) {
127 struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_metrics_v3_StatsSink_typed_config(msg);
128 if (sub == NULL) {
129 sub = (struct google_protobuf_Any*)_upb_Message_New(&google_protobuf_Any_msginit, arena);
130 if (!sub) return NULL;
131 envoy_config_metrics_v3_StatsSink_set_typed_config(msg, sub);
132 }
133 return sub;
134 }
135
136 /* envoy.config.metrics.v3.StatsConfig */
137
138 UPB_INLINE envoy_config_metrics_v3_StatsConfig* envoy_config_metrics_v3_StatsConfig_new(upb_Arena* arena) {
139 return (envoy_config_metrics_v3_StatsConfig*)_upb_Message_New(&envoy_config_metrics_v3_StatsConfig_msginit, arena);
140 }
141 UPB_INLINE envoy_config_metrics_v3_StatsConfig* envoy_config_metrics_v3_StatsConfig_parse(const char* buf, size_t size, upb_Arena* arena) {
142 envoy_config_metrics_v3_StatsConfig* ret = envoy_config_metrics_v3_StatsConfig_new(arena);
143 if (!ret) return NULL;
144 if (upb_Decode(buf, size, ret, &envoy_config_metrics_v3_StatsConfig_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
145 return NULL;
146 }
147 return ret;
148 }
149 UPB_INLINE envoy_config_metrics_v3_StatsConfig* envoy_config_metrics_v3_StatsConfig_parse_ex(const char* buf, size_t size,
150 const upb_ExtensionRegistry* extreg,
151 int options, upb_Arena* arena) {
152 envoy_config_metrics_v3_StatsConfig* ret = envoy_config_metrics_v3_StatsConfig_new(arena);
153 if (!ret) return NULL;
154 if (upb_Decode(buf, size, ret, &envoy_config_metrics_v3_StatsConfig_msginit, extreg, options, arena) !=
155 kUpb_DecodeStatus_Ok) {
156 return NULL;
157 }
158 return ret;
159 }
160 UPB_INLINE char* envoy_config_metrics_v3_StatsConfig_serialize(const envoy_config_metrics_v3_StatsConfig* msg, upb_Arena* arena, size_t* len) {
161 char* ptr;
162 (void)upb_Encode(msg, &envoy_config_metrics_v3_StatsConfig_msginit, 0, arena, &ptr, len);
163 return ptr;
164 }
165 UPB_INLINE char* envoy_config_metrics_v3_StatsConfig_serialize_ex(const envoy_config_metrics_v3_StatsConfig* msg, int options,
166 upb_Arena* arena, size_t* len) {
167 char* ptr;
168 (void)upb_Encode(msg, &envoy_config_metrics_v3_StatsConfig_msginit, options, arena, &ptr, len);
169 return ptr;
170 }
171 UPB_INLINE bool envoy_config_metrics_v3_StatsConfig_has_stats_tags(const envoy_config_metrics_v3_StatsConfig* msg) {
172 return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8));
173 }
174 UPB_INLINE void envoy_config_metrics_v3_StatsConfig_clear_stats_tags(const envoy_config_metrics_v3_StatsConfig* msg) {
175 _upb_array_detach(msg, UPB_SIZE(4, 8));
176 }
177 UPB_INLINE const envoy_config_metrics_v3_TagSpecifier* const* envoy_config_metrics_v3_StatsConfig_stats_tags(const envoy_config_metrics_v3_StatsConfig* msg, size_t* len) {
178 return (const envoy_config_metrics_v3_TagSpecifier* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len);
179 }
180 UPB_INLINE bool envoy_config_metrics_v3_StatsConfig_has_use_all_default_tags(const envoy_config_metrics_v3_StatsConfig* msg) {
181 return _upb_hasbit(msg, 1);
182 }
183 UPB_INLINE void envoy_config_metrics_v3_StatsConfig_clear_use_all_default_tags(const envoy_config_metrics_v3_StatsConfig* msg) {
184 *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const upb_Message*) = NULL;
185 }
186 UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_metrics_v3_StatsConfig_use_all_default_tags(const envoy_config_metrics_v3_StatsConfig* msg) {
187 return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_BoolValue*);
188 }
189 UPB_INLINE bool envoy_config_metrics_v3_StatsConfig_has_stats_matcher(const envoy_config_metrics_v3_StatsConfig* msg) {
190 return _upb_hasbit(msg, 2);
191 }
192 UPB_INLINE void envoy_config_metrics_v3_StatsConfig_clear_stats_matcher(const envoy_config_metrics_v3_StatsConfig* msg) {
193 *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const upb_Message*) = NULL;
194 }
195 UPB_INLINE const envoy_config_metrics_v3_StatsMatcher* envoy_config_metrics_v3_StatsConfig_stats_matcher(const envoy_config_metrics_v3_StatsConfig* msg) {
196 return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const envoy_config_metrics_v3_StatsMatcher*);
197 }
198 UPB_INLINE bool envoy_config_metrics_v3_StatsConfig_has_histogram_bucket_settings(const envoy_config_metrics_v3_StatsConfig* msg) {
199 return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32));
200 }
201 UPB_INLINE void envoy_config_metrics_v3_StatsConfig_clear_histogram_bucket_settings(const envoy_config_metrics_v3_StatsConfig* msg) {
202 _upb_array_detach(msg, UPB_SIZE(16, 32));
203 }
204 UPB_INLINE const envoy_config_metrics_v3_HistogramBucketSettings* const* envoy_config_metrics_v3_StatsConfig_histogram_bucket_settings(const envoy_config_metrics_v3_StatsConfig* msg, size_t* len) {
205 return (const envoy_config_metrics_v3_HistogramBucketSettings* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len);
206 }
207
208 UPB_INLINE envoy_config_metrics_v3_TagSpecifier** envoy_config_metrics_v3_StatsConfig_mutable_stats_tags(envoy_config_metrics_v3_StatsConfig* msg, size_t* len) {
209 return (envoy_config_metrics_v3_TagSpecifier**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
210 }
211 UPB_INLINE envoy_config_metrics_v3_TagSpecifier** envoy_config_metrics_v3_StatsConfig_resize_stats_tags(envoy_config_metrics_v3_StatsConfig* msg, size_t len, upb_Arena* arena) {
212 return (envoy_config_metrics_v3_TagSpecifier**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena);
213 }
214 UPB_INLINE struct envoy_config_metrics_v3_TagSpecifier* envoy_config_metrics_v3_StatsConfig_add_stats_tags(envoy_config_metrics_v3_StatsConfig* msg, upb_Arena* arena) {
215 struct envoy_config_metrics_v3_TagSpecifier* sub = (struct envoy_config_metrics_v3_TagSpecifier*)_upb_Message_New(&envoy_config_metrics_v3_TagSpecifier_msginit, arena);
216 bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena);
217 if (!ok) return NULL;
218 return sub;
219 }
220 UPB_INLINE void envoy_config_metrics_v3_StatsConfig_set_use_all_default_tags(envoy_config_metrics_v3_StatsConfig *msg, struct google_protobuf_BoolValue* value) {
221 _upb_sethas(msg, 1);
222 *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_BoolValue*) = value;
223 }
224 UPB_INLINE struct google_protobuf_BoolValue* envoy_config_metrics_v3_StatsConfig_mutable_use_all_default_tags(envoy_config_metrics_v3_StatsConfig* msg, upb_Arena* arena) {
225 struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_metrics_v3_StatsConfig_use_all_default_tags(msg);
226 if (sub == NULL) {
227 sub = (struct google_protobuf_BoolValue*)_upb_Message_New(&google_protobuf_BoolValue_msginit, arena);
228 if (!sub) return NULL;
229 envoy_config_metrics_v3_StatsConfig_set_use_all_default_tags(msg, sub);
230 }
231 return sub;
232 }
233 UPB_INLINE void envoy_config_metrics_v3_StatsConfig_set_stats_matcher(envoy_config_metrics_v3_StatsConfig *msg, envoy_config_metrics_v3_StatsMatcher* value) {
234 _upb_sethas(msg, 2);
235 *UPB_PTR_AT(msg, UPB_SIZE(12, 24), envoy_config_metrics_v3_StatsMatcher*) = value;
236 }
237 UPB_INLINE struct envoy_config_metrics_v3_StatsMatcher* envoy_config_metrics_v3_StatsConfig_mutable_stats_matcher(envoy_config_metrics_v3_StatsConfig* msg, upb_Arena* arena) {
238 struct envoy_config_metrics_v3_StatsMatcher* sub = (struct envoy_config_metrics_v3_StatsMatcher*)envoy_config_metrics_v3_StatsConfig_stats_matcher(msg);
239 if (sub == NULL) {
240 sub = (struct envoy_config_metrics_v3_StatsMatcher*)_upb_Message_New(&envoy_config_metrics_v3_StatsMatcher_msginit, arena);
241 if (!sub) return NULL;
242 envoy_config_metrics_v3_StatsConfig_set_stats_matcher(msg, sub);
243 }
244 return sub;
245 }
246 UPB_INLINE envoy_config_metrics_v3_HistogramBucketSettings** envoy_config_metrics_v3_StatsConfig_mutable_histogram_bucket_settings(envoy_config_metrics_v3_StatsConfig* msg, size_t* len) {
247 return (envoy_config_metrics_v3_HistogramBucketSettings**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
248 }
249 UPB_INLINE envoy_config_metrics_v3_HistogramBucketSettings** envoy_config_metrics_v3_StatsConfig_resize_histogram_bucket_settings(envoy_config_metrics_v3_StatsConfig* msg, size_t len, upb_Arena* arena) {
250 return (envoy_config_metrics_v3_HistogramBucketSettings**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena);
251 }
252 UPB_INLINE struct envoy_config_metrics_v3_HistogramBucketSettings* envoy_config_metrics_v3_StatsConfig_add_histogram_bucket_settings(envoy_config_metrics_v3_StatsConfig* msg, upb_Arena* arena) {
253 struct envoy_config_metrics_v3_HistogramBucketSettings* sub = (struct envoy_config_metrics_v3_HistogramBucketSettings*)_upb_Message_New(&envoy_config_metrics_v3_HistogramBucketSettings_msginit, arena);
254 bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(16, 32), UPB_SIZE(2, 3), &sub, arena);
255 if (!ok) return NULL;
256 return sub;
257 }
258
259 /* envoy.config.metrics.v3.StatsMatcher */
260
261 UPB_INLINE envoy_config_metrics_v3_StatsMatcher* envoy_config_metrics_v3_StatsMatcher_new(upb_Arena* arena) {
262 return (envoy_config_metrics_v3_StatsMatcher*)_upb_Message_New(&envoy_config_metrics_v3_StatsMatcher_msginit, arena);
263 }
264 UPB_INLINE envoy_config_metrics_v3_StatsMatcher* envoy_config_metrics_v3_StatsMatcher_parse(const char* buf, size_t size, upb_Arena* arena) {
265 envoy_config_metrics_v3_StatsMatcher* ret = envoy_config_metrics_v3_StatsMatcher_new(arena);
266 if (!ret) return NULL;
267 if (upb_Decode(buf, size, ret, &envoy_config_metrics_v3_StatsMatcher_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
268 return NULL;
269 }
270 return ret;
271 }
272 UPB_INLINE envoy_config_metrics_v3_StatsMatcher* envoy_config_metrics_v3_StatsMatcher_parse_ex(const char* buf, size_t size,
273 const upb_ExtensionRegistry* extreg,
274 int options, upb_Arena* arena) {
275 envoy_config_metrics_v3_StatsMatcher* ret = envoy_config_metrics_v3_StatsMatcher_new(arena);
276 if (!ret) return NULL;
277 if (upb_Decode(buf, size, ret, &envoy_config_metrics_v3_StatsMatcher_msginit, extreg, options, arena) !=
278 kUpb_DecodeStatus_Ok) {
279 return NULL;
280 }
281 return ret;
282 }
283 UPB_INLINE char* envoy_config_metrics_v3_StatsMatcher_serialize(const envoy_config_metrics_v3_StatsMatcher* msg, upb_Arena* arena, size_t* len) {
284 char* ptr;
285 (void)upb_Encode(msg, &envoy_config_metrics_v3_StatsMatcher_msginit, 0, arena, &ptr, len);
286 return ptr;
287 }
288 UPB_INLINE char* envoy_config_metrics_v3_StatsMatcher_serialize_ex(const envoy_config_metrics_v3_StatsMatcher* msg, int options,
289 upb_Arena* arena, size_t* len) {
290 char* ptr;
291 (void)upb_Encode(msg, &envoy_config_metrics_v3_StatsMatcher_msginit, options, arena, &ptr, len);
292 return ptr;
293 }
294 typedef enum {
295 envoy_config_metrics_v3_StatsMatcher_stats_matcher_reject_all = 1,
296 envoy_config_metrics_v3_StatsMatcher_stats_matcher_exclusion_list = 2,
297 envoy_config_metrics_v3_StatsMatcher_stats_matcher_inclusion_list = 3,
298 envoy_config_metrics_v3_StatsMatcher_stats_matcher_NOT_SET = 0
299 } envoy_config_metrics_v3_StatsMatcher_stats_matcher_oneofcases;
300 UPB_INLINE envoy_config_metrics_v3_StatsMatcher_stats_matcher_oneofcases envoy_config_metrics_v3_StatsMatcher_stats_matcher_case(const envoy_config_metrics_v3_StatsMatcher* msg) {
301 return (envoy_config_metrics_v3_StatsMatcher_stats_matcher_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t);
302 }
303 UPB_INLINE bool envoy_config_metrics_v3_StatsMatcher_has_reject_all(const envoy_config_metrics_v3_StatsMatcher* msg) {
304 return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 1;
305 }
306 UPB_INLINE void envoy_config_metrics_v3_StatsMatcher_clear_reject_all(const envoy_config_metrics_v3_StatsMatcher* msg) {
307 UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_metrics_v3_StatsMatcher_stats_matcher_NOT_SET);
308 }
309 UPB_INLINE bool envoy_config_metrics_v3_StatsMatcher_reject_all(const envoy_config_metrics_v3_StatsMatcher* msg) {
310 return UPB_READ_ONEOF(msg, bool, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 1, false);
311 }
312 UPB_INLINE bool envoy_config_metrics_v3_StatsMatcher_has_exclusion_list(const envoy_config_metrics_v3_StatsMatcher* msg) {
313 return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 2;
314 }
315 UPB_INLINE void envoy_config_metrics_v3_StatsMatcher_clear_exclusion_list(const envoy_config_metrics_v3_StatsMatcher* msg) {
316 UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_ListStringMatcher*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_metrics_v3_StatsMatcher_stats_matcher_NOT_SET);
317 }
318 UPB_INLINE const struct envoy_type_matcher_v3_ListStringMatcher* envoy_config_metrics_v3_StatsMatcher_exclusion_list(const envoy_config_metrics_v3_StatsMatcher* msg) {
319 return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_v3_ListStringMatcher*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 2, NULL);
320 }
321 UPB_INLINE bool envoy_config_metrics_v3_StatsMatcher_has_inclusion_list(const envoy_config_metrics_v3_StatsMatcher* msg) {
322 return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 3;
323 }
324 UPB_INLINE void envoy_config_metrics_v3_StatsMatcher_clear_inclusion_list(const envoy_config_metrics_v3_StatsMatcher* msg) {
325 UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_ListStringMatcher*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_metrics_v3_StatsMatcher_stats_matcher_NOT_SET);
326 }
327 UPB_INLINE const struct envoy_type_matcher_v3_ListStringMatcher* envoy_config_metrics_v3_StatsMatcher_inclusion_list(const envoy_config_metrics_v3_StatsMatcher* msg) {
328 return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_v3_ListStringMatcher*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 3, NULL);
329 }
330
331 UPB_INLINE void envoy_config_metrics_v3_StatsMatcher_set_reject_all(envoy_config_metrics_v3_StatsMatcher *msg, bool value) {
332 UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 1);
333 }
334 UPB_INLINE void envoy_config_metrics_v3_StatsMatcher_set_exclusion_list(envoy_config_metrics_v3_StatsMatcher *msg, struct envoy_type_matcher_v3_ListStringMatcher* value) {
335 UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_ListStringMatcher*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 2);
336 }
337 UPB_INLINE struct envoy_type_matcher_v3_ListStringMatcher* envoy_config_metrics_v3_StatsMatcher_mutable_exclusion_list(envoy_config_metrics_v3_StatsMatcher* msg, upb_Arena* arena) {
338 struct envoy_type_matcher_v3_ListStringMatcher* sub = (struct envoy_type_matcher_v3_ListStringMatcher*)envoy_config_metrics_v3_StatsMatcher_exclusion_list(msg);
339 if (sub == NULL) {
340 sub = (struct envoy_type_matcher_v3_ListStringMatcher*)_upb_Message_New(&envoy_type_matcher_v3_ListStringMatcher_msginit, arena);
341 if (!sub) return NULL;
342 envoy_config_metrics_v3_StatsMatcher_set_exclusion_list(msg, sub);
343 }
344 return sub;
345 }
346 UPB_INLINE void envoy_config_metrics_v3_StatsMatcher_set_inclusion_list(envoy_config_metrics_v3_StatsMatcher *msg, struct envoy_type_matcher_v3_ListStringMatcher* value) {
347 UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_ListStringMatcher*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 3);
348 }
349 UPB_INLINE struct envoy_type_matcher_v3_ListStringMatcher* envoy_config_metrics_v3_StatsMatcher_mutable_inclusion_list(envoy_config_metrics_v3_StatsMatcher* msg, upb_Arena* arena) {
350 struct envoy_type_matcher_v3_ListStringMatcher* sub = (struct envoy_type_matcher_v3_ListStringMatcher*)envoy_config_metrics_v3_StatsMatcher_inclusion_list(msg);
351 if (sub == NULL) {
352 sub = (struct envoy_type_matcher_v3_ListStringMatcher*)_upb_Message_New(&envoy_type_matcher_v3_ListStringMatcher_msginit, arena);
353 if (!sub) return NULL;
354 envoy_config_metrics_v3_StatsMatcher_set_inclusion_list(msg, sub);
355 }
356 return sub;
357 }
358
359 /* envoy.config.metrics.v3.TagSpecifier */
360
361 UPB_INLINE envoy_config_metrics_v3_TagSpecifier* envoy_config_metrics_v3_TagSpecifier_new(upb_Arena* arena) {
362 return (envoy_config_metrics_v3_TagSpecifier*)_upb_Message_New(&envoy_config_metrics_v3_TagSpecifier_msginit, arena);
363 }
364 UPB_INLINE envoy_config_metrics_v3_TagSpecifier* envoy_config_metrics_v3_TagSpecifier_parse(const char* buf, size_t size, upb_Arena* arena) {
365 envoy_config_metrics_v3_TagSpecifier* ret = envoy_config_metrics_v3_TagSpecifier_new(arena);
366 if (!ret) return NULL;
367 if (upb_Decode(buf, size, ret, &envoy_config_metrics_v3_TagSpecifier_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
368 return NULL;
369 }
370 return ret;
371 }
372 UPB_INLINE envoy_config_metrics_v3_TagSpecifier* envoy_config_metrics_v3_TagSpecifier_parse_ex(const char* buf, size_t size,
373 const upb_ExtensionRegistry* extreg,
374 int options, upb_Arena* arena) {
375 envoy_config_metrics_v3_TagSpecifier* ret = envoy_config_metrics_v3_TagSpecifier_new(arena);
376 if (!ret) return NULL;
377 if (upb_Decode(buf, size, ret, &envoy_config_metrics_v3_TagSpecifier_msginit, extreg, options, arena) !=
378 kUpb_DecodeStatus_Ok) {
379 return NULL;
380 }
381 return ret;
382 }
383 UPB_INLINE char* envoy_config_metrics_v3_TagSpecifier_serialize(const envoy_config_metrics_v3_TagSpecifier* msg, upb_Arena* arena, size_t* len) {
384 char* ptr;
385 (void)upb_Encode(msg, &envoy_config_metrics_v3_TagSpecifier_msginit, 0, arena, &ptr, len);
386 return ptr;
387 }
388 UPB_INLINE char* envoy_config_metrics_v3_TagSpecifier_serialize_ex(const envoy_config_metrics_v3_TagSpecifier* msg, int options,
389 upb_Arena* arena, size_t* len) {
390 char* ptr;
391 (void)upb_Encode(msg, &envoy_config_metrics_v3_TagSpecifier_msginit, options, arena, &ptr, len);
392 return ptr;
393 }
394 typedef enum {
395 envoy_config_metrics_v3_TagSpecifier_tag_value_regex = 2,
396 envoy_config_metrics_v3_TagSpecifier_tag_value_fixed_value = 3,
397 envoy_config_metrics_v3_TagSpecifier_tag_value_NOT_SET = 0
398 } envoy_config_metrics_v3_TagSpecifier_tag_value_oneofcases;
399 UPB_INLINE envoy_config_metrics_v3_TagSpecifier_tag_value_oneofcases envoy_config_metrics_v3_TagSpecifier_tag_value_case(const envoy_config_metrics_v3_TagSpecifier* msg) {
400 return (envoy_config_metrics_v3_TagSpecifier_tag_value_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t);
401 }
402 UPB_INLINE void envoy_config_metrics_v3_TagSpecifier_clear_tag_name(const envoy_config_metrics_v3_TagSpecifier* msg) {
403 *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
404 }
405 UPB_INLINE upb_StringView envoy_config_metrics_v3_TagSpecifier_tag_name(const envoy_config_metrics_v3_TagSpecifier* msg) {
406 return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView);
407 }
408 UPB_INLINE bool envoy_config_metrics_v3_TagSpecifier_has_regex(const envoy_config_metrics_v3_TagSpecifier* msg) {
409 return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 2;
410 }
411 UPB_INLINE void envoy_config_metrics_v3_TagSpecifier_clear_regex(const envoy_config_metrics_v3_TagSpecifier* msg) {
412 UPB_WRITE_ONEOF(msg, upb_StringView, UPB_SIZE(4, 8), upb_StringView_FromDataAndSize(NULL, 0), UPB_SIZE(0, 0), envoy_config_metrics_v3_TagSpecifier_tag_value_NOT_SET);
413 }
414 UPB_INLINE upb_StringView envoy_config_metrics_v3_TagSpecifier_regex(const envoy_config_metrics_v3_TagSpecifier* msg) {
415 return UPB_READ_ONEOF(msg, upb_StringView, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 2, upb_StringView_FromString(""));
416 }
417 UPB_INLINE bool envoy_config_metrics_v3_TagSpecifier_has_fixed_value(const envoy_config_metrics_v3_TagSpecifier* msg) {
418 return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 3;
419 }
420 UPB_INLINE void envoy_config_metrics_v3_TagSpecifier_clear_fixed_value(const envoy_config_metrics_v3_TagSpecifier* msg) {
421 UPB_WRITE_ONEOF(msg, upb_StringView, UPB_SIZE(4, 8), upb_StringView_FromDataAndSize(NULL, 0), UPB_SIZE(0, 0), envoy_config_metrics_v3_TagSpecifier_tag_value_NOT_SET);
422 }
423 UPB_INLINE upb_StringView envoy_config_metrics_v3_TagSpecifier_fixed_value(const envoy_config_metrics_v3_TagSpecifier* msg) {
424 return UPB_READ_ONEOF(msg, upb_StringView, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 3, upb_StringView_FromString(""));
425 }
426
427 UPB_INLINE void envoy_config_metrics_v3_TagSpecifier_set_tag_name(envoy_config_metrics_v3_TagSpecifier *msg, upb_StringView value) {
428 *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView) = value;
429 }
430 UPB_INLINE void envoy_config_metrics_v3_TagSpecifier_set_regex(envoy_config_metrics_v3_TagSpecifier *msg, upb_StringView value) {
431 UPB_WRITE_ONEOF(msg, upb_StringView, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 2);
432 }
433 UPB_INLINE void envoy_config_metrics_v3_TagSpecifier_set_fixed_value(envoy_config_metrics_v3_TagSpecifier *msg, upb_StringView value) {
434 UPB_WRITE_ONEOF(msg, upb_StringView, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 3);
435 }
436
437 /* envoy.config.metrics.v3.HistogramBucketSettings */
438
439 UPB_INLINE envoy_config_metrics_v3_HistogramBucketSettings* envoy_config_metrics_v3_HistogramBucketSettings_new(upb_Arena* arena) {
440 return (envoy_config_metrics_v3_HistogramBucketSettings*)_upb_Message_New(&envoy_config_metrics_v3_HistogramBucketSettings_msginit, arena);
441 }
442 UPB_INLINE envoy_config_metrics_v3_HistogramBucketSettings* envoy_config_metrics_v3_HistogramBucketSettings_parse(const char* buf, size_t size, upb_Arena* arena) {
443 envoy_config_metrics_v3_HistogramBucketSettings* ret = envoy_config_metrics_v3_HistogramBucketSettings_new(arena);
444 if (!ret) return NULL;
445 if (upb_Decode(buf, size, ret, &envoy_config_metrics_v3_HistogramBucketSettings_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
446 return NULL;
447 }
448 return ret;
449 }
450 UPB_INLINE envoy_config_metrics_v3_HistogramBucketSettings* envoy_config_metrics_v3_HistogramBucketSettings_parse_ex(const char* buf, size_t size,
451 const upb_ExtensionRegistry* extreg,
452 int options, upb_Arena* arena) {
453 envoy_config_metrics_v3_HistogramBucketSettings* ret = envoy_config_metrics_v3_HistogramBucketSettings_new(arena);
454 if (!ret) return NULL;
455 if (upb_Decode(buf, size, ret, &envoy_config_metrics_v3_HistogramBucketSettings_msginit, extreg, options, arena) !=
456 kUpb_DecodeStatus_Ok) {
457 return NULL;
458 }
459 return ret;
460 }
461 UPB_INLINE char* envoy_config_metrics_v3_HistogramBucketSettings_serialize(const envoy_config_metrics_v3_HistogramBucketSettings* msg, upb_Arena* arena, size_t* len) {
462 char* ptr;
463 (void)upb_Encode(msg, &envoy_config_metrics_v3_HistogramBucketSettings_msginit, 0, arena, &ptr, len);
464 return ptr;
465 }
466 UPB_INLINE char* envoy_config_metrics_v3_HistogramBucketSettings_serialize_ex(const envoy_config_metrics_v3_HistogramBucketSettings* msg, int options,
467 upb_Arena* arena, size_t* len) {
468 char* ptr;
469 (void)upb_Encode(msg, &envoy_config_metrics_v3_HistogramBucketSettings_msginit, options, arena, &ptr, len);
470 return ptr;
471 }
472 UPB_INLINE bool envoy_config_metrics_v3_HistogramBucketSettings_has_match(const envoy_config_metrics_v3_HistogramBucketSettings* msg) {
473 return _upb_hasbit(msg, 1);
474 }
475 UPB_INLINE void envoy_config_metrics_v3_HistogramBucketSettings_clear_match(const envoy_config_metrics_v3_HistogramBucketSettings* msg) {
476 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const upb_Message*) = NULL;
477 }
478 UPB_INLINE const struct envoy_type_matcher_v3_StringMatcher* envoy_config_metrics_v3_HistogramBucketSettings_match(const envoy_config_metrics_v3_HistogramBucketSettings* msg) {
479 return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_type_matcher_v3_StringMatcher*);
480 }
481 UPB_INLINE void envoy_config_metrics_v3_HistogramBucketSettings_clear_buckets(const envoy_config_metrics_v3_HistogramBucketSettings* msg) {
482 _upb_array_detach(msg, UPB_SIZE(8, 16));
483 }
484 UPB_INLINE double const* envoy_config_metrics_v3_HistogramBucketSettings_buckets(const envoy_config_metrics_v3_HistogramBucketSettings* msg, size_t* len) {
485 return (double const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len);
486 }
487
488 UPB_INLINE void envoy_config_metrics_v3_HistogramBucketSettings_set_match(envoy_config_metrics_v3_HistogramBucketSettings *msg, struct envoy_type_matcher_v3_StringMatcher* value) {
489 _upb_sethas(msg, 1);
490 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_type_matcher_v3_StringMatcher*) = value;
491 }
492 UPB_INLINE struct envoy_type_matcher_v3_StringMatcher* envoy_config_metrics_v3_HistogramBucketSettings_mutable_match(envoy_config_metrics_v3_HistogramBucketSettings* msg, upb_Arena* arena) {
493 struct envoy_type_matcher_v3_StringMatcher* sub = (struct envoy_type_matcher_v3_StringMatcher*)envoy_config_metrics_v3_HistogramBucketSettings_match(msg);
494 if (sub == NULL) {
495 sub = (struct envoy_type_matcher_v3_StringMatcher*)_upb_Message_New(&envoy_type_matcher_v3_StringMatcher_msginit, arena);
496 if (!sub) return NULL;
497 envoy_config_metrics_v3_HistogramBucketSettings_set_match(msg, sub);
498 }
499 return sub;
500 }
501 UPB_INLINE double* envoy_config_metrics_v3_HistogramBucketSettings_mutable_buckets(envoy_config_metrics_v3_HistogramBucketSettings* msg, size_t* len) {
502 return (double*)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
503 }
504 UPB_INLINE double* envoy_config_metrics_v3_HistogramBucketSettings_resize_buckets(envoy_config_metrics_v3_HistogramBucketSettings* msg, size_t len, upb_Arena* arena) {
505 return (double*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(8, 16), len, 3, arena);
506 }
507 UPB_INLINE bool envoy_config_metrics_v3_HistogramBucketSettings_add_buckets(envoy_config_metrics_v3_HistogramBucketSettings* msg, double val, upb_Arena* arena) {
508 return _upb_Array_Append_accessor2(msg, UPB_SIZE(8, 16), 3, &val, arena);
509 }
510
511 /* envoy.config.metrics.v3.StatsdSink */
512
513 UPB_INLINE envoy_config_metrics_v3_StatsdSink* envoy_config_metrics_v3_StatsdSink_new(upb_Arena* arena) {
514 return (envoy_config_metrics_v3_StatsdSink*)_upb_Message_New(&envoy_config_metrics_v3_StatsdSink_msginit, arena);
515 }
516 UPB_INLINE envoy_config_metrics_v3_StatsdSink* envoy_config_metrics_v3_StatsdSink_parse(const char* buf, size_t size, upb_Arena* arena) {
517 envoy_config_metrics_v3_StatsdSink* ret = envoy_config_metrics_v3_StatsdSink_new(arena);
518 if (!ret) return NULL;
519 if (upb_Decode(buf, size, ret, &envoy_config_metrics_v3_StatsdSink_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
520 return NULL;
521 }
522 return ret;
523 }
524 UPB_INLINE envoy_config_metrics_v3_StatsdSink* envoy_config_metrics_v3_StatsdSink_parse_ex(const char* buf, size_t size,
525 const upb_ExtensionRegistry* extreg,
526 int options, upb_Arena* arena) {
527 envoy_config_metrics_v3_StatsdSink* ret = envoy_config_metrics_v3_StatsdSink_new(arena);
528 if (!ret) return NULL;
529 if (upb_Decode(buf, size, ret, &envoy_config_metrics_v3_StatsdSink_msginit, extreg, options, arena) !=
530 kUpb_DecodeStatus_Ok) {
531 return NULL;
532 }
533 return ret;
534 }
535 UPB_INLINE char* envoy_config_metrics_v3_StatsdSink_serialize(const envoy_config_metrics_v3_StatsdSink* msg, upb_Arena* arena, size_t* len) {
536 char* ptr;
537 (void)upb_Encode(msg, &envoy_config_metrics_v3_StatsdSink_msginit, 0, arena, &ptr, len);
538 return ptr;
539 }
540 UPB_INLINE char* envoy_config_metrics_v3_StatsdSink_serialize_ex(const envoy_config_metrics_v3_StatsdSink* msg, int options,
541 upb_Arena* arena, size_t* len) {
542 char* ptr;
543 (void)upb_Encode(msg, &envoy_config_metrics_v3_StatsdSink_msginit, options, arena, &ptr, len);
544 return ptr;
545 }
546 typedef enum {
547 envoy_config_metrics_v3_StatsdSink_statsd_specifier_address = 1,
548 envoy_config_metrics_v3_StatsdSink_statsd_specifier_tcp_cluster_name = 2,
549 envoy_config_metrics_v3_StatsdSink_statsd_specifier_NOT_SET = 0
550 } envoy_config_metrics_v3_StatsdSink_statsd_specifier_oneofcases;
551 UPB_INLINE envoy_config_metrics_v3_StatsdSink_statsd_specifier_oneofcases envoy_config_metrics_v3_StatsdSink_statsd_specifier_case(const envoy_config_metrics_v3_StatsdSink* msg) {
552 return (envoy_config_metrics_v3_StatsdSink_statsd_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t);
553 }
554 UPB_INLINE bool envoy_config_metrics_v3_StatsdSink_has_address(const envoy_config_metrics_v3_StatsdSink* msg) {
555 return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 1;
556 }
557 UPB_INLINE void envoy_config_metrics_v3_StatsdSink_clear_address(const envoy_config_metrics_v3_StatsdSink* msg) {
558 UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_Address*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_metrics_v3_StatsdSink_statsd_specifier_NOT_SET);
559 }
560 UPB_INLINE const struct envoy_config_core_v3_Address* envoy_config_metrics_v3_StatsdSink_address(const envoy_config_metrics_v3_StatsdSink* msg) {
561 return UPB_READ_ONEOF(msg, const struct envoy_config_core_v3_Address*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 1, NULL);
562 }
563 UPB_INLINE bool envoy_config_metrics_v3_StatsdSink_has_tcp_cluster_name(const envoy_config_metrics_v3_StatsdSink* msg) {
564 return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 2;
565 }
566 UPB_INLINE void envoy_config_metrics_v3_StatsdSink_clear_tcp_cluster_name(const envoy_config_metrics_v3_StatsdSink* msg) {
567 UPB_WRITE_ONEOF(msg, upb_StringView, UPB_SIZE(4, 8), upb_StringView_FromDataAndSize(NULL, 0), UPB_SIZE(0, 0), envoy_config_metrics_v3_StatsdSink_statsd_specifier_NOT_SET);
568 }
569 UPB_INLINE upb_StringView envoy_config_metrics_v3_StatsdSink_tcp_cluster_name(const envoy_config_metrics_v3_StatsdSink* msg) {
570 return UPB_READ_ONEOF(msg, upb_StringView, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 2, upb_StringView_FromString(""));
571 }
572 UPB_INLINE void envoy_config_metrics_v3_StatsdSink_clear_prefix(const envoy_config_metrics_v3_StatsdSink* msg) {
573 *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
574 }
575 UPB_INLINE upb_StringView envoy_config_metrics_v3_StatsdSink_prefix(const envoy_config_metrics_v3_StatsdSink* msg) {
576 return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView);
577 }
578
579 UPB_INLINE void envoy_config_metrics_v3_StatsdSink_set_address(envoy_config_metrics_v3_StatsdSink *msg, struct envoy_config_core_v3_Address* value) {
580 UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_Address*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 1);
581 }
582 UPB_INLINE struct envoy_config_core_v3_Address* envoy_config_metrics_v3_StatsdSink_mutable_address(envoy_config_metrics_v3_StatsdSink* msg, upb_Arena* arena) {
583 struct envoy_config_core_v3_Address* sub = (struct envoy_config_core_v3_Address*)envoy_config_metrics_v3_StatsdSink_address(msg);
584 if (sub == NULL) {
585 sub = (struct envoy_config_core_v3_Address*)_upb_Message_New(&envoy_config_core_v3_Address_msginit, arena);
586 if (!sub) return NULL;
587 envoy_config_metrics_v3_StatsdSink_set_address(msg, sub);
588 }
589 return sub;
590 }
591 UPB_INLINE void envoy_config_metrics_v3_StatsdSink_set_tcp_cluster_name(envoy_config_metrics_v3_StatsdSink *msg, upb_StringView value) {
592 UPB_WRITE_ONEOF(msg, upb_StringView, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 2);
593 }
594 UPB_INLINE void envoy_config_metrics_v3_StatsdSink_set_prefix(envoy_config_metrics_v3_StatsdSink *msg, upb_StringView value) {
595 *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView) = value;
596 }
597
598 /* envoy.config.metrics.v3.DogStatsdSink */
599
600 UPB_INLINE envoy_config_metrics_v3_DogStatsdSink* envoy_config_metrics_v3_DogStatsdSink_new(upb_Arena* arena) {
601 return (envoy_config_metrics_v3_DogStatsdSink*)_upb_Message_New(&envoy_config_metrics_v3_DogStatsdSink_msginit, arena);
602 }
603 UPB_INLINE envoy_config_metrics_v3_DogStatsdSink* envoy_config_metrics_v3_DogStatsdSink_parse(const char* buf, size_t size, upb_Arena* arena) {
604 envoy_config_metrics_v3_DogStatsdSink* ret = envoy_config_metrics_v3_DogStatsdSink_new(arena);
605 if (!ret) return NULL;
606 if (upb_Decode(buf, size, ret, &envoy_config_metrics_v3_DogStatsdSink_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
607 return NULL;
608 }
609 return ret;
610 }
611 UPB_INLINE envoy_config_metrics_v3_DogStatsdSink* envoy_config_metrics_v3_DogStatsdSink_parse_ex(const char* buf, size_t size,
612 const upb_ExtensionRegistry* extreg,
613 int options, upb_Arena* arena) {
614 envoy_config_metrics_v3_DogStatsdSink* ret = envoy_config_metrics_v3_DogStatsdSink_new(arena);
615 if (!ret) return NULL;
616 if (upb_Decode(buf, size, ret, &envoy_config_metrics_v3_DogStatsdSink_msginit, extreg, options, arena) !=
617 kUpb_DecodeStatus_Ok) {
618 return NULL;
619 }
620 return ret;
621 }
622 UPB_INLINE char* envoy_config_metrics_v3_DogStatsdSink_serialize(const envoy_config_metrics_v3_DogStatsdSink* msg, upb_Arena* arena, size_t* len) {
623 char* ptr;
624 (void)upb_Encode(msg, &envoy_config_metrics_v3_DogStatsdSink_msginit, 0, arena, &ptr, len);
625 return ptr;
626 }
627 UPB_INLINE char* envoy_config_metrics_v3_DogStatsdSink_serialize_ex(const envoy_config_metrics_v3_DogStatsdSink* msg, int options,
628 upb_Arena* arena, size_t* len) {
629 char* ptr;
630 (void)upb_Encode(msg, &envoy_config_metrics_v3_DogStatsdSink_msginit, options, arena, &ptr, len);
631 return ptr;
632 }
633 typedef enum {
634 envoy_config_metrics_v3_DogStatsdSink_dog_statsd_specifier_address = 1,
635 envoy_config_metrics_v3_DogStatsdSink_dog_statsd_specifier_NOT_SET = 0
636 } envoy_config_metrics_v3_DogStatsdSink_dog_statsd_specifier_oneofcases;
637 UPB_INLINE envoy_config_metrics_v3_DogStatsdSink_dog_statsd_specifier_oneofcases envoy_config_metrics_v3_DogStatsdSink_dog_statsd_specifier_case(const envoy_config_metrics_v3_DogStatsdSink* msg) {
638 return (envoy_config_metrics_v3_DogStatsdSink_dog_statsd_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t);
639 }
640 UPB_INLINE bool envoy_config_metrics_v3_DogStatsdSink_has_address(const envoy_config_metrics_v3_DogStatsdSink* msg) {
641 return _upb_getoneofcase(msg, UPB_SIZE(4, 4)) == 1;
642 }
643 UPB_INLINE void envoy_config_metrics_v3_DogStatsdSink_clear_address(const envoy_config_metrics_v3_DogStatsdSink* msg) {
644 UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_Address*, UPB_SIZE(20, 32), 0, UPB_SIZE(4, 4), envoy_config_metrics_v3_DogStatsdSink_dog_statsd_specifier_NOT_SET);
645 }
646 UPB_INLINE const struct envoy_config_core_v3_Address* envoy_config_metrics_v3_DogStatsdSink_address(const envoy_config_metrics_v3_DogStatsdSink* msg) {
647 return UPB_READ_ONEOF(msg, const struct envoy_config_core_v3_Address*, UPB_SIZE(20, 32), UPB_SIZE(4, 4), 1, NULL);
648 }
649 UPB_INLINE void envoy_config_metrics_v3_DogStatsdSink_clear_prefix(const envoy_config_metrics_v3_DogStatsdSink* msg) {
650 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
651 }
652 UPB_INLINE upb_StringView envoy_config_metrics_v3_DogStatsdSink_prefix(const envoy_config_metrics_v3_DogStatsdSink* msg) {
653 return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_StringView);
654 }
655 UPB_INLINE bool envoy_config_metrics_v3_DogStatsdSink_has_max_bytes_per_datagram(const envoy_config_metrics_v3_DogStatsdSink* msg) {
656 return _upb_hasbit(msg, 1);
657 }
658 UPB_INLINE void envoy_config_metrics_v3_DogStatsdSink_clear_max_bytes_per_datagram(const envoy_config_metrics_v3_DogStatsdSink* msg) {
659 *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const upb_Message*) = NULL;
660 }
661 UPB_INLINE const struct google_protobuf_UInt64Value* envoy_config_metrics_v3_DogStatsdSink_max_bytes_per_datagram(const envoy_config_metrics_v3_DogStatsdSink* msg) {
662 return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const struct google_protobuf_UInt64Value*);
663 }
664
665 UPB_INLINE void envoy_config_metrics_v3_DogStatsdSink_set_address(envoy_config_metrics_v3_DogStatsdSink *msg, struct envoy_config_core_v3_Address* value) {
666 UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_Address*, UPB_SIZE(20, 32), value, UPB_SIZE(4, 4), 1);
667 }
668 UPB_INLINE struct envoy_config_core_v3_Address* envoy_config_metrics_v3_DogStatsdSink_mutable_address(envoy_config_metrics_v3_DogStatsdSink* msg, upb_Arena* arena) {
669 struct envoy_config_core_v3_Address* sub = (struct envoy_config_core_v3_Address*)envoy_config_metrics_v3_DogStatsdSink_address(msg);
670 if (sub == NULL) {
671 sub = (struct envoy_config_core_v3_Address*)_upb_Message_New(&envoy_config_core_v3_Address_msginit, arena);
672 if (!sub) return NULL;
673 envoy_config_metrics_v3_DogStatsdSink_set_address(msg, sub);
674 }
675 return sub;
676 }
677 UPB_INLINE void envoy_config_metrics_v3_DogStatsdSink_set_prefix(envoy_config_metrics_v3_DogStatsdSink *msg, upb_StringView value) {
678 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_StringView) = value;
679 }
680 UPB_INLINE void envoy_config_metrics_v3_DogStatsdSink_set_max_bytes_per_datagram(envoy_config_metrics_v3_DogStatsdSink *msg, struct google_protobuf_UInt64Value* value) {
681 _upb_sethas(msg, 1);
682 *UPB_PTR_AT(msg, UPB_SIZE(16, 24), struct google_protobuf_UInt64Value*) = value;
683 }
684 UPB_INLINE struct google_protobuf_UInt64Value* envoy_config_metrics_v3_DogStatsdSink_mutable_max_bytes_per_datagram(envoy_config_metrics_v3_DogStatsdSink* msg, upb_Arena* arena) {
685 struct google_protobuf_UInt64Value* sub = (struct google_protobuf_UInt64Value*)envoy_config_metrics_v3_DogStatsdSink_max_bytes_per_datagram(msg);
686 if (sub == NULL) {
687 sub = (struct google_protobuf_UInt64Value*)_upb_Message_New(&google_protobuf_UInt64Value_msginit, arena);
688 if (!sub) return NULL;
689 envoy_config_metrics_v3_DogStatsdSink_set_max_bytes_per_datagram(msg, sub);
690 }
691 return sub;
692 }
693
694 /* envoy.config.metrics.v3.HystrixSink */
695
696 UPB_INLINE envoy_config_metrics_v3_HystrixSink* envoy_config_metrics_v3_HystrixSink_new(upb_Arena* arena) {
697 return (envoy_config_metrics_v3_HystrixSink*)_upb_Message_New(&envoy_config_metrics_v3_HystrixSink_msginit, arena);
698 }
699 UPB_INLINE envoy_config_metrics_v3_HystrixSink* envoy_config_metrics_v3_HystrixSink_parse(const char* buf, size_t size, upb_Arena* arena) {
700 envoy_config_metrics_v3_HystrixSink* ret = envoy_config_metrics_v3_HystrixSink_new(arena);
701 if (!ret) return NULL;
702 if (upb_Decode(buf, size, ret, &envoy_config_metrics_v3_HystrixSink_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
703 return NULL;
704 }
705 return ret;
706 }
707 UPB_INLINE envoy_config_metrics_v3_HystrixSink* envoy_config_metrics_v3_HystrixSink_parse_ex(const char* buf, size_t size,
708 const upb_ExtensionRegistry* extreg,
709 int options, upb_Arena* arena) {
710 envoy_config_metrics_v3_HystrixSink* ret = envoy_config_metrics_v3_HystrixSink_new(arena);
711 if (!ret) return NULL;
712 if (upb_Decode(buf, size, ret, &envoy_config_metrics_v3_HystrixSink_msginit, extreg, options, arena) !=
713 kUpb_DecodeStatus_Ok) {
714 return NULL;
715 }
716 return ret;
717 }
718 UPB_INLINE char* envoy_config_metrics_v3_HystrixSink_serialize(const envoy_config_metrics_v3_HystrixSink* msg, upb_Arena* arena, size_t* len) {
719 char* ptr;
720 (void)upb_Encode(msg, &envoy_config_metrics_v3_HystrixSink_msginit, 0, arena, &ptr, len);
721 return ptr;
722 }
723 UPB_INLINE char* envoy_config_metrics_v3_HystrixSink_serialize_ex(const envoy_config_metrics_v3_HystrixSink* msg, int options,
724 upb_Arena* arena, size_t* len) {
725 char* ptr;
726 (void)upb_Encode(msg, &envoy_config_metrics_v3_HystrixSink_msginit, options, arena, &ptr, len);
727 return ptr;
728 }
729 UPB_INLINE void envoy_config_metrics_v3_HystrixSink_clear_num_buckets(const envoy_config_metrics_v3_HystrixSink* msg) {
730 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t) = 0;
731 }
732 UPB_INLINE int64_t envoy_config_metrics_v3_HystrixSink_num_buckets(const envoy_config_metrics_v3_HystrixSink* msg) {
733 return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t);
734 }
735
736 UPB_INLINE void envoy_config_metrics_v3_HystrixSink_set_num_buckets(envoy_config_metrics_v3_HystrixSink *msg, int64_t value) {
737 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t) = value;
738 }
739
740 extern const upb_MiniTable_File envoy_config_metrics_v3_stats_proto_upb_file_layout;
741
742 #ifdef __cplusplus
743 } /* extern "C" */
744 #endif
745
746 #include "upb/port_undef.inc"
747
748 #endif /* ENVOY_CONFIG_METRICS_V3_STATS_PROTO_UPB_H_ */