1 /* This file was generated by upbc (the upb compiler) from the input
2 * file:
3 *
4 * envoy/config/cluster/v3/circuit_breaker.proto
5 *
6 * Do not edit -- your changes will be discarded when the file is
7 * regenerated. */
8
9 #ifndef ENVOY_CONFIG_CLUSTER_V3_CIRCUIT_BREAKER_PROTO_UPB_H_
10 #define ENVOY_CONFIG_CLUSTER_V3_CIRCUIT_BREAKER_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_cluster_v3_CircuitBreakers;
24 struct envoy_config_cluster_v3_CircuitBreakers_Thresholds;
25 struct envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget;
26 typedef struct envoy_config_cluster_v3_CircuitBreakers envoy_config_cluster_v3_CircuitBreakers;
27 typedef struct envoy_config_cluster_v3_CircuitBreakers_Thresholds envoy_config_cluster_v3_CircuitBreakers_Thresholds;
28 typedef struct envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget;
29 extern const upb_msglayout envoy_config_cluster_v3_CircuitBreakers_msginit;
30 extern const upb_msglayout envoy_config_cluster_v3_CircuitBreakers_Thresholds_msginit;
31 extern const upb_msglayout envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_msginit;
32 struct envoy_type_v3_Percent;
33 struct google_protobuf_UInt32Value;
34 extern const upb_msglayout envoy_type_v3_Percent_msginit;
35 extern const upb_msglayout google_protobuf_UInt32Value_msginit;
36
37
38 /* envoy.config.cluster.v3.CircuitBreakers */
39
envoy_config_cluster_v3_CircuitBreakers_new(upb_arena * arena)40 UPB_INLINE envoy_config_cluster_v3_CircuitBreakers *envoy_config_cluster_v3_CircuitBreakers_new(upb_arena *arena) {
41 return (envoy_config_cluster_v3_CircuitBreakers *)_upb_msg_new(&envoy_config_cluster_v3_CircuitBreakers_msginit, arena);
42 }
envoy_config_cluster_v3_CircuitBreakers_parse(const char * buf,size_t size,upb_arena * arena)43 UPB_INLINE envoy_config_cluster_v3_CircuitBreakers *envoy_config_cluster_v3_CircuitBreakers_parse(const char *buf, size_t size,
44 upb_arena *arena) {
45 envoy_config_cluster_v3_CircuitBreakers *ret = envoy_config_cluster_v3_CircuitBreakers_new(arena);
46 if (!ret) return NULL;
47 if (!upb_decode(buf, size, ret, &envoy_config_cluster_v3_CircuitBreakers_msginit, arena)) return NULL;
48 return ret;
49 }
envoy_config_cluster_v3_CircuitBreakers_parse_ex(const char * buf,size_t size,const upb_extreg * extreg,int options,upb_arena * arena)50 UPB_INLINE envoy_config_cluster_v3_CircuitBreakers *envoy_config_cluster_v3_CircuitBreakers_parse_ex(const char *buf, size_t size,
51 const upb_extreg *extreg, int options,
52 upb_arena *arena) {
53 envoy_config_cluster_v3_CircuitBreakers *ret = envoy_config_cluster_v3_CircuitBreakers_new(arena);
54 if (!ret) return NULL;
55 if (!_upb_decode(buf, size, ret, &envoy_config_cluster_v3_CircuitBreakers_msginit, extreg, options, arena)) {
56 return NULL;
57 }
58 return ret;
59 }
envoy_config_cluster_v3_CircuitBreakers_serialize(const envoy_config_cluster_v3_CircuitBreakers * msg,upb_arena * arena,size_t * len)60 UPB_INLINE char *envoy_config_cluster_v3_CircuitBreakers_serialize(const envoy_config_cluster_v3_CircuitBreakers *msg, upb_arena *arena, size_t *len) {
61 return upb_encode(msg, &envoy_config_cluster_v3_CircuitBreakers_msginit, arena, len);
62 }
63
envoy_config_cluster_v3_CircuitBreakers_has_thresholds(const envoy_config_cluster_v3_CircuitBreakers * msg)64 UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_has_thresholds(const envoy_config_cluster_v3_CircuitBreakers *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
envoy_config_cluster_v3_CircuitBreakers_thresholds(const envoy_config_cluster_v3_CircuitBreakers * msg,size_t * len)65 UPB_INLINE const envoy_config_cluster_v3_CircuitBreakers_Thresholds* const* envoy_config_cluster_v3_CircuitBreakers_thresholds(const envoy_config_cluster_v3_CircuitBreakers *msg, size_t *len) { return (const envoy_config_cluster_v3_CircuitBreakers_Thresholds* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
66
envoy_config_cluster_v3_CircuitBreakers_mutable_thresholds(envoy_config_cluster_v3_CircuitBreakers * msg,size_t * len)67 UPB_INLINE envoy_config_cluster_v3_CircuitBreakers_Thresholds** envoy_config_cluster_v3_CircuitBreakers_mutable_thresholds(envoy_config_cluster_v3_CircuitBreakers *msg, size_t *len) {
68 return (envoy_config_cluster_v3_CircuitBreakers_Thresholds**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
69 }
envoy_config_cluster_v3_CircuitBreakers_resize_thresholds(envoy_config_cluster_v3_CircuitBreakers * msg,size_t len,upb_arena * arena)70 UPB_INLINE envoy_config_cluster_v3_CircuitBreakers_Thresholds** envoy_config_cluster_v3_CircuitBreakers_resize_thresholds(envoy_config_cluster_v3_CircuitBreakers *msg, size_t len, upb_arena *arena) {
71 return (envoy_config_cluster_v3_CircuitBreakers_Thresholds**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
72 }
envoy_config_cluster_v3_CircuitBreakers_add_thresholds(envoy_config_cluster_v3_CircuitBreakers * msg,upb_arena * arena)73 UPB_INLINE struct envoy_config_cluster_v3_CircuitBreakers_Thresholds* envoy_config_cluster_v3_CircuitBreakers_add_thresholds(envoy_config_cluster_v3_CircuitBreakers *msg, upb_arena *arena) {
74 struct envoy_config_cluster_v3_CircuitBreakers_Thresholds* sub = (struct envoy_config_cluster_v3_CircuitBreakers_Thresholds*)_upb_msg_new(&envoy_config_cluster_v3_CircuitBreakers_Thresholds_msginit, arena);
75 bool ok = _upb_array_append_accessor2(
76 msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
77 if (!ok) return NULL;
78 return sub;
79 }
80
81 /* envoy.config.cluster.v3.CircuitBreakers.Thresholds */
82
envoy_config_cluster_v3_CircuitBreakers_Thresholds_new(upb_arena * arena)83 UPB_INLINE envoy_config_cluster_v3_CircuitBreakers_Thresholds *envoy_config_cluster_v3_CircuitBreakers_Thresholds_new(upb_arena *arena) {
84 return (envoy_config_cluster_v3_CircuitBreakers_Thresholds *)_upb_msg_new(&envoy_config_cluster_v3_CircuitBreakers_Thresholds_msginit, arena);
85 }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_parse(const char * buf,size_t size,upb_arena * arena)86 UPB_INLINE envoy_config_cluster_v3_CircuitBreakers_Thresholds *envoy_config_cluster_v3_CircuitBreakers_Thresholds_parse(const char *buf, size_t size,
87 upb_arena *arena) {
88 envoy_config_cluster_v3_CircuitBreakers_Thresholds *ret = envoy_config_cluster_v3_CircuitBreakers_Thresholds_new(arena);
89 if (!ret) return NULL;
90 if (!upb_decode(buf, size, ret, &envoy_config_cluster_v3_CircuitBreakers_Thresholds_msginit, arena)) return NULL;
91 return ret;
92 }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_parse_ex(const char * buf,size_t size,const upb_extreg * extreg,int options,upb_arena * arena)93 UPB_INLINE envoy_config_cluster_v3_CircuitBreakers_Thresholds *envoy_config_cluster_v3_CircuitBreakers_Thresholds_parse_ex(const char *buf, size_t size,
94 const upb_extreg *extreg, int options,
95 upb_arena *arena) {
96 envoy_config_cluster_v3_CircuitBreakers_Thresholds *ret = envoy_config_cluster_v3_CircuitBreakers_Thresholds_new(arena);
97 if (!ret) return NULL;
98 if (!_upb_decode(buf, size, ret, &envoy_config_cluster_v3_CircuitBreakers_Thresholds_msginit, extreg, options, arena)) {
99 return NULL;
100 }
101 return ret;
102 }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_serialize(const envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg,upb_arena * arena,size_t * len)103 UPB_INLINE char *envoy_config_cluster_v3_CircuitBreakers_Thresholds_serialize(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, upb_arena *arena, size_t *len) {
104 return upb_encode(msg, &envoy_config_cluster_v3_CircuitBreakers_Thresholds_msginit, arena, len);
105 }
106
envoy_config_cluster_v3_CircuitBreakers_Thresholds_priority(const envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg)107 UPB_INLINE int32_t envoy_config_cluster_v3_CircuitBreakers_Thresholds_priority(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_has_max_connections(const envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg)108 UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_has_max_connections(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return _upb_hasbit(msg, 1); }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_max_connections(const envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg)109 UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBreakers_Thresholds_max_connections(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const struct google_protobuf_UInt32Value*); }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_has_max_pending_requests(const envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg)110 UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_has_max_pending_requests(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return _upb_hasbit(msg, 2); }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_max_pending_requests(const envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg)111 UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBreakers_Thresholds_max_pending_requests(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const struct google_protobuf_UInt32Value*); }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_has_max_requests(const envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg)112 UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_has_max_requests(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return _upb_hasbit(msg, 3); }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_max_requests(const envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg)113 UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBreakers_Thresholds_max_requests(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const struct google_protobuf_UInt32Value*); }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_has_max_retries(const envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg)114 UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_has_max_retries(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return _upb_hasbit(msg, 4); }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_max_retries(const envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg)115 UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBreakers_Thresholds_max_retries(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const struct google_protobuf_UInt32Value*); }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_track_remaining(const envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg)116 UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_track_remaining(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_has_max_connection_pools(const envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg)117 UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_has_max_connection_pools(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return _upb_hasbit(msg, 5); }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_max_connection_pools(const envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg)118 UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBreakers_Thresholds_max_connection_pools(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const struct google_protobuf_UInt32Value*); }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_has_retry_budget(const envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg)119 UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_has_retry_budget(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return _upb_hasbit(msg, 6); }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_retry_budget(const envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg)120 UPB_INLINE const envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget* envoy_config_cluster_v3_CircuitBreakers_Thresholds_retry_budget(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 56), const envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget*); }
121
envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_priority(envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg,int32_t value)122 UPB_INLINE void envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_priority(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, int32_t value) {
123 *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
124 }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_max_connections(envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg,struct google_protobuf_UInt32Value * value)125 UPB_INLINE void envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_max_connections(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, struct google_protobuf_UInt32Value* value) {
126 _upb_sethas(msg, 1);
127 *UPB_PTR_AT(msg, UPB_SIZE(12, 16), struct google_protobuf_UInt32Value*) = value;
128 }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_mutable_max_connections(envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg,upb_arena * arena)129 UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBreakers_Thresholds_mutable_max_connections(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, upb_arena *arena) {
130 struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_cluster_v3_CircuitBreakers_Thresholds_max_connections(msg);
131 if (sub == NULL) {
132 sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
133 if (!sub) return NULL;
134 envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_max_connections(msg, sub);
135 }
136 return sub;
137 }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_max_pending_requests(envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg,struct google_protobuf_UInt32Value * value)138 UPB_INLINE void envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_max_pending_requests(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, struct google_protobuf_UInt32Value* value) {
139 _upb_sethas(msg, 2);
140 *UPB_PTR_AT(msg, UPB_SIZE(16, 24), struct google_protobuf_UInt32Value*) = value;
141 }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_mutable_max_pending_requests(envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg,upb_arena * arena)142 UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBreakers_Thresholds_mutable_max_pending_requests(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, upb_arena *arena) {
143 struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_cluster_v3_CircuitBreakers_Thresholds_max_pending_requests(msg);
144 if (sub == NULL) {
145 sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
146 if (!sub) return NULL;
147 envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_max_pending_requests(msg, sub);
148 }
149 return sub;
150 }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_max_requests(envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg,struct google_protobuf_UInt32Value * value)151 UPB_INLINE void envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_max_requests(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, struct google_protobuf_UInt32Value* value) {
152 _upb_sethas(msg, 3);
153 *UPB_PTR_AT(msg, UPB_SIZE(20, 32), struct google_protobuf_UInt32Value*) = value;
154 }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_mutable_max_requests(envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg,upb_arena * arena)155 UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBreakers_Thresholds_mutable_max_requests(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, upb_arena *arena) {
156 struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_cluster_v3_CircuitBreakers_Thresholds_max_requests(msg);
157 if (sub == NULL) {
158 sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
159 if (!sub) return NULL;
160 envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_max_requests(msg, sub);
161 }
162 return sub;
163 }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_max_retries(envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg,struct google_protobuf_UInt32Value * value)164 UPB_INLINE void envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_max_retries(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, struct google_protobuf_UInt32Value* value) {
165 _upb_sethas(msg, 4);
166 *UPB_PTR_AT(msg, UPB_SIZE(24, 40), struct google_protobuf_UInt32Value*) = value;
167 }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_mutable_max_retries(envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg,upb_arena * arena)168 UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBreakers_Thresholds_mutable_max_retries(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, upb_arena *arena) {
169 struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_cluster_v3_CircuitBreakers_Thresholds_max_retries(msg);
170 if (sub == NULL) {
171 sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
172 if (!sub) return NULL;
173 envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_max_retries(msg, sub);
174 }
175 return sub;
176 }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_track_remaining(envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg,bool value)177 UPB_INLINE void envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_track_remaining(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, bool value) {
178 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value;
179 }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_max_connection_pools(envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg,struct google_protobuf_UInt32Value * value)180 UPB_INLINE void envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_max_connection_pools(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, struct google_protobuf_UInt32Value* value) {
181 _upb_sethas(msg, 5);
182 *UPB_PTR_AT(msg, UPB_SIZE(28, 48), struct google_protobuf_UInt32Value*) = value;
183 }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_mutable_max_connection_pools(envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg,upb_arena * arena)184 UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBreakers_Thresholds_mutable_max_connection_pools(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, upb_arena *arena) {
185 struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_cluster_v3_CircuitBreakers_Thresholds_max_connection_pools(msg);
186 if (sub == NULL) {
187 sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
188 if (!sub) return NULL;
189 envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_max_connection_pools(msg, sub);
190 }
191 return sub;
192 }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_retry_budget(envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg,envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget * value)193 UPB_INLINE void envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_retry_budget(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget* value) {
194 _upb_sethas(msg, 6);
195 *UPB_PTR_AT(msg, UPB_SIZE(32, 56), envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget*) = value;
196 }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_mutable_retry_budget(envoy_config_cluster_v3_CircuitBreakers_Thresholds * msg,upb_arena * arena)197 UPB_INLINE struct envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget* envoy_config_cluster_v3_CircuitBreakers_Thresholds_mutable_retry_budget(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, upb_arena *arena) {
198 struct envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget* sub = (struct envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget*)envoy_config_cluster_v3_CircuitBreakers_Thresholds_retry_budget(msg);
199 if (sub == NULL) {
200 sub = (struct envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget*)_upb_msg_new(&envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_msginit, arena);
201 if (!sub) return NULL;
202 envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_retry_budget(msg, sub);
203 }
204 return sub;
205 }
206
207 /* envoy.config.cluster.v3.CircuitBreakers.Thresholds.RetryBudget */
208
envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_new(upb_arena * arena)209 UPB_INLINE envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_new(upb_arena *arena) {
210 return (envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *)_upb_msg_new(&envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_msginit, arena);
211 }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_parse(const char * buf,size_t size,upb_arena * arena)212 UPB_INLINE envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_parse(const char *buf, size_t size,
213 upb_arena *arena) {
214 envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *ret = envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_new(arena);
215 if (!ret) return NULL;
216 if (!upb_decode(buf, size, ret, &envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_msginit, arena)) return NULL;
217 return ret;
218 }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_parse_ex(const char * buf,size_t size,const upb_extreg * extreg,int options,upb_arena * arena)219 UPB_INLINE envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_parse_ex(const char *buf, size_t size,
220 const upb_extreg *extreg, int options,
221 upb_arena *arena) {
222 envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *ret = envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_new(arena);
223 if (!ret) return NULL;
224 if (!_upb_decode(buf, size, ret, &envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_msginit, extreg, options, arena)) {
225 return NULL;
226 }
227 return ret;
228 }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_serialize(const envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget * msg,upb_arena * arena,size_t * len)229 UPB_INLINE char *envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_serialize(const envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *msg, upb_arena *arena, size_t *len) {
230 return upb_encode(msg, &envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_msginit, arena, len);
231 }
232
envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_has_budget_percent(const envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget * msg)233 UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_has_budget_percent(const envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *msg) { return _upb_hasbit(msg, 1); }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_budget_percent(const envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget * msg)234 UPB_INLINE const struct envoy_type_v3_Percent* envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_budget_percent(const envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_type_v3_Percent*); }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_has_min_retry_concurrency(const envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget * msg)235 UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_has_min_retry_concurrency(const envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *msg) { return _upb_hasbit(msg, 2); }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_min_retry_concurrency(const envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget * msg)236 UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_min_retry_concurrency(const envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt32Value*); }
237
envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_set_budget_percent(envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget * msg,struct envoy_type_v3_Percent * value)238 UPB_INLINE void envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_set_budget_percent(envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *msg, struct envoy_type_v3_Percent* value) {
239 _upb_sethas(msg, 1);
240 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_type_v3_Percent*) = value;
241 }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_mutable_budget_percent(envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget * msg,upb_arena * arena)242 UPB_INLINE struct envoy_type_v3_Percent* envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_mutable_budget_percent(envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *msg, upb_arena *arena) {
243 struct envoy_type_v3_Percent* sub = (struct envoy_type_v3_Percent*)envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_budget_percent(msg);
244 if (sub == NULL) {
245 sub = (struct envoy_type_v3_Percent*)_upb_msg_new(&envoy_type_v3_Percent_msginit, arena);
246 if (!sub) return NULL;
247 envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_set_budget_percent(msg, sub);
248 }
249 return sub;
250 }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_set_min_retry_concurrency(envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget * msg,struct google_protobuf_UInt32Value * value)251 UPB_INLINE void envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_set_min_retry_concurrency(envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *msg, struct google_protobuf_UInt32Value* value) {
252 _upb_sethas(msg, 2);
253 *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt32Value*) = value;
254 }
envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_mutable_min_retry_concurrency(envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget * msg,upb_arena * arena)255 UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_mutable_min_retry_concurrency(envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *msg, upb_arena *arena) {
256 struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_min_retry_concurrency(msg);
257 if (sub == NULL) {
258 sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
259 if (!sub) return NULL;
260 envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_set_min_retry_concurrency(msg, sub);
261 }
262 return sub;
263 }
264
265 #ifdef __cplusplus
266 } /* extern "C" */
267 #endif
268
269 #include "upb/port_undef.inc"
270
271 #endif /* ENVOY_CONFIG_CLUSTER_V3_CIRCUIT_BREAKER_PROTO_UPB_H_ */
272