1 /* This file was generated by upbc (the upb compiler) from the input
2 * file:
3 *
4 * envoy/config/endpoint/v3/load_report.proto
5 *
6 * Do not edit -- your changes will be discarded when the file is
7 * regenerated. */
8
9 #ifndef ENVOY_CONFIG_ENDPOINT_V3_LOAD_REPORT_PROTO_UPB_H_
10 #define ENVOY_CONFIG_ENDPOINT_V3_LOAD_REPORT_PROTO_UPB_H_
11
12 #include "upb/collections/array_internal.h"
13 #include "upb/collections/map_gencode_util.h"
14 #include "upb/message/accessors.h"
15 #include "upb/message/internal.h"
16 #include "upb/mini_table/enum_internal.h"
17 #include "upb/wire/decode.h"
18 #include "upb/wire/decode_fast.h"
19 #include "upb/wire/encode.h"
20
21 // Must be last.
22 #include "upb/port/def.inc"
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 typedef struct envoy_config_endpoint_v3_UpstreamLocalityStats envoy_config_endpoint_v3_UpstreamLocalityStats;
29 typedef struct envoy_config_endpoint_v3_UpstreamEndpointStats envoy_config_endpoint_v3_UpstreamEndpointStats;
30 typedef struct envoy_config_endpoint_v3_EndpointLoadMetricStats envoy_config_endpoint_v3_EndpointLoadMetricStats;
31 typedef struct envoy_config_endpoint_v3_ClusterStats envoy_config_endpoint_v3_ClusterStats;
32 typedef struct envoy_config_endpoint_v3_ClusterStats_DroppedRequests envoy_config_endpoint_v3_ClusterStats_DroppedRequests;
33 extern const upb_MiniTable envoy_config_endpoint_v3_UpstreamLocalityStats_msg_init;
34 extern const upb_MiniTable envoy_config_endpoint_v3_UpstreamEndpointStats_msg_init;
35 extern const upb_MiniTable envoy_config_endpoint_v3_EndpointLoadMetricStats_msg_init;
36 extern const upb_MiniTable envoy_config_endpoint_v3_ClusterStats_msg_init;
37 extern const upb_MiniTable envoy_config_endpoint_v3_ClusterStats_DroppedRequests_msg_init;
38 struct envoy_config_core_v3_Address;
39 struct envoy_config_core_v3_Locality;
40 struct google_protobuf_Duration;
41 struct google_protobuf_Struct;
42 extern const upb_MiniTable envoy_config_core_v3_Address_msg_init;
43 extern const upb_MiniTable envoy_config_core_v3_Locality_msg_init;
44 extern const upb_MiniTable google_protobuf_Duration_msg_init;
45 extern const upb_MiniTable google_protobuf_Struct_msg_init;
46
47
48
49 /* envoy.config.endpoint.v3.UpstreamLocalityStats */
50
envoy_config_endpoint_v3_UpstreamLocalityStats_new(upb_Arena * arena)51 UPB_INLINE envoy_config_endpoint_v3_UpstreamLocalityStats* envoy_config_endpoint_v3_UpstreamLocalityStats_new(upb_Arena* arena) {
52 return (envoy_config_endpoint_v3_UpstreamLocalityStats*)_upb_Message_New(&envoy_config_endpoint_v3_UpstreamLocalityStats_msg_init, arena);
53 }
envoy_config_endpoint_v3_UpstreamLocalityStats_parse(const char * buf,size_t size,upb_Arena * arena)54 UPB_INLINE envoy_config_endpoint_v3_UpstreamLocalityStats* envoy_config_endpoint_v3_UpstreamLocalityStats_parse(const char* buf, size_t size, upb_Arena* arena) {
55 envoy_config_endpoint_v3_UpstreamLocalityStats* ret = envoy_config_endpoint_v3_UpstreamLocalityStats_new(arena);
56 if (!ret) return NULL;
57 if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_UpstreamLocalityStats_msg_init, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
58 return NULL;
59 }
60 return ret;
61 }
envoy_config_endpoint_v3_UpstreamLocalityStats_parse_ex(const char * buf,size_t size,const upb_ExtensionRegistry * extreg,int options,upb_Arena * arena)62 UPB_INLINE envoy_config_endpoint_v3_UpstreamLocalityStats* envoy_config_endpoint_v3_UpstreamLocalityStats_parse_ex(const char* buf, size_t size,
63 const upb_ExtensionRegistry* extreg,
64 int options, upb_Arena* arena) {
65 envoy_config_endpoint_v3_UpstreamLocalityStats* ret = envoy_config_endpoint_v3_UpstreamLocalityStats_new(arena);
66 if (!ret) return NULL;
67 if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_UpstreamLocalityStats_msg_init, extreg, options, arena) !=
68 kUpb_DecodeStatus_Ok) {
69 return NULL;
70 }
71 return ret;
72 }
envoy_config_endpoint_v3_UpstreamLocalityStats_serialize(const envoy_config_endpoint_v3_UpstreamLocalityStats * msg,upb_Arena * arena,size_t * len)73 UPB_INLINE char* envoy_config_endpoint_v3_UpstreamLocalityStats_serialize(const envoy_config_endpoint_v3_UpstreamLocalityStats* msg, upb_Arena* arena, size_t* len) {
74 char* ptr;
75 (void)upb_Encode(msg, &envoy_config_endpoint_v3_UpstreamLocalityStats_msg_init, 0, arena, &ptr, len);
76 return ptr;
77 }
envoy_config_endpoint_v3_UpstreamLocalityStats_serialize_ex(const envoy_config_endpoint_v3_UpstreamLocalityStats * msg,int options,upb_Arena * arena,size_t * len)78 UPB_INLINE char* envoy_config_endpoint_v3_UpstreamLocalityStats_serialize_ex(const envoy_config_endpoint_v3_UpstreamLocalityStats* msg, int options,
79 upb_Arena* arena, size_t* len) {
80 char* ptr;
81 (void)upb_Encode(msg, &envoy_config_endpoint_v3_UpstreamLocalityStats_msg_init, options, arena, &ptr, len);
82 return ptr;
83 }
envoy_config_endpoint_v3_UpstreamLocalityStats_clear_locality(envoy_config_endpoint_v3_UpstreamLocalityStats * msg)84 UPB_INLINE void envoy_config_endpoint_v3_UpstreamLocalityStats_clear_locality(envoy_config_endpoint_v3_UpstreamLocalityStats* msg) {
85 const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 1, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
86 _upb_Message_ClearNonExtensionField(msg, &field);
87 }
envoy_config_endpoint_v3_UpstreamLocalityStats_locality(const envoy_config_endpoint_v3_UpstreamLocalityStats * msg)88 UPB_INLINE const struct envoy_config_core_v3_Locality* envoy_config_endpoint_v3_UpstreamLocalityStats_locality(const envoy_config_endpoint_v3_UpstreamLocalityStats* msg) {
89 const struct envoy_config_core_v3_Locality* default_val = NULL;
90 const struct envoy_config_core_v3_Locality* ret;
91 const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 1, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
92 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
93 return ret;
94 }
envoy_config_endpoint_v3_UpstreamLocalityStats_has_locality(const envoy_config_endpoint_v3_UpstreamLocalityStats * msg)95 UPB_INLINE bool envoy_config_endpoint_v3_UpstreamLocalityStats_has_locality(const envoy_config_endpoint_v3_UpstreamLocalityStats* msg) {
96 const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 1, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
97 return _upb_Message_HasNonExtensionField(msg, &field);
98 }
envoy_config_endpoint_v3_UpstreamLocalityStats_clear_total_successful_requests(envoy_config_endpoint_v3_UpstreamLocalityStats * msg)99 UPB_INLINE void envoy_config_endpoint_v3_UpstreamLocalityStats_clear_total_successful_requests(envoy_config_endpoint_v3_UpstreamLocalityStats* msg) {
100 const upb_MiniTableField field = {2, UPB_SIZE(24, 16), 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
101 _upb_Message_ClearNonExtensionField(msg, &field);
102 }
envoy_config_endpoint_v3_UpstreamLocalityStats_total_successful_requests(const envoy_config_endpoint_v3_UpstreamLocalityStats * msg)103 UPB_INLINE uint64_t envoy_config_endpoint_v3_UpstreamLocalityStats_total_successful_requests(const envoy_config_endpoint_v3_UpstreamLocalityStats* msg) {
104 uint64_t default_val = (uint64_t)0ull;
105 uint64_t ret;
106 const upb_MiniTableField field = {2, UPB_SIZE(24, 16), 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
107 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
108 return ret;
109 }
envoy_config_endpoint_v3_UpstreamLocalityStats_clear_total_requests_in_progress(envoy_config_endpoint_v3_UpstreamLocalityStats * msg)110 UPB_INLINE void envoy_config_endpoint_v3_UpstreamLocalityStats_clear_total_requests_in_progress(envoy_config_endpoint_v3_UpstreamLocalityStats* msg) {
111 const upb_MiniTableField field = {3, UPB_SIZE(32, 24), 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
112 _upb_Message_ClearNonExtensionField(msg, &field);
113 }
envoy_config_endpoint_v3_UpstreamLocalityStats_total_requests_in_progress(const envoy_config_endpoint_v3_UpstreamLocalityStats * msg)114 UPB_INLINE uint64_t envoy_config_endpoint_v3_UpstreamLocalityStats_total_requests_in_progress(const envoy_config_endpoint_v3_UpstreamLocalityStats* msg) {
115 uint64_t default_val = (uint64_t)0ull;
116 uint64_t ret;
117 const upb_MiniTableField field = {3, UPB_SIZE(32, 24), 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
118 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
119 return ret;
120 }
envoy_config_endpoint_v3_UpstreamLocalityStats_clear_total_error_requests(envoy_config_endpoint_v3_UpstreamLocalityStats * msg)121 UPB_INLINE void envoy_config_endpoint_v3_UpstreamLocalityStats_clear_total_error_requests(envoy_config_endpoint_v3_UpstreamLocalityStats* msg) {
122 const upb_MiniTableField field = {4, UPB_SIZE(40, 32), 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
123 _upb_Message_ClearNonExtensionField(msg, &field);
124 }
envoy_config_endpoint_v3_UpstreamLocalityStats_total_error_requests(const envoy_config_endpoint_v3_UpstreamLocalityStats * msg)125 UPB_INLINE uint64_t envoy_config_endpoint_v3_UpstreamLocalityStats_total_error_requests(const envoy_config_endpoint_v3_UpstreamLocalityStats* msg) {
126 uint64_t default_val = (uint64_t)0ull;
127 uint64_t ret;
128 const upb_MiniTableField field = {4, UPB_SIZE(40, 32), 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
129 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
130 return ret;
131 }
envoy_config_endpoint_v3_UpstreamLocalityStats_clear_load_metric_stats(envoy_config_endpoint_v3_UpstreamLocalityStats * msg)132 UPB_INLINE void envoy_config_endpoint_v3_UpstreamLocalityStats_clear_load_metric_stats(envoy_config_endpoint_v3_UpstreamLocalityStats* msg) {
133 const upb_MiniTableField field = {5, UPB_SIZE(8, 40), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
134 _upb_Message_ClearNonExtensionField(msg, &field);
135 }
envoy_config_endpoint_v3_UpstreamLocalityStats_load_metric_stats(const envoy_config_endpoint_v3_UpstreamLocalityStats * msg,size_t * size)136 UPB_INLINE const envoy_config_endpoint_v3_EndpointLoadMetricStats* const* envoy_config_endpoint_v3_UpstreamLocalityStats_load_metric_stats(const envoy_config_endpoint_v3_UpstreamLocalityStats* msg, size_t* size) {
137 const upb_MiniTableField field = {5, UPB_SIZE(8, 40), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
138 const upb_Array* arr = upb_Message_GetArray(msg, &field);
139 if (arr) {
140 if (size) *size = arr->size;
141 return (const envoy_config_endpoint_v3_EndpointLoadMetricStats* const*)_upb_array_constptr(arr);
142 } else {
143 if (size) *size = 0;
144 return NULL;
145 }
146 }
_envoy_config_endpoint_v3_UpstreamLocalityStats_load_metric_stats_upb_array(const envoy_config_endpoint_v3_UpstreamLocalityStats * msg,size_t * size)147 UPB_INLINE const upb_Array* _envoy_config_endpoint_v3_UpstreamLocalityStats_load_metric_stats_upb_array(const envoy_config_endpoint_v3_UpstreamLocalityStats* msg, size_t* size) {
148 const upb_MiniTableField field = {5, UPB_SIZE(8, 40), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
149 const upb_Array* arr = upb_Message_GetArray(msg, &field);
150 if (size) {
151 *size = arr ? arr->size : 0;
152 }
153 return arr;
154 }
_envoy_config_endpoint_v3_UpstreamLocalityStats_load_metric_stats_mutable_upb_array(const envoy_config_endpoint_v3_UpstreamLocalityStats * msg,size_t * size,upb_Arena * arena)155 UPB_INLINE upb_Array* _envoy_config_endpoint_v3_UpstreamLocalityStats_load_metric_stats_mutable_upb_array(const envoy_config_endpoint_v3_UpstreamLocalityStats* msg, size_t* size, upb_Arena* arena) {
156 const upb_MiniTableField field = {5, UPB_SIZE(8, 40), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
157 upb_Array* arr = upb_Message_GetOrCreateMutableArray(
158 (upb_Message*)msg, &field, arena);
159 if (size) {
160 *size = arr ? arr->size : 0;
161 }
162 return arr;
163 }
envoy_config_endpoint_v3_UpstreamLocalityStats_has_load_metric_stats(const envoy_config_endpoint_v3_UpstreamLocalityStats * msg)164 UPB_INLINE bool envoy_config_endpoint_v3_UpstreamLocalityStats_has_load_metric_stats(const envoy_config_endpoint_v3_UpstreamLocalityStats* msg) {
165 size_t size;
166 envoy_config_endpoint_v3_UpstreamLocalityStats_load_metric_stats(msg, &size);
167 return size != 0;
168 }
envoy_config_endpoint_v3_UpstreamLocalityStats_clear_priority(envoy_config_endpoint_v3_UpstreamLocalityStats * msg)169 UPB_INLINE void envoy_config_endpoint_v3_UpstreamLocalityStats_clear_priority(envoy_config_endpoint_v3_UpstreamLocalityStats* msg) {
170 const upb_MiniTableField field = {6, UPB_SIZE(12, 4), 0, kUpb_NoSub, 13, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)};
171 _upb_Message_ClearNonExtensionField(msg, &field);
172 }
envoy_config_endpoint_v3_UpstreamLocalityStats_priority(const envoy_config_endpoint_v3_UpstreamLocalityStats * msg)173 UPB_INLINE uint32_t envoy_config_endpoint_v3_UpstreamLocalityStats_priority(const envoy_config_endpoint_v3_UpstreamLocalityStats* msg) {
174 uint32_t default_val = (uint32_t)0u;
175 uint32_t ret;
176 const upb_MiniTableField field = {6, UPB_SIZE(12, 4), 0, kUpb_NoSub, 13, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)};
177 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
178 return ret;
179 }
envoy_config_endpoint_v3_UpstreamLocalityStats_clear_upstream_endpoint_stats(envoy_config_endpoint_v3_UpstreamLocalityStats * msg)180 UPB_INLINE void envoy_config_endpoint_v3_UpstreamLocalityStats_clear_upstream_endpoint_stats(envoy_config_endpoint_v3_UpstreamLocalityStats* msg) {
181 const upb_MiniTableField field = {7, UPB_SIZE(16, 48), 0, 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
182 _upb_Message_ClearNonExtensionField(msg, &field);
183 }
envoy_config_endpoint_v3_UpstreamLocalityStats_upstream_endpoint_stats(const envoy_config_endpoint_v3_UpstreamLocalityStats * msg,size_t * size)184 UPB_INLINE const envoy_config_endpoint_v3_UpstreamEndpointStats* const* envoy_config_endpoint_v3_UpstreamLocalityStats_upstream_endpoint_stats(const envoy_config_endpoint_v3_UpstreamLocalityStats* msg, size_t* size) {
185 const upb_MiniTableField field = {7, UPB_SIZE(16, 48), 0, 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
186 const upb_Array* arr = upb_Message_GetArray(msg, &field);
187 if (arr) {
188 if (size) *size = arr->size;
189 return (const envoy_config_endpoint_v3_UpstreamEndpointStats* const*)_upb_array_constptr(arr);
190 } else {
191 if (size) *size = 0;
192 return NULL;
193 }
194 }
_envoy_config_endpoint_v3_UpstreamLocalityStats_upstream_endpoint_stats_upb_array(const envoy_config_endpoint_v3_UpstreamLocalityStats * msg,size_t * size)195 UPB_INLINE const upb_Array* _envoy_config_endpoint_v3_UpstreamLocalityStats_upstream_endpoint_stats_upb_array(const envoy_config_endpoint_v3_UpstreamLocalityStats* msg, size_t* size) {
196 const upb_MiniTableField field = {7, UPB_SIZE(16, 48), 0, 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
197 const upb_Array* arr = upb_Message_GetArray(msg, &field);
198 if (size) {
199 *size = arr ? arr->size : 0;
200 }
201 return arr;
202 }
_envoy_config_endpoint_v3_UpstreamLocalityStats_upstream_endpoint_stats_mutable_upb_array(const envoy_config_endpoint_v3_UpstreamLocalityStats * msg,size_t * size,upb_Arena * arena)203 UPB_INLINE upb_Array* _envoy_config_endpoint_v3_UpstreamLocalityStats_upstream_endpoint_stats_mutable_upb_array(const envoy_config_endpoint_v3_UpstreamLocalityStats* msg, size_t* size, upb_Arena* arena) {
204 const upb_MiniTableField field = {7, UPB_SIZE(16, 48), 0, 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
205 upb_Array* arr = upb_Message_GetOrCreateMutableArray(
206 (upb_Message*)msg, &field, arena);
207 if (size) {
208 *size = arr ? arr->size : 0;
209 }
210 return arr;
211 }
envoy_config_endpoint_v3_UpstreamLocalityStats_has_upstream_endpoint_stats(const envoy_config_endpoint_v3_UpstreamLocalityStats * msg)212 UPB_INLINE bool envoy_config_endpoint_v3_UpstreamLocalityStats_has_upstream_endpoint_stats(const envoy_config_endpoint_v3_UpstreamLocalityStats* msg) {
213 size_t size;
214 envoy_config_endpoint_v3_UpstreamLocalityStats_upstream_endpoint_stats(msg, &size);
215 return size != 0;
216 }
envoy_config_endpoint_v3_UpstreamLocalityStats_clear_total_issued_requests(envoy_config_endpoint_v3_UpstreamLocalityStats * msg)217 UPB_INLINE void envoy_config_endpoint_v3_UpstreamLocalityStats_clear_total_issued_requests(envoy_config_endpoint_v3_UpstreamLocalityStats* msg) {
218 const upb_MiniTableField field = {8, UPB_SIZE(48, 56), 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
219 _upb_Message_ClearNonExtensionField(msg, &field);
220 }
envoy_config_endpoint_v3_UpstreamLocalityStats_total_issued_requests(const envoy_config_endpoint_v3_UpstreamLocalityStats * msg)221 UPB_INLINE uint64_t envoy_config_endpoint_v3_UpstreamLocalityStats_total_issued_requests(const envoy_config_endpoint_v3_UpstreamLocalityStats* msg) {
222 uint64_t default_val = (uint64_t)0ull;
223 uint64_t ret;
224 const upb_MiniTableField field = {8, UPB_SIZE(48, 56), 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
225 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
226 return ret;
227 }
228
envoy_config_endpoint_v3_UpstreamLocalityStats_set_locality(envoy_config_endpoint_v3_UpstreamLocalityStats * msg,struct envoy_config_core_v3_Locality * value)229 UPB_INLINE void envoy_config_endpoint_v3_UpstreamLocalityStats_set_locality(envoy_config_endpoint_v3_UpstreamLocalityStats *msg, struct envoy_config_core_v3_Locality* value) {
230 const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 1, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
231 _upb_Message_SetNonExtensionField(msg, &field, &value);
232 }
envoy_config_endpoint_v3_UpstreamLocalityStats_mutable_locality(envoy_config_endpoint_v3_UpstreamLocalityStats * msg,upb_Arena * arena)233 UPB_INLINE struct envoy_config_core_v3_Locality* envoy_config_endpoint_v3_UpstreamLocalityStats_mutable_locality(envoy_config_endpoint_v3_UpstreamLocalityStats* msg, upb_Arena* arena) {
234 struct envoy_config_core_v3_Locality* sub = (struct envoy_config_core_v3_Locality*)envoy_config_endpoint_v3_UpstreamLocalityStats_locality(msg);
235 if (sub == NULL) {
236 sub = (struct envoy_config_core_v3_Locality*)_upb_Message_New(&envoy_config_core_v3_Locality_msg_init, arena);
237 if (sub) envoy_config_endpoint_v3_UpstreamLocalityStats_set_locality(msg, sub);
238 }
239 return sub;
240 }
envoy_config_endpoint_v3_UpstreamLocalityStats_set_total_successful_requests(envoy_config_endpoint_v3_UpstreamLocalityStats * msg,uint64_t value)241 UPB_INLINE void envoy_config_endpoint_v3_UpstreamLocalityStats_set_total_successful_requests(envoy_config_endpoint_v3_UpstreamLocalityStats *msg, uint64_t value) {
242 const upb_MiniTableField field = {2, UPB_SIZE(24, 16), 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
243 _upb_Message_SetNonExtensionField(msg, &field, &value);
244 }
envoy_config_endpoint_v3_UpstreamLocalityStats_set_total_requests_in_progress(envoy_config_endpoint_v3_UpstreamLocalityStats * msg,uint64_t value)245 UPB_INLINE void envoy_config_endpoint_v3_UpstreamLocalityStats_set_total_requests_in_progress(envoy_config_endpoint_v3_UpstreamLocalityStats *msg, uint64_t value) {
246 const upb_MiniTableField field = {3, UPB_SIZE(32, 24), 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
247 _upb_Message_SetNonExtensionField(msg, &field, &value);
248 }
envoy_config_endpoint_v3_UpstreamLocalityStats_set_total_error_requests(envoy_config_endpoint_v3_UpstreamLocalityStats * msg,uint64_t value)249 UPB_INLINE void envoy_config_endpoint_v3_UpstreamLocalityStats_set_total_error_requests(envoy_config_endpoint_v3_UpstreamLocalityStats *msg, uint64_t value) {
250 const upb_MiniTableField field = {4, UPB_SIZE(40, 32), 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
251 _upb_Message_SetNonExtensionField(msg, &field, &value);
252 }
envoy_config_endpoint_v3_UpstreamLocalityStats_mutable_load_metric_stats(envoy_config_endpoint_v3_UpstreamLocalityStats * msg,size_t * size)253 UPB_INLINE envoy_config_endpoint_v3_EndpointLoadMetricStats** envoy_config_endpoint_v3_UpstreamLocalityStats_mutable_load_metric_stats(envoy_config_endpoint_v3_UpstreamLocalityStats* msg, size_t* size) {
254 upb_MiniTableField field = {5, UPB_SIZE(8, 40), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
255 upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
256 if (arr) {
257 if (size) *size = arr->size;
258 return (envoy_config_endpoint_v3_EndpointLoadMetricStats**)_upb_array_ptr(arr);
259 } else {
260 if (size) *size = 0;
261 return NULL;
262 }
263 }
envoy_config_endpoint_v3_UpstreamLocalityStats_resize_load_metric_stats(envoy_config_endpoint_v3_UpstreamLocalityStats * msg,size_t size,upb_Arena * arena)264 UPB_INLINE envoy_config_endpoint_v3_EndpointLoadMetricStats** envoy_config_endpoint_v3_UpstreamLocalityStats_resize_load_metric_stats(envoy_config_endpoint_v3_UpstreamLocalityStats* msg, size_t size, upb_Arena* arena) {
265 upb_MiniTableField field = {5, UPB_SIZE(8, 40), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
266 return (envoy_config_endpoint_v3_EndpointLoadMetricStats**)upb_Message_ResizeArray(msg, &field, size, arena);
267 }
envoy_config_endpoint_v3_UpstreamLocalityStats_add_load_metric_stats(envoy_config_endpoint_v3_UpstreamLocalityStats * msg,upb_Arena * arena)268 UPB_INLINE struct envoy_config_endpoint_v3_EndpointLoadMetricStats* envoy_config_endpoint_v3_UpstreamLocalityStats_add_load_metric_stats(envoy_config_endpoint_v3_UpstreamLocalityStats* msg, upb_Arena* arena) {
269 upb_MiniTableField field = {5, UPB_SIZE(8, 40), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
270 upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
271 if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
272 return NULL;
273 }
274 struct envoy_config_endpoint_v3_EndpointLoadMetricStats* sub = (struct envoy_config_endpoint_v3_EndpointLoadMetricStats*)_upb_Message_New(&envoy_config_endpoint_v3_EndpointLoadMetricStats_msg_init, arena);
275 if (!arr || !sub) return NULL;
276 _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
277 return sub;
278 }
envoy_config_endpoint_v3_UpstreamLocalityStats_set_priority(envoy_config_endpoint_v3_UpstreamLocalityStats * msg,uint32_t value)279 UPB_INLINE void envoy_config_endpoint_v3_UpstreamLocalityStats_set_priority(envoy_config_endpoint_v3_UpstreamLocalityStats *msg, uint32_t value) {
280 const upb_MiniTableField field = {6, UPB_SIZE(12, 4), 0, kUpb_NoSub, 13, kUpb_FieldMode_Scalar | (kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)};
281 _upb_Message_SetNonExtensionField(msg, &field, &value);
282 }
envoy_config_endpoint_v3_UpstreamLocalityStats_mutable_upstream_endpoint_stats(envoy_config_endpoint_v3_UpstreamLocalityStats * msg,size_t * size)283 UPB_INLINE envoy_config_endpoint_v3_UpstreamEndpointStats** envoy_config_endpoint_v3_UpstreamLocalityStats_mutable_upstream_endpoint_stats(envoy_config_endpoint_v3_UpstreamLocalityStats* msg, size_t* size) {
284 upb_MiniTableField field = {7, UPB_SIZE(16, 48), 0, 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
285 upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
286 if (arr) {
287 if (size) *size = arr->size;
288 return (envoy_config_endpoint_v3_UpstreamEndpointStats**)_upb_array_ptr(arr);
289 } else {
290 if (size) *size = 0;
291 return NULL;
292 }
293 }
envoy_config_endpoint_v3_UpstreamLocalityStats_resize_upstream_endpoint_stats(envoy_config_endpoint_v3_UpstreamLocalityStats * msg,size_t size,upb_Arena * arena)294 UPB_INLINE envoy_config_endpoint_v3_UpstreamEndpointStats** envoy_config_endpoint_v3_UpstreamLocalityStats_resize_upstream_endpoint_stats(envoy_config_endpoint_v3_UpstreamLocalityStats* msg, size_t size, upb_Arena* arena) {
295 upb_MiniTableField field = {7, UPB_SIZE(16, 48), 0, 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
296 return (envoy_config_endpoint_v3_UpstreamEndpointStats**)upb_Message_ResizeArray(msg, &field, size, arena);
297 }
envoy_config_endpoint_v3_UpstreamLocalityStats_add_upstream_endpoint_stats(envoy_config_endpoint_v3_UpstreamLocalityStats * msg,upb_Arena * arena)298 UPB_INLINE struct envoy_config_endpoint_v3_UpstreamEndpointStats* envoy_config_endpoint_v3_UpstreamLocalityStats_add_upstream_endpoint_stats(envoy_config_endpoint_v3_UpstreamLocalityStats* msg, upb_Arena* arena) {
299 upb_MiniTableField field = {7, UPB_SIZE(16, 48), 0, 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
300 upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
301 if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
302 return NULL;
303 }
304 struct envoy_config_endpoint_v3_UpstreamEndpointStats* sub = (struct envoy_config_endpoint_v3_UpstreamEndpointStats*)_upb_Message_New(&envoy_config_endpoint_v3_UpstreamEndpointStats_msg_init, arena);
305 if (!arr || !sub) return NULL;
306 _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
307 return sub;
308 }
envoy_config_endpoint_v3_UpstreamLocalityStats_set_total_issued_requests(envoy_config_endpoint_v3_UpstreamLocalityStats * msg,uint64_t value)309 UPB_INLINE void envoy_config_endpoint_v3_UpstreamLocalityStats_set_total_issued_requests(envoy_config_endpoint_v3_UpstreamLocalityStats *msg, uint64_t value) {
310 const upb_MiniTableField field = {8, UPB_SIZE(48, 56), 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
311 _upb_Message_SetNonExtensionField(msg, &field, &value);
312 }
313
314 /* envoy.config.endpoint.v3.UpstreamEndpointStats */
315
envoy_config_endpoint_v3_UpstreamEndpointStats_new(upb_Arena * arena)316 UPB_INLINE envoy_config_endpoint_v3_UpstreamEndpointStats* envoy_config_endpoint_v3_UpstreamEndpointStats_new(upb_Arena* arena) {
317 return (envoy_config_endpoint_v3_UpstreamEndpointStats*)_upb_Message_New(&envoy_config_endpoint_v3_UpstreamEndpointStats_msg_init, arena);
318 }
envoy_config_endpoint_v3_UpstreamEndpointStats_parse(const char * buf,size_t size,upb_Arena * arena)319 UPB_INLINE envoy_config_endpoint_v3_UpstreamEndpointStats* envoy_config_endpoint_v3_UpstreamEndpointStats_parse(const char* buf, size_t size, upb_Arena* arena) {
320 envoy_config_endpoint_v3_UpstreamEndpointStats* ret = envoy_config_endpoint_v3_UpstreamEndpointStats_new(arena);
321 if (!ret) return NULL;
322 if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_UpstreamEndpointStats_msg_init, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
323 return NULL;
324 }
325 return ret;
326 }
envoy_config_endpoint_v3_UpstreamEndpointStats_parse_ex(const char * buf,size_t size,const upb_ExtensionRegistry * extreg,int options,upb_Arena * arena)327 UPB_INLINE envoy_config_endpoint_v3_UpstreamEndpointStats* envoy_config_endpoint_v3_UpstreamEndpointStats_parse_ex(const char* buf, size_t size,
328 const upb_ExtensionRegistry* extreg,
329 int options, upb_Arena* arena) {
330 envoy_config_endpoint_v3_UpstreamEndpointStats* ret = envoy_config_endpoint_v3_UpstreamEndpointStats_new(arena);
331 if (!ret) return NULL;
332 if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_UpstreamEndpointStats_msg_init, extreg, options, arena) !=
333 kUpb_DecodeStatus_Ok) {
334 return NULL;
335 }
336 return ret;
337 }
envoy_config_endpoint_v3_UpstreamEndpointStats_serialize(const envoy_config_endpoint_v3_UpstreamEndpointStats * msg,upb_Arena * arena,size_t * len)338 UPB_INLINE char* envoy_config_endpoint_v3_UpstreamEndpointStats_serialize(const envoy_config_endpoint_v3_UpstreamEndpointStats* msg, upb_Arena* arena, size_t* len) {
339 char* ptr;
340 (void)upb_Encode(msg, &envoy_config_endpoint_v3_UpstreamEndpointStats_msg_init, 0, arena, &ptr, len);
341 return ptr;
342 }
envoy_config_endpoint_v3_UpstreamEndpointStats_serialize_ex(const envoy_config_endpoint_v3_UpstreamEndpointStats * msg,int options,upb_Arena * arena,size_t * len)343 UPB_INLINE char* envoy_config_endpoint_v3_UpstreamEndpointStats_serialize_ex(const envoy_config_endpoint_v3_UpstreamEndpointStats* msg, int options,
344 upb_Arena* arena, size_t* len) {
345 char* ptr;
346 (void)upb_Encode(msg, &envoy_config_endpoint_v3_UpstreamEndpointStats_msg_init, options, arena, &ptr, len);
347 return ptr;
348 }
envoy_config_endpoint_v3_UpstreamEndpointStats_clear_address(envoy_config_endpoint_v3_UpstreamEndpointStats * msg)349 UPB_INLINE void envoy_config_endpoint_v3_UpstreamEndpointStats_clear_address(envoy_config_endpoint_v3_UpstreamEndpointStats* msg) {
350 const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 1, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
351 _upb_Message_ClearNonExtensionField(msg, &field);
352 }
envoy_config_endpoint_v3_UpstreamEndpointStats_address(const envoy_config_endpoint_v3_UpstreamEndpointStats * msg)353 UPB_INLINE const struct envoy_config_core_v3_Address* envoy_config_endpoint_v3_UpstreamEndpointStats_address(const envoy_config_endpoint_v3_UpstreamEndpointStats* msg) {
354 const struct envoy_config_core_v3_Address* default_val = NULL;
355 const struct envoy_config_core_v3_Address* ret;
356 const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 1, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
357 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
358 return ret;
359 }
envoy_config_endpoint_v3_UpstreamEndpointStats_has_address(const envoy_config_endpoint_v3_UpstreamEndpointStats * msg)360 UPB_INLINE bool envoy_config_endpoint_v3_UpstreamEndpointStats_has_address(const envoy_config_endpoint_v3_UpstreamEndpointStats* msg) {
361 const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 1, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
362 return _upb_Message_HasNonExtensionField(msg, &field);
363 }
envoy_config_endpoint_v3_UpstreamEndpointStats_clear_total_successful_requests(envoy_config_endpoint_v3_UpstreamEndpointStats * msg)364 UPB_INLINE void envoy_config_endpoint_v3_UpstreamEndpointStats_clear_total_successful_requests(envoy_config_endpoint_v3_UpstreamEndpointStats* msg) {
365 const upb_MiniTableField field = {2, 16, 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
366 _upb_Message_ClearNonExtensionField(msg, &field);
367 }
envoy_config_endpoint_v3_UpstreamEndpointStats_total_successful_requests(const envoy_config_endpoint_v3_UpstreamEndpointStats * msg)368 UPB_INLINE uint64_t envoy_config_endpoint_v3_UpstreamEndpointStats_total_successful_requests(const envoy_config_endpoint_v3_UpstreamEndpointStats* msg) {
369 uint64_t default_val = (uint64_t)0ull;
370 uint64_t ret;
371 const upb_MiniTableField field = {2, 16, 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
372 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
373 return ret;
374 }
envoy_config_endpoint_v3_UpstreamEndpointStats_clear_total_requests_in_progress(envoy_config_endpoint_v3_UpstreamEndpointStats * msg)375 UPB_INLINE void envoy_config_endpoint_v3_UpstreamEndpointStats_clear_total_requests_in_progress(envoy_config_endpoint_v3_UpstreamEndpointStats* msg) {
376 const upb_MiniTableField field = {3, 24, 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
377 _upb_Message_ClearNonExtensionField(msg, &field);
378 }
envoy_config_endpoint_v3_UpstreamEndpointStats_total_requests_in_progress(const envoy_config_endpoint_v3_UpstreamEndpointStats * msg)379 UPB_INLINE uint64_t envoy_config_endpoint_v3_UpstreamEndpointStats_total_requests_in_progress(const envoy_config_endpoint_v3_UpstreamEndpointStats* msg) {
380 uint64_t default_val = (uint64_t)0ull;
381 uint64_t ret;
382 const upb_MiniTableField field = {3, 24, 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
383 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
384 return ret;
385 }
envoy_config_endpoint_v3_UpstreamEndpointStats_clear_total_error_requests(envoy_config_endpoint_v3_UpstreamEndpointStats * msg)386 UPB_INLINE void envoy_config_endpoint_v3_UpstreamEndpointStats_clear_total_error_requests(envoy_config_endpoint_v3_UpstreamEndpointStats* msg) {
387 const upb_MiniTableField field = {4, 32, 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
388 _upb_Message_ClearNonExtensionField(msg, &field);
389 }
envoy_config_endpoint_v3_UpstreamEndpointStats_total_error_requests(const envoy_config_endpoint_v3_UpstreamEndpointStats * msg)390 UPB_INLINE uint64_t envoy_config_endpoint_v3_UpstreamEndpointStats_total_error_requests(const envoy_config_endpoint_v3_UpstreamEndpointStats* msg) {
391 uint64_t default_val = (uint64_t)0ull;
392 uint64_t ret;
393 const upb_MiniTableField field = {4, 32, 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
394 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
395 return ret;
396 }
envoy_config_endpoint_v3_UpstreamEndpointStats_clear_load_metric_stats(envoy_config_endpoint_v3_UpstreamEndpointStats * msg)397 UPB_INLINE void envoy_config_endpoint_v3_UpstreamEndpointStats_clear_load_metric_stats(envoy_config_endpoint_v3_UpstreamEndpointStats* msg) {
398 const upb_MiniTableField field = {5, UPB_SIZE(8, 40), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
399 _upb_Message_ClearNonExtensionField(msg, &field);
400 }
envoy_config_endpoint_v3_UpstreamEndpointStats_load_metric_stats(const envoy_config_endpoint_v3_UpstreamEndpointStats * msg,size_t * size)401 UPB_INLINE const envoy_config_endpoint_v3_EndpointLoadMetricStats* const* envoy_config_endpoint_v3_UpstreamEndpointStats_load_metric_stats(const envoy_config_endpoint_v3_UpstreamEndpointStats* msg, size_t* size) {
402 const upb_MiniTableField field = {5, UPB_SIZE(8, 40), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
403 const upb_Array* arr = upb_Message_GetArray(msg, &field);
404 if (arr) {
405 if (size) *size = arr->size;
406 return (const envoy_config_endpoint_v3_EndpointLoadMetricStats* const*)_upb_array_constptr(arr);
407 } else {
408 if (size) *size = 0;
409 return NULL;
410 }
411 }
_envoy_config_endpoint_v3_UpstreamEndpointStats_load_metric_stats_upb_array(const envoy_config_endpoint_v3_UpstreamEndpointStats * msg,size_t * size)412 UPB_INLINE const upb_Array* _envoy_config_endpoint_v3_UpstreamEndpointStats_load_metric_stats_upb_array(const envoy_config_endpoint_v3_UpstreamEndpointStats* msg, size_t* size) {
413 const upb_MiniTableField field = {5, UPB_SIZE(8, 40), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
414 const upb_Array* arr = upb_Message_GetArray(msg, &field);
415 if (size) {
416 *size = arr ? arr->size : 0;
417 }
418 return arr;
419 }
_envoy_config_endpoint_v3_UpstreamEndpointStats_load_metric_stats_mutable_upb_array(const envoy_config_endpoint_v3_UpstreamEndpointStats * msg,size_t * size,upb_Arena * arena)420 UPB_INLINE upb_Array* _envoy_config_endpoint_v3_UpstreamEndpointStats_load_metric_stats_mutable_upb_array(const envoy_config_endpoint_v3_UpstreamEndpointStats* msg, size_t* size, upb_Arena* arena) {
421 const upb_MiniTableField field = {5, UPB_SIZE(8, 40), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
422 upb_Array* arr = upb_Message_GetOrCreateMutableArray(
423 (upb_Message*)msg, &field, arena);
424 if (size) {
425 *size = arr ? arr->size : 0;
426 }
427 return arr;
428 }
envoy_config_endpoint_v3_UpstreamEndpointStats_has_load_metric_stats(const envoy_config_endpoint_v3_UpstreamEndpointStats * msg)429 UPB_INLINE bool envoy_config_endpoint_v3_UpstreamEndpointStats_has_load_metric_stats(const envoy_config_endpoint_v3_UpstreamEndpointStats* msg) {
430 size_t size;
431 envoy_config_endpoint_v3_UpstreamEndpointStats_load_metric_stats(msg, &size);
432 return size != 0;
433 }
envoy_config_endpoint_v3_UpstreamEndpointStats_clear_metadata(envoy_config_endpoint_v3_UpstreamEndpointStats * msg)434 UPB_INLINE void envoy_config_endpoint_v3_UpstreamEndpointStats_clear_metadata(envoy_config_endpoint_v3_UpstreamEndpointStats* msg) {
435 const upb_MiniTableField field = {6, UPB_SIZE(12, 48), 2, 2, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
436 _upb_Message_ClearNonExtensionField(msg, &field);
437 }
envoy_config_endpoint_v3_UpstreamEndpointStats_metadata(const envoy_config_endpoint_v3_UpstreamEndpointStats * msg)438 UPB_INLINE const struct google_protobuf_Struct* envoy_config_endpoint_v3_UpstreamEndpointStats_metadata(const envoy_config_endpoint_v3_UpstreamEndpointStats* msg) {
439 const struct google_protobuf_Struct* default_val = NULL;
440 const struct google_protobuf_Struct* ret;
441 const upb_MiniTableField field = {6, UPB_SIZE(12, 48), 2, 2, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
442 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
443 return ret;
444 }
envoy_config_endpoint_v3_UpstreamEndpointStats_has_metadata(const envoy_config_endpoint_v3_UpstreamEndpointStats * msg)445 UPB_INLINE bool envoy_config_endpoint_v3_UpstreamEndpointStats_has_metadata(const envoy_config_endpoint_v3_UpstreamEndpointStats* msg) {
446 const upb_MiniTableField field = {6, UPB_SIZE(12, 48), 2, 2, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
447 return _upb_Message_HasNonExtensionField(msg, &field);
448 }
envoy_config_endpoint_v3_UpstreamEndpointStats_clear_total_issued_requests(envoy_config_endpoint_v3_UpstreamEndpointStats * msg)449 UPB_INLINE void envoy_config_endpoint_v3_UpstreamEndpointStats_clear_total_issued_requests(envoy_config_endpoint_v3_UpstreamEndpointStats* msg) {
450 const upb_MiniTableField field = {7, UPB_SIZE(40, 56), 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
451 _upb_Message_ClearNonExtensionField(msg, &field);
452 }
envoy_config_endpoint_v3_UpstreamEndpointStats_total_issued_requests(const envoy_config_endpoint_v3_UpstreamEndpointStats * msg)453 UPB_INLINE uint64_t envoy_config_endpoint_v3_UpstreamEndpointStats_total_issued_requests(const envoy_config_endpoint_v3_UpstreamEndpointStats* msg) {
454 uint64_t default_val = (uint64_t)0ull;
455 uint64_t ret;
456 const upb_MiniTableField field = {7, UPB_SIZE(40, 56), 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
457 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
458 return ret;
459 }
460
envoy_config_endpoint_v3_UpstreamEndpointStats_set_address(envoy_config_endpoint_v3_UpstreamEndpointStats * msg,struct envoy_config_core_v3_Address * value)461 UPB_INLINE void envoy_config_endpoint_v3_UpstreamEndpointStats_set_address(envoy_config_endpoint_v3_UpstreamEndpointStats *msg, struct envoy_config_core_v3_Address* value) {
462 const upb_MiniTableField field = {1, UPB_SIZE(4, 8), 1, 0, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
463 _upb_Message_SetNonExtensionField(msg, &field, &value);
464 }
envoy_config_endpoint_v3_UpstreamEndpointStats_mutable_address(envoy_config_endpoint_v3_UpstreamEndpointStats * msg,upb_Arena * arena)465 UPB_INLINE struct envoy_config_core_v3_Address* envoy_config_endpoint_v3_UpstreamEndpointStats_mutable_address(envoy_config_endpoint_v3_UpstreamEndpointStats* msg, upb_Arena* arena) {
466 struct envoy_config_core_v3_Address* sub = (struct envoy_config_core_v3_Address*)envoy_config_endpoint_v3_UpstreamEndpointStats_address(msg);
467 if (sub == NULL) {
468 sub = (struct envoy_config_core_v3_Address*)_upb_Message_New(&envoy_config_core_v3_Address_msg_init, arena);
469 if (sub) envoy_config_endpoint_v3_UpstreamEndpointStats_set_address(msg, sub);
470 }
471 return sub;
472 }
envoy_config_endpoint_v3_UpstreamEndpointStats_set_total_successful_requests(envoy_config_endpoint_v3_UpstreamEndpointStats * msg,uint64_t value)473 UPB_INLINE void envoy_config_endpoint_v3_UpstreamEndpointStats_set_total_successful_requests(envoy_config_endpoint_v3_UpstreamEndpointStats *msg, uint64_t value) {
474 const upb_MiniTableField field = {2, 16, 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
475 _upb_Message_SetNonExtensionField(msg, &field, &value);
476 }
envoy_config_endpoint_v3_UpstreamEndpointStats_set_total_requests_in_progress(envoy_config_endpoint_v3_UpstreamEndpointStats * msg,uint64_t value)477 UPB_INLINE void envoy_config_endpoint_v3_UpstreamEndpointStats_set_total_requests_in_progress(envoy_config_endpoint_v3_UpstreamEndpointStats *msg, uint64_t value) {
478 const upb_MiniTableField field = {3, 24, 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
479 _upb_Message_SetNonExtensionField(msg, &field, &value);
480 }
envoy_config_endpoint_v3_UpstreamEndpointStats_set_total_error_requests(envoy_config_endpoint_v3_UpstreamEndpointStats * msg,uint64_t value)481 UPB_INLINE void envoy_config_endpoint_v3_UpstreamEndpointStats_set_total_error_requests(envoy_config_endpoint_v3_UpstreamEndpointStats *msg, uint64_t value) {
482 const upb_MiniTableField field = {4, 32, 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
483 _upb_Message_SetNonExtensionField(msg, &field, &value);
484 }
envoy_config_endpoint_v3_UpstreamEndpointStats_mutable_load_metric_stats(envoy_config_endpoint_v3_UpstreamEndpointStats * msg,size_t * size)485 UPB_INLINE envoy_config_endpoint_v3_EndpointLoadMetricStats** envoy_config_endpoint_v3_UpstreamEndpointStats_mutable_load_metric_stats(envoy_config_endpoint_v3_UpstreamEndpointStats* msg, size_t* size) {
486 upb_MiniTableField field = {5, UPB_SIZE(8, 40), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
487 upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
488 if (arr) {
489 if (size) *size = arr->size;
490 return (envoy_config_endpoint_v3_EndpointLoadMetricStats**)_upb_array_ptr(arr);
491 } else {
492 if (size) *size = 0;
493 return NULL;
494 }
495 }
envoy_config_endpoint_v3_UpstreamEndpointStats_resize_load_metric_stats(envoy_config_endpoint_v3_UpstreamEndpointStats * msg,size_t size,upb_Arena * arena)496 UPB_INLINE envoy_config_endpoint_v3_EndpointLoadMetricStats** envoy_config_endpoint_v3_UpstreamEndpointStats_resize_load_metric_stats(envoy_config_endpoint_v3_UpstreamEndpointStats* msg, size_t size, upb_Arena* arena) {
497 upb_MiniTableField field = {5, UPB_SIZE(8, 40), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
498 return (envoy_config_endpoint_v3_EndpointLoadMetricStats**)upb_Message_ResizeArray(msg, &field, size, arena);
499 }
envoy_config_endpoint_v3_UpstreamEndpointStats_add_load_metric_stats(envoy_config_endpoint_v3_UpstreamEndpointStats * msg,upb_Arena * arena)500 UPB_INLINE struct envoy_config_endpoint_v3_EndpointLoadMetricStats* envoy_config_endpoint_v3_UpstreamEndpointStats_add_load_metric_stats(envoy_config_endpoint_v3_UpstreamEndpointStats* msg, upb_Arena* arena) {
501 upb_MiniTableField field = {5, UPB_SIZE(8, 40), 0, 1, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
502 upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
503 if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
504 return NULL;
505 }
506 struct envoy_config_endpoint_v3_EndpointLoadMetricStats* sub = (struct envoy_config_endpoint_v3_EndpointLoadMetricStats*)_upb_Message_New(&envoy_config_endpoint_v3_EndpointLoadMetricStats_msg_init, arena);
507 if (!arr || !sub) return NULL;
508 _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
509 return sub;
510 }
envoy_config_endpoint_v3_UpstreamEndpointStats_set_metadata(envoy_config_endpoint_v3_UpstreamEndpointStats * msg,struct google_protobuf_Struct * value)511 UPB_INLINE void envoy_config_endpoint_v3_UpstreamEndpointStats_set_metadata(envoy_config_endpoint_v3_UpstreamEndpointStats *msg, struct google_protobuf_Struct* value) {
512 const upb_MiniTableField field = {6, UPB_SIZE(12, 48), 2, 2, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
513 _upb_Message_SetNonExtensionField(msg, &field, &value);
514 }
envoy_config_endpoint_v3_UpstreamEndpointStats_mutable_metadata(envoy_config_endpoint_v3_UpstreamEndpointStats * msg,upb_Arena * arena)515 UPB_INLINE struct google_protobuf_Struct* envoy_config_endpoint_v3_UpstreamEndpointStats_mutable_metadata(envoy_config_endpoint_v3_UpstreamEndpointStats* msg, upb_Arena* arena) {
516 struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_config_endpoint_v3_UpstreamEndpointStats_metadata(msg);
517 if (sub == NULL) {
518 sub = (struct google_protobuf_Struct*)_upb_Message_New(&google_protobuf_Struct_msg_init, arena);
519 if (sub) envoy_config_endpoint_v3_UpstreamEndpointStats_set_metadata(msg, sub);
520 }
521 return sub;
522 }
envoy_config_endpoint_v3_UpstreamEndpointStats_set_total_issued_requests(envoy_config_endpoint_v3_UpstreamEndpointStats * msg,uint64_t value)523 UPB_INLINE void envoy_config_endpoint_v3_UpstreamEndpointStats_set_total_issued_requests(envoy_config_endpoint_v3_UpstreamEndpointStats *msg, uint64_t value) {
524 const upb_MiniTableField field = {7, UPB_SIZE(40, 56), 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
525 _upb_Message_SetNonExtensionField(msg, &field, &value);
526 }
527
528 /* envoy.config.endpoint.v3.EndpointLoadMetricStats */
529
envoy_config_endpoint_v3_EndpointLoadMetricStats_new(upb_Arena * arena)530 UPB_INLINE envoy_config_endpoint_v3_EndpointLoadMetricStats* envoy_config_endpoint_v3_EndpointLoadMetricStats_new(upb_Arena* arena) {
531 return (envoy_config_endpoint_v3_EndpointLoadMetricStats*)_upb_Message_New(&envoy_config_endpoint_v3_EndpointLoadMetricStats_msg_init, arena);
532 }
envoy_config_endpoint_v3_EndpointLoadMetricStats_parse(const char * buf,size_t size,upb_Arena * arena)533 UPB_INLINE envoy_config_endpoint_v3_EndpointLoadMetricStats* envoy_config_endpoint_v3_EndpointLoadMetricStats_parse(const char* buf, size_t size, upb_Arena* arena) {
534 envoy_config_endpoint_v3_EndpointLoadMetricStats* ret = envoy_config_endpoint_v3_EndpointLoadMetricStats_new(arena);
535 if (!ret) return NULL;
536 if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_EndpointLoadMetricStats_msg_init, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
537 return NULL;
538 }
539 return ret;
540 }
envoy_config_endpoint_v3_EndpointLoadMetricStats_parse_ex(const char * buf,size_t size,const upb_ExtensionRegistry * extreg,int options,upb_Arena * arena)541 UPB_INLINE envoy_config_endpoint_v3_EndpointLoadMetricStats* envoy_config_endpoint_v3_EndpointLoadMetricStats_parse_ex(const char* buf, size_t size,
542 const upb_ExtensionRegistry* extreg,
543 int options, upb_Arena* arena) {
544 envoy_config_endpoint_v3_EndpointLoadMetricStats* ret = envoy_config_endpoint_v3_EndpointLoadMetricStats_new(arena);
545 if (!ret) return NULL;
546 if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_EndpointLoadMetricStats_msg_init, extreg, options, arena) !=
547 kUpb_DecodeStatus_Ok) {
548 return NULL;
549 }
550 return ret;
551 }
envoy_config_endpoint_v3_EndpointLoadMetricStats_serialize(const envoy_config_endpoint_v3_EndpointLoadMetricStats * msg,upb_Arena * arena,size_t * len)552 UPB_INLINE char* envoy_config_endpoint_v3_EndpointLoadMetricStats_serialize(const envoy_config_endpoint_v3_EndpointLoadMetricStats* msg, upb_Arena* arena, size_t* len) {
553 char* ptr;
554 (void)upb_Encode(msg, &envoy_config_endpoint_v3_EndpointLoadMetricStats_msg_init, 0, arena, &ptr, len);
555 return ptr;
556 }
envoy_config_endpoint_v3_EndpointLoadMetricStats_serialize_ex(const envoy_config_endpoint_v3_EndpointLoadMetricStats * msg,int options,upb_Arena * arena,size_t * len)557 UPB_INLINE char* envoy_config_endpoint_v3_EndpointLoadMetricStats_serialize_ex(const envoy_config_endpoint_v3_EndpointLoadMetricStats* msg, int options,
558 upb_Arena* arena, size_t* len) {
559 char* ptr;
560 (void)upb_Encode(msg, &envoy_config_endpoint_v3_EndpointLoadMetricStats_msg_init, options, arena, &ptr, len);
561 return ptr;
562 }
envoy_config_endpoint_v3_EndpointLoadMetricStats_clear_metric_name(envoy_config_endpoint_v3_EndpointLoadMetricStats * msg)563 UPB_INLINE void envoy_config_endpoint_v3_EndpointLoadMetricStats_clear_metric_name(envoy_config_endpoint_v3_EndpointLoadMetricStats* msg) {
564 const upb_MiniTableField field = {1, 0, 0, kUpb_NoSub, 9, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
565 _upb_Message_ClearNonExtensionField(msg, &field);
566 }
envoy_config_endpoint_v3_EndpointLoadMetricStats_metric_name(const envoy_config_endpoint_v3_EndpointLoadMetricStats * msg)567 UPB_INLINE upb_StringView envoy_config_endpoint_v3_EndpointLoadMetricStats_metric_name(const envoy_config_endpoint_v3_EndpointLoadMetricStats* msg) {
568 upb_StringView default_val = upb_StringView_FromString("");
569 upb_StringView ret;
570 const upb_MiniTableField field = {1, 0, 0, kUpb_NoSub, 9, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
571 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
572 return ret;
573 }
envoy_config_endpoint_v3_EndpointLoadMetricStats_clear_num_requests_finished_with_metric(envoy_config_endpoint_v3_EndpointLoadMetricStats * msg)574 UPB_INLINE void envoy_config_endpoint_v3_EndpointLoadMetricStats_clear_num_requests_finished_with_metric(envoy_config_endpoint_v3_EndpointLoadMetricStats* msg) {
575 const upb_MiniTableField field = {2, UPB_SIZE(8, 16), 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
576 _upb_Message_ClearNonExtensionField(msg, &field);
577 }
envoy_config_endpoint_v3_EndpointLoadMetricStats_num_requests_finished_with_metric(const envoy_config_endpoint_v3_EndpointLoadMetricStats * msg)578 UPB_INLINE uint64_t envoy_config_endpoint_v3_EndpointLoadMetricStats_num_requests_finished_with_metric(const envoy_config_endpoint_v3_EndpointLoadMetricStats* msg) {
579 uint64_t default_val = (uint64_t)0ull;
580 uint64_t ret;
581 const upb_MiniTableField field = {2, UPB_SIZE(8, 16), 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
582 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
583 return ret;
584 }
envoy_config_endpoint_v3_EndpointLoadMetricStats_clear_total_metric_value(envoy_config_endpoint_v3_EndpointLoadMetricStats * msg)585 UPB_INLINE void envoy_config_endpoint_v3_EndpointLoadMetricStats_clear_total_metric_value(envoy_config_endpoint_v3_EndpointLoadMetricStats* msg) {
586 const upb_MiniTableField field = {3, UPB_SIZE(16, 24), 0, kUpb_NoSub, 1, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
587 _upb_Message_ClearNonExtensionField(msg, &field);
588 }
envoy_config_endpoint_v3_EndpointLoadMetricStats_total_metric_value(const envoy_config_endpoint_v3_EndpointLoadMetricStats * msg)589 UPB_INLINE double envoy_config_endpoint_v3_EndpointLoadMetricStats_total_metric_value(const envoy_config_endpoint_v3_EndpointLoadMetricStats* msg) {
590 double default_val = 0;
591 double ret;
592 const upb_MiniTableField field = {3, UPB_SIZE(16, 24), 0, kUpb_NoSub, 1, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
593 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
594 return ret;
595 }
596
envoy_config_endpoint_v3_EndpointLoadMetricStats_set_metric_name(envoy_config_endpoint_v3_EndpointLoadMetricStats * msg,upb_StringView value)597 UPB_INLINE void envoy_config_endpoint_v3_EndpointLoadMetricStats_set_metric_name(envoy_config_endpoint_v3_EndpointLoadMetricStats *msg, upb_StringView value) {
598 const upb_MiniTableField field = {1, 0, 0, kUpb_NoSub, 9, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
599 _upb_Message_SetNonExtensionField(msg, &field, &value);
600 }
envoy_config_endpoint_v3_EndpointLoadMetricStats_set_num_requests_finished_with_metric(envoy_config_endpoint_v3_EndpointLoadMetricStats * msg,uint64_t value)601 UPB_INLINE void envoy_config_endpoint_v3_EndpointLoadMetricStats_set_num_requests_finished_with_metric(envoy_config_endpoint_v3_EndpointLoadMetricStats *msg, uint64_t value) {
602 const upb_MiniTableField field = {2, UPB_SIZE(8, 16), 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
603 _upb_Message_SetNonExtensionField(msg, &field, &value);
604 }
envoy_config_endpoint_v3_EndpointLoadMetricStats_set_total_metric_value(envoy_config_endpoint_v3_EndpointLoadMetricStats * msg,double value)605 UPB_INLINE void envoy_config_endpoint_v3_EndpointLoadMetricStats_set_total_metric_value(envoy_config_endpoint_v3_EndpointLoadMetricStats *msg, double value) {
606 const upb_MiniTableField field = {3, UPB_SIZE(16, 24), 0, kUpb_NoSub, 1, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
607 _upb_Message_SetNonExtensionField(msg, &field, &value);
608 }
609
610 /* envoy.config.endpoint.v3.ClusterStats */
611
envoy_config_endpoint_v3_ClusterStats_new(upb_Arena * arena)612 UPB_INLINE envoy_config_endpoint_v3_ClusterStats* envoy_config_endpoint_v3_ClusterStats_new(upb_Arena* arena) {
613 return (envoy_config_endpoint_v3_ClusterStats*)_upb_Message_New(&envoy_config_endpoint_v3_ClusterStats_msg_init, arena);
614 }
envoy_config_endpoint_v3_ClusterStats_parse(const char * buf,size_t size,upb_Arena * arena)615 UPB_INLINE envoy_config_endpoint_v3_ClusterStats* envoy_config_endpoint_v3_ClusterStats_parse(const char* buf, size_t size, upb_Arena* arena) {
616 envoy_config_endpoint_v3_ClusterStats* ret = envoy_config_endpoint_v3_ClusterStats_new(arena);
617 if (!ret) return NULL;
618 if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_ClusterStats_msg_init, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
619 return NULL;
620 }
621 return ret;
622 }
envoy_config_endpoint_v3_ClusterStats_parse_ex(const char * buf,size_t size,const upb_ExtensionRegistry * extreg,int options,upb_Arena * arena)623 UPB_INLINE envoy_config_endpoint_v3_ClusterStats* envoy_config_endpoint_v3_ClusterStats_parse_ex(const char* buf, size_t size,
624 const upb_ExtensionRegistry* extreg,
625 int options, upb_Arena* arena) {
626 envoy_config_endpoint_v3_ClusterStats* ret = envoy_config_endpoint_v3_ClusterStats_new(arena);
627 if (!ret) return NULL;
628 if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_ClusterStats_msg_init, extreg, options, arena) !=
629 kUpb_DecodeStatus_Ok) {
630 return NULL;
631 }
632 return ret;
633 }
envoy_config_endpoint_v3_ClusterStats_serialize(const envoy_config_endpoint_v3_ClusterStats * msg,upb_Arena * arena,size_t * len)634 UPB_INLINE char* envoy_config_endpoint_v3_ClusterStats_serialize(const envoy_config_endpoint_v3_ClusterStats* msg, upb_Arena* arena, size_t* len) {
635 char* ptr;
636 (void)upb_Encode(msg, &envoy_config_endpoint_v3_ClusterStats_msg_init, 0, arena, &ptr, len);
637 return ptr;
638 }
envoy_config_endpoint_v3_ClusterStats_serialize_ex(const envoy_config_endpoint_v3_ClusterStats * msg,int options,upb_Arena * arena,size_t * len)639 UPB_INLINE char* envoy_config_endpoint_v3_ClusterStats_serialize_ex(const envoy_config_endpoint_v3_ClusterStats* msg, int options,
640 upb_Arena* arena, size_t* len) {
641 char* ptr;
642 (void)upb_Encode(msg, &envoy_config_endpoint_v3_ClusterStats_msg_init, options, arena, &ptr, len);
643 return ptr;
644 }
envoy_config_endpoint_v3_ClusterStats_clear_cluster_name(envoy_config_endpoint_v3_ClusterStats * msg)645 UPB_INLINE void envoy_config_endpoint_v3_ClusterStats_clear_cluster_name(envoy_config_endpoint_v3_ClusterStats* msg) {
646 const upb_MiniTableField field = {1, UPB_SIZE(16, 8), 0, kUpb_NoSub, 9, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
647 _upb_Message_ClearNonExtensionField(msg, &field);
648 }
envoy_config_endpoint_v3_ClusterStats_cluster_name(const envoy_config_endpoint_v3_ClusterStats * msg)649 UPB_INLINE upb_StringView envoy_config_endpoint_v3_ClusterStats_cluster_name(const envoy_config_endpoint_v3_ClusterStats* msg) {
650 upb_StringView default_val = upb_StringView_FromString("");
651 upb_StringView ret;
652 const upb_MiniTableField field = {1, UPB_SIZE(16, 8), 0, kUpb_NoSub, 9, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
653 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
654 return ret;
655 }
envoy_config_endpoint_v3_ClusterStats_clear_upstream_locality_stats(envoy_config_endpoint_v3_ClusterStats * msg)656 UPB_INLINE void envoy_config_endpoint_v3_ClusterStats_clear_upstream_locality_stats(envoy_config_endpoint_v3_ClusterStats* msg) {
657 const upb_MiniTableField field = {2, UPB_SIZE(4, 24), 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
658 _upb_Message_ClearNonExtensionField(msg, &field);
659 }
envoy_config_endpoint_v3_ClusterStats_upstream_locality_stats(const envoy_config_endpoint_v3_ClusterStats * msg,size_t * size)660 UPB_INLINE const envoy_config_endpoint_v3_UpstreamLocalityStats* const* envoy_config_endpoint_v3_ClusterStats_upstream_locality_stats(const envoy_config_endpoint_v3_ClusterStats* msg, size_t* size) {
661 const upb_MiniTableField field = {2, UPB_SIZE(4, 24), 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
662 const upb_Array* arr = upb_Message_GetArray(msg, &field);
663 if (arr) {
664 if (size) *size = arr->size;
665 return (const envoy_config_endpoint_v3_UpstreamLocalityStats* const*)_upb_array_constptr(arr);
666 } else {
667 if (size) *size = 0;
668 return NULL;
669 }
670 }
_envoy_config_endpoint_v3_ClusterStats_upstream_locality_stats_upb_array(const envoy_config_endpoint_v3_ClusterStats * msg,size_t * size)671 UPB_INLINE const upb_Array* _envoy_config_endpoint_v3_ClusterStats_upstream_locality_stats_upb_array(const envoy_config_endpoint_v3_ClusterStats* msg, size_t* size) {
672 const upb_MiniTableField field = {2, UPB_SIZE(4, 24), 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
673 const upb_Array* arr = upb_Message_GetArray(msg, &field);
674 if (size) {
675 *size = arr ? arr->size : 0;
676 }
677 return arr;
678 }
_envoy_config_endpoint_v3_ClusterStats_upstream_locality_stats_mutable_upb_array(const envoy_config_endpoint_v3_ClusterStats * msg,size_t * size,upb_Arena * arena)679 UPB_INLINE upb_Array* _envoy_config_endpoint_v3_ClusterStats_upstream_locality_stats_mutable_upb_array(const envoy_config_endpoint_v3_ClusterStats* msg, size_t* size, upb_Arena* arena) {
680 const upb_MiniTableField field = {2, UPB_SIZE(4, 24), 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
681 upb_Array* arr = upb_Message_GetOrCreateMutableArray(
682 (upb_Message*)msg, &field, arena);
683 if (size) {
684 *size = arr ? arr->size : 0;
685 }
686 return arr;
687 }
envoy_config_endpoint_v3_ClusterStats_has_upstream_locality_stats(const envoy_config_endpoint_v3_ClusterStats * msg)688 UPB_INLINE bool envoy_config_endpoint_v3_ClusterStats_has_upstream_locality_stats(const envoy_config_endpoint_v3_ClusterStats* msg) {
689 size_t size;
690 envoy_config_endpoint_v3_ClusterStats_upstream_locality_stats(msg, &size);
691 return size != 0;
692 }
envoy_config_endpoint_v3_ClusterStats_clear_total_dropped_requests(envoy_config_endpoint_v3_ClusterStats * msg)693 UPB_INLINE void envoy_config_endpoint_v3_ClusterStats_clear_total_dropped_requests(envoy_config_endpoint_v3_ClusterStats* msg) {
694 const upb_MiniTableField field = {3, UPB_SIZE(24, 32), 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
695 _upb_Message_ClearNonExtensionField(msg, &field);
696 }
envoy_config_endpoint_v3_ClusterStats_total_dropped_requests(const envoy_config_endpoint_v3_ClusterStats * msg)697 UPB_INLINE uint64_t envoy_config_endpoint_v3_ClusterStats_total_dropped_requests(const envoy_config_endpoint_v3_ClusterStats* msg) {
698 uint64_t default_val = (uint64_t)0ull;
699 uint64_t ret;
700 const upb_MiniTableField field = {3, UPB_SIZE(24, 32), 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
701 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
702 return ret;
703 }
envoy_config_endpoint_v3_ClusterStats_clear_load_report_interval(envoy_config_endpoint_v3_ClusterStats * msg)704 UPB_INLINE void envoy_config_endpoint_v3_ClusterStats_clear_load_report_interval(envoy_config_endpoint_v3_ClusterStats* msg) {
705 const upb_MiniTableField field = {4, UPB_SIZE(8, 40), 1, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
706 _upb_Message_ClearNonExtensionField(msg, &field);
707 }
envoy_config_endpoint_v3_ClusterStats_load_report_interval(const envoy_config_endpoint_v3_ClusterStats * msg)708 UPB_INLINE const struct google_protobuf_Duration* envoy_config_endpoint_v3_ClusterStats_load_report_interval(const envoy_config_endpoint_v3_ClusterStats* msg) {
709 const struct google_protobuf_Duration* default_val = NULL;
710 const struct google_protobuf_Duration* ret;
711 const upb_MiniTableField field = {4, UPB_SIZE(8, 40), 1, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
712 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
713 return ret;
714 }
envoy_config_endpoint_v3_ClusterStats_has_load_report_interval(const envoy_config_endpoint_v3_ClusterStats * msg)715 UPB_INLINE bool envoy_config_endpoint_v3_ClusterStats_has_load_report_interval(const envoy_config_endpoint_v3_ClusterStats* msg) {
716 const upb_MiniTableField field = {4, UPB_SIZE(8, 40), 1, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
717 return _upb_Message_HasNonExtensionField(msg, &field);
718 }
envoy_config_endpoint_v3_ClusterStats_clear_dropped_requests(envoy_config_endpoint_v3_ClusterStats * msg)719 UPB_INLINE void envoy_config_endpoint_v3_ClusterStats_clear_dropped_requests(envoy_config_endpoint_v3_ClusterStats* msg) {
720 const upb_MiniTableField field = {5, UPB_SIZE(12, 48), 0, 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
721 _upb_Message_ClearNonExtensionField(msg, &field);
722 }
envoy_config_endpoint_v3_ClusterStats_dropped_requests(const envoy_config_endpoint_v3_ClusterStats * msg,size_t * size)723 UPB_INLINE const envoy_config_endpoint_v3_ClusterStats_DroppedRequests* const* envoy_config_endpoint_v3_ClusterStats_dropped_requests(const envoy_config_endpoint_v3_ClusterStats* msg, size_t* size) {
724 const upb_MiniTableField field = {5, UPB_SIZE(12, 48), 0, 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
725 const upb_Array* arr = upb_Message_GetArray(msg, &field);
726 if (arr) {
727 if (size) *size = arr->size;
728 return (const envoy_config_endpoint_v3_ClusterStats_DroppedRequests* const*)_upb_array_constptr(arr);
729 } else {
730 if (size) *size = 0;
731 return NULL;
732 }
733 }
_envoy_config_endpoint_v3_ClusterStats_dropped_requests_upb_array(const envoy_config_endpoint_v3_ClusterStats * msg,size_t * size)734 UPB_INLINE const upb_Array* _envoy_config_endpoint_v3_ClusterStats_dropped_requests_upb_array(const envoy_config_endpoint_v3_ClusterStats* msg, size_t* size) {
735 const upb_MiniTableField field = {5, UPB_SIZE(12, 48), 0, 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
736 const upb_Array* arr = upb_Message_GetArray(msg, &field);
737 if (size) {
738 *size = arr ? arr->size : 0;
739 }
740 return arr;
741 }
_envoy_config_endpoint_v3_ClusterStats_dropped_requests_mutable_upb_array(const envoy_config_endpoint_v3_ClusterStats * msg,size_t * size,upb_Arena * arena)742 UPB_INLINE upb_Array* _envoy_config_endpoint_v3_ClusterStats_dropped_requests_mutable_upb_array(const envoy_config_endpoint_v3_ClusterStats* msg, size_t* size, upb_Arena* arena) {
743 const upb_MiniTableField field = {5, UPB_SIZE(12, 48), 0, 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
744 upb_Array* arr = upb_Message_GetOrCreateMutableArray(
745 (upb_Message*)msg, &field, arena);
746 if (size) {
747 *size = arr ? arr->size : 0;
748 }
749 return arr;
750 }
envoy_config_endpoint_v3_ClusterStats_has_dropped_requests(const envoy_config_endpoint_v3_ClusterStats * msg)751 UPB_INLINE bool envoy_config_endpoint_v3_ClusterStats_has_dropped_requests(const envoy_config_endpoint_v3_ClusterStats* msg) {
752 size_t size;
753 envoy_config_endpoint_v3_ClusterStats_dropped_requests(msg, &size);
754 return size != 0;
755 }
envoy_config_endpoint_v3_ClusterStats_clear_cluster_service_name(envoy_config_endpoint_v3_ClusterStats * msg)756 UPB_INLINE void envoy_config_endpoint_v3_ClusterStats_clear_cluster_service_name(envoy_config_endpoint_v3_ClusterStats* msg) {
757 const upb_MiniTableField field = {6, UPB_SIZE(32, 56), 0, kUpb_NoSub, 9, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
758 _upb_Message_ClearNonExtensionField(msg, &field);
759 }
envoy_config_endpoint_v3_ClusterStats_cluster_service_name(const envoy_config_endpoint_v3_ClusterStats * msg)760 UPB_INLINE upb_StringView envoy_config_endpoint_v3_ClusterStats_cluster_service_name(const envoy_config_endpoint_v3_ClusterStats* msg) {
761 upb_StringView default_val = upb_StringView_FromString("");
762 upb_StringView ret;
763 const upb_MiniTableField field = {6, UPB_SIZE(32, 56), 0, kUpb_NoSub, 9, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
764 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
765 return ret;
766 }
767
envoy_config_endpoint_v3_ClusterStats_set_cluster_name(envoy_config_endpoint_v3_ClusterStats * msg,upb_StringView value)768 UPB_INLINE void envoy_config_endpoint_v3_ClusterStats_set_cluster_name(envoy_config_endpoint_v3_ClusterStats *msg, upb_StringView value) {
769 const upb_MiniTableField field = {1, UPB_SIZE(16, 8), 0, kUpb_NoSub, 9, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
770 _upb_Message_SetNonExtensionField(msg, &field, &value);
771 }
envoy_config_endpoint_v3_ClusterStats_mutable_upstream_locality_stats(envoy_config_endpoint_v3_ClusterStats * msg,size_t * size)772 UPB_INLINE envoy_config_endpoint_v3_UpstreamLocalityStats** envoy_config_endpoint_v3_ClusterStats_mutable_upstream_locality_stats(envoy_config_endpoint_v3_ClusterStats* msg, size_t* size) {
773 upb_MiniTableField field = {2, UPB_SIZE(4, 24), 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
774 upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
775 if (arr) {
776 if (size) *size = arr->size;
777 return (envoy_config_endpoint_v3_UpstreamLocalityStats**)_upb_array_ptr(arr);
778 } else {
779 if (size) *size = 0;
780 return NULL;
781 }
782 }
envoy_config_endpoint_v3_ClusterStats_resize_upstream_locality_stats(envoy_config_endpoint_v3_ClusterStats * msg,size_t size,upb_Arena * arena)783 UPB_INLINE envoy_config_endpoint_v3_UpstreamLocalityStats** envoy_config_endpoint_v3_ClusterStats_resize_upstream_locality_stats(envoy_config_endpoint_v3_ClusterStats* msg, size_t size, upb_Arena* arena) {
784 upb_MiniTableField field = {2, UPB_SIZE(4, 24), 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
785 return (envoy_config_endpoint_v3_UpstreamLocalityStats**)upb_Message_ResizeArray(msg, &field, size, arena);
786 }
envoy_config_endpoint_v3_ClusterStats_add_upstream_locality_stats(envoy_config_endpoint_v3_ClusterStats * msg,upb_Arena * arena)787 UPB_INLINE struct envoy_config_endpoint_v3_UpstreamLocalityStats* envoy_config_endpoint_v3_ClusterStats_add_upstream_locality_stats(envoy_config_endpoint_v3_ClusterStats* msg, upb_Arena* arena) {
788 upb_MiniTableField field = {2, UPB_SIZE(4, 24), 0, 0, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
789 upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
790 if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
791 return NULL;
792 }
793 struct envoy_config_endpoint_v3_UpstreamLocalityStats* sub = (struct envoy_config_endpoint_v3_UpstreamLocalityStats*)_upb_Message_New(&envoy_config_endpoint_v3_UpstreamLocalityStats_msg_init, arena);
794 if (!arr || !sub) return NULL;
795 _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
796 return sub;
797 }
envoy_config_endpoint_v3_ClusterStats_set_total_dropped_requests(envoy_config_endpoint_v3_ClusterStats * msg,uint64_t value)798 UPB_INLINE void envoy_config_endpoint_v3_ClusterStats_set_total_dropped_requests(envoy_config_endpoint_v3_ClusterStats *msg, uint64_t value) {
799 const upb_MiniTableField field = {3, UPB_SIZE(24, 32), 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
800 _upb_Message_SetNonExtensionField(msg, &field, &value);
801 }
envoy_config_endpoint_v3_ClusterStats_set_load_report_interval(envoy_config_endpoint_v3_ClusterStats * msg,struct google_protobuf_Duration * value)802 UPB_INLINE void envoy_config_endpoint_v3_ClusterStats_set_load_report_interval(envoy_config_endpoint_v3_ClusterStats *msg, struct google_protobuf_Duration* value) {
803 const upb_MiniTableField field = {4, UPB_SIZE(8, 40), 1, 1, 11, kUpb_FieldMode_Scalar | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
804 _upb_Message_SetNonExtensionField(msg, &field, &value);
805 }
envoy_config_endpoint_v3_ClusterStats_mutable_load_report_interval(envoy_config_endpoint_v3_ClusterStats * msg,upb_Arena * arena)806 UPB_INLINE struct google_protobuf_Duration* envoy_config_endpoint_v3_ClusterStats_mutable_load_report_interval(envoy_config_endpoint_v3_ClusterStats* msg, upb_Arena* arena) {
807 struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_endpoint_v3_ClusterStats_load_report_interval(msg);
808 if (sub == NULL) {
809 sub = (struct google_protobuf_Duration*)_upb_Message_New(&google_protobuf_Duration_msg_init, arena);
810 if (sub) envoy_config_endpoint_v3_ClusterStats_set_load_report_interval(msg, sub);
811 }
812 return sub;
813 }
envoy_config_endpoint_v3_ClusterStats_mutable_dropped_requests(envoy_config_endpoint_v3_ClusterStats * msg,size_t * size)814 UPB_INLINE envoy_config_endpoint_v3_ClusterStats_DroppedRequests** envoy_config_endpoint_v3_ClusterStats_mutable_dropped_requests(envoy_config_endpoint_v3_ClusterStats* msg, size_t* size) {
815 upb_MiniTableField field = {5, UPB_SIZE(12, 48), 0, 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
816 upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
817 if (arr) {
818 if (size) *size = arr->size;
819 return (envoy_config_endpoint_v3_ClusterStats_DroppedRequests**)_upb_array_ptr(arr);
820 } else {
821 if (size) *size = 0;
822 return NULL;
823 }
824 }
envoy_config_endpoint_v3_ClusterStats_resize_dropped_requests(envoy_config_endpoint_v3_ClusterStats * msg,size_t size,upb_Arena * arena)825 UPB_INLINE envoy_config_endpoint_v3_ClusterStats_DroppedRequests** envoy_config_endpoint_v3_ClusterStats_resize_dropped_requests(envoy_config_endpoint_v3_ClusterStats* msg, size_t size, upb_Arena* arena) {
826 upb_MiniTableField field = {5, UPB_SIZE(12, 48), 0, 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
827 return (envoy_config_endpoint_v3_ClusterStats_DroppedRequests**)upb_Message_ResizeArray(msg, &field, size, arena);
828 }
envoy_config_endpoint_v3_ClusterStats_add_dropped_requests(envoy_config_endpoint_v3_ClusterStats * msg,upb_Arena * arena)829 UPB_INLINE struct envoy_config_endpoint_v3_ClusterStats_DroppedRequests* envoy_config_endpoint_v3_ClusterStats_add_dropped_requests(envoy_config_endpoint_v3_ClusterStats* msg, upb_Arena* arena) {
830 upb_MiniTableField field = {5, UPB_SIZE(12, 48), 0, 2, 11, kUpb_FieldMode_Array | (UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)};
831 upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
832 if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
833 return NULL;
834 }
835 struct envoy_config_endpoint_v3_ClusterStats_DroppedRequests* sub = (struct envoy_config_endpoint_v3_ClusterStats_DroppedRequests*)_upb_Message_New(&envoy_config_endpoint_v3_ClusterStats_DroppedRequests_msg_init, arena);
836 if (!arr || !sub) return NULL;
837 _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
838 return sub;
839 }
envoy_config_endpoint_v3_ClusterStats_set_cluster_service_name(envoy_config_endpoint_v3_ClusterStats * msg,upb_StringView value)840 UPB_INLINE void envoy_config_endpoint_v3_ClusterStats_set_cluster_service_name(envoy_config_endpoint_v3_ClusterStats *msg, upb_StringView value) {
841 const upb_MiniTableField field = {6, UPB_SIZE(32, 56), 0, kUpb_NoSub, 9, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
842 _upb_Message_SetNonExtensionField(msg, &field, &value);
843 }
844
845 /* envoy.config.endpoint.v3.ClusterStats.DroppedRequests */
846
envoy_config_endpoint_v3_ClusterStats_DroppedRequests_new(upb_Arena * arena)847 UPB_INLINE envoy_config_endpoint_v3_ClusterStats_DroppedRequests* envoy_config_endpoint_v3_ClusterStats_DroppedRequests_new(upb_Arena* arena) {
848 return (envoy_config_endpoint_v3_ClusterStats_DroppedRequests*)_upb_Message_New(&envoy_config_endpoint_v3_ClusterStats_DroppedRequests_msg_init, arena);
849 }
envoy_config_endpoint_v3_ClusterStats_DroppedRequests_parse(const char * buf,size_t size,upb_Arena * arena)850 UPB_INLINE envoy_config_endpoint_v3_ClusterStats_DroppedRequests* envoy_config_endpoint_v3_ClusterStats_DroppedRequests_parse(const char* buf, size_t size, upb_Arena* arena) {
851 envoy_config_endpoint_v3_ClusterStats_DroppedRequests* ret = envoy_config_endpoint_v3_ClusterStats_DroppedRequests_new(arena);
852 if (!ret) return NULL;
853 if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_ClusterStats_DroppedRequests_msg_init, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
854 return NULL;
855 }
856 return ret;
857 }
envoy_config_endpoint_v3_ClusterStats_DroppedRequests_parse_ex(const char * buf,size_t size,const upb_ExtensionRegistry * extreg,int options,upb_Arena * arena)858 UPB_INLINE envoy_config_endpoint_v3_ClusterStats_DroppedRequests* envoy_config_endpoint_v3_ClusterStats_DroppedRequests_parse_ex(const char* buf, size_t size,
859 const upb_ExtensionRegistry* extreg,
860 int options, upb_Arena* arena) {
861 envoy_config_endpoint_v3_ClusterStats_DroppedRequests* ret = envoy_config_endpoint_v3_ClusterStats_DroppedRequests_new(arena);
862 if (!ret) return NULL;
863 if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_ClusterStats_DroppedRequests_msg_init, extreg, options, arena) !=
864 kUpb_DecodeStatus_Ok) {
865 return NULL;
866 }
867 return ret;
868 }
envoy_config_endpoint_v3_ClusterStats_DroppedRequests_serialize(const envoy_config_endpoint_v3_ClusterStats_DroppedRequests * msg,upb_Arena * arena,size_t * len)869 UPB_INLINE char* envoy_config_endpoint_v3_ClusterStats_DroppedRequests_serialize(const envoy_config_endpoint_v3_ClusterStats_DroppedRequests* msg, upb_Arena* arena, size_t* len) {
870 char* ptr;
871 (void)upb_Encode(msg, &envoy_config_endpoint_v3_ClusterStats_DroppedRequests_msg_init, 0, arena, &ptr, len);
872 return ptr;
873 }
envoy_config_endpoint_v3_ClusterStats_DroppedRequests_serialize_ex(const envoy_config_endpoint_v3_ClusterStats_DroppedRequests * msg,int options,upb_Arena * arena,size_t * len)874 UPB_INLINE char* envoy_config_endpoint_v3_ClusterStats_DroppedRequests_serialize_ex(const envoy_config_endpoint_v3_ClusterStats_DroppedRequests* msg, int options,
875 upb_Arena* arena, size_t* len) {
876 char* ptr;
877 (void)upb_Encode(msg, &envoy_config_endpoint_v3_ClusterStats_DroppedRequests_msg_init, options, arena, &ptr, len);
878 return ptr;
879 }
envoy_config_endpoint_v3_ClusterStats_DroppedRequests_clear_category(envoy_config_endpoint_v3_ClusterStats_DroppedRequests * msg)880 UPB_INLINE void envoy_config_endpoint_v3_ClusterStats_DroppedRequests_clear_category(envoy_config_endpoint_v3_ClusterStats_DroppedRequests* msg) {
881 const upb_MiniTableField field = {1, 0, 0, kUpb_NoSub, 9, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
882 _upb_Message_ClearNonExtensionField(msg, &field);
883 }
envoy_config_endpoint_v3_ClusterStats_DroppedRequests_category(const envoy_config_endpoint_v3_ClusterStats_DroppedRequests * msg)884 UPB_INLINE upb_StringView envoy_config_endpoint_v3_ClusterStats_DroppedRequests_category(const envoy_config_endpoint_v3_ClusterStats_DroppedRequests* msg) {
885 upb_StringView default_val = upb_StringView_FromString("");
886 upb_StringView ret;
887 const upb_MiniTableField field = {1, 0, 0, kUpb_NoSub, 9, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
888 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
889 return ret;
890 }
envoy_config_endpoint_v3_ClusterStats_DroppedRequests_clear_dropped_count(envoy_config_endpoint_v3_ClusterStats_DroppedRequests * msg)891 UPB_INLINE void envoy_config_endpoint_v3_ClusterStats_DroppedRequests_clear_dropped_count(envoy_config_endpoint_v3_ClusterStats_DroppedRequests* msg) {
892 const upb_MiniTableField field = {2, UPB_SIZE(8, 16), 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
893 _upb_Message_ClearNonExtensionField(msg, &field);
894 }
envoy_config_endpoint_v3_ClusterStats_DroppedRequests_dropped_count(const envoy_config_endpoint_v3_ClusterStats_DroppedRequests * msg)895 UPB_INLINE uint64_t envoy_config_endpoint_v3_ClusterStats_DroppedRequests_dropped_count(const envoy_config_endpoint_v3_ClusterStats_DroppedRequests* msg) {
896 uint64_t default_val = (uint64_t)0ull;
897 uint64_t ret;
898 const upb_MiniTableField field = {2, UPB_SIZE(8, 16), 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
899 _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
900 return ret;
901 }
902
envoy_config_endpoint_v3_ClusterStats_DroppedRequests_set_category(envoy_config_endpoint_v3_ClusterStats_DroppedRequests * msg,upb_StringView value)903 UPB_INLINE void envoy_config_endpoint_v3_ClusterStats_DroppedRequests_set_category(envoy_config_endpoint_v3_ClusterStats_DroppedRequests *msg, upb_StringView value) {
904 const upb_MiniTableField field = {1, 0, 0, kUpb_NoSub, 9, kUpb_FieldMode_Scalar | (kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
905 _upb_Message_SetNonExtensionField(msg, &field, &value);
906 }
envoy_config_endpoint_v3_ClusterStats_DroppedRequests_set_dropped_count(envoy_config_endpoint_v3_ClusterStats_DroppedRequests * msg,uint64_t value)907 UPB_INLINE void envoy_config_endpoint_v3_ClusterStats_DroppedRequests_set_dropped_count(envoy_config_endpoint_v3_ClusterStats_DroppedRequests *msg, uint64_t value) {
908 const upb_MiniTableField field = {2, UPB_SIZE(8, 16), 0, kUpb_NoSub, 4, kUpb_FieldMode_Scalar | (kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
909 _upb_Message_SetNonExtensionField(msg, &field, &value);
910 }
911
912 extern const upb_MiniTableFile envoy_config_endpoint_v3_load_report_proto_upb_file_layout;
913
914 #ifdef __cplusplus
915 } /* extern "C" */
916 #endif
917
918 #include "upb/port/undef.inc"
919
920 #endif /* ENVOY_CONFIG_ENDPOINT_V3_LOAD_REPORT_PROTO_UPB_H_ */
921