GRPC Core  9.0.0
circuit_breaker.upb.h
Go to the documentation of this file.
1 /* This file was generated by upbc (the upb compiler) from the input
2  * file:
3  *
4  * envoy/api/v2/cluster/circuit_breaker.proto
5  *
6  * Do not edit -- your changes will be discarded when the file is
7  * regenerated. */
8 
9 #ifndef ENVOY_API_V2_CLUSTER_CIRCUIT_BREAKER_PROTO_UPB_H_
10 #define ENVOY_API_V2_CLUSTER_CIRCUIT_BREAKER_PROTO_UPB_H_
11 
12 #include "upb/generated_util.h"
13 #include "upb/msg.h"
14 #include "upb/decode.h"
15 #include "upb/encode.h"
16 
17 #include "upb/port_def.inc"
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
27 extern const upb_msglayout envoy_api_v2_cluster_CircuitBreakers_msginit;
30 extern const upb_msglayout google_protobuf_UInt32Value_msginit;
31 
32 
33 /* envoy.api.v2.cluster.CircuitBreakers */
34 
37 }
39  upb_arena *arena) {
41  return (ret && upb_decode(buf, size, ret, &envoy_api_v2_cluster_CircuitBreakers_msginit, arena)) ? ret : NULL;
42 }
43 UPB_INLINE char *envoy_api_v2_cluster_CircuitBreakers_serialize(const envoy_api_v2_cluster_CircuitBreakers *msg, upb_arena *arena, size_t *len) {
44  return upb_encode(msg, &envoy_api_v2_cluster_CircuitBreakers_msginit, arena, len);
45 }
46 
47 UPB_INLINE const envoy_api_v2_cluster_CircuitBreakers_Thresholds* const* envoy_api_v2_cluster_CircuitBreakers_thresholds(const envoy_api_v2_cluster_CircuitBreakers *msg, size_t *len) { return (const envoy_api_v2_cluster_CircuitBreakers_Thresholds* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
48 
50  return (envoy_api_v2_cluster_CircuitBreakers_Thresholds**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
51 }
53  return (envoy_api_v2_cluster_CircuitBreakers_Thresholds**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
54 }
57  bool ok = _upb_array_append_accessor(
58  msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
59  if (!ok) return NULL;
60  return sub;
61 }
62 
63 /* envoy.api.v2.cluster.CircuitBreakers.Thresholds */
64 
67 }
69  upb_arena *arena) {
71  return (ret && upb_decode(buf, size, ret, &envoy_api_v2_cluster_CircuitBreakers_Thresholds_msginit, arena)) ? ret : NULL;
72 }
74  return upb_encode(msg, &envoy_api_v2_cluster_CircuitBreakers_Thresholds_msginit, arena, len);
75 }
76 
77 UPB_INLINE int32_t envoy_api_v2_cluster_CircuitBreakers_Thresholds_priority(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); }
82 UPB_INLINE bool envoy_api_v2_cluster_CircuitBreakers_Thresholds_track_remaining(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)); }
84 
86  UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value;
87 }
89  UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(12, 16)) = value;
90 }
93  if (sub == NULL) {
94  sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
95  if (!sub) return NULL;
97  }
98  return sub;
99 }
101  UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(16, 24)) = value;
102 }
105  if (sub == NULL) {
106  sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
107  if (!sub) return NULL;
109  }
110  return sub;
111 }
113  UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(20, 32)) = value;
114 }
117  if (sub == NULL) {
118  sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
119  if (!sub) return NULL;
121  }
122  return sub;
123 }
125  UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(24, 40)) = value;
126 }
129  if (sub == NULL) {
130  sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
131  if (!sub) return NULL;
133  }
134  return sub;
135 }
137  UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)) = value;
138 }
140  UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(28, 48)) = value;
141 }
144  if (sub == NULL) {
145  sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
146  if (!sub) return NULL;
148  }
149  return sub;
150 }
151 
152 #ifdef __cplusplus
153 } /* extern "C" */
154 #endif
155 
156 #include "upb/port_undef.inc"
157 
158 #endif /* ENVOY_API_V2_CLUSTER_CIRCUIT_BREAKER_PROTO_UPB_H_ */
UPB_INLINE bool envoy_api_v2_cluster_CircuitBreakers_Thresholds_track_remaining(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg)
Definition: circuit_breaker.upb.h:82
UPB_INLINE void envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_max_connection_pools(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, struct google_protobuf_UInt32Value *value)
Definition: circuit_breaker.upb.h:139
struct google_protobuf_UInt32Value google_protobuf_UInt32Value
Definition: wrappers.upb.h:37
const upb_msglayout envoy_api_v2_cluster_CircuitBreakers_msginit
Definition: circuit_breaker.upb.c:25
UPB_INLINE void envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_max_pending_requests(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, struct google_protobuf_UInt32Value *value)
Definition: circuit_breaker.upb.h:100
UPB_INLINE char * envoy_api_v2_cluster_CircuitBreakers_serialize(const envoy_api_v2_cluster_CircuitBreakers *msg, upb_arena *arena, size_t *len)
Definition: circuit_breaker.upb.h:43
UPB_INLINE envoy_api_v2_cluster_CircuitBreakers * envoy_api_v2_cluster_CircuitBreakers_new(upb_arena *arena)
Definition: circuit_breaker.upb.h:35
UPB_INLINE envoy_api_v2_cluster_CircuitBreakers_Thresholds * envoy_api_v2_cluster_CircuitBreakers_Thresholds_parse(const char *buf, size_t size, upb_arena *arena)
Definition: circuit_breaker.upb.h:68
UPB_INLINE struct google_protobuf_UInt32Value * envoy_api_v2_cluster_CircuitBreakers_Thresholds_mutable_max_requests(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, upb_arena *arena)
Definition: circuit_breaker.upb.h:115
UPB_INLINE char * envoy_api_v2_cluster_CircuitBreakers_Thresholds_serialize(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, upb_arena *arena, size_t *len)
Definition: circuit_breaker.upb.h:73
UPB_INLINE const struct google_protobuf_UInt32Value * envoy_api_v2_cluster_CircuitBreakers_Thresholds_max_retries(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg)
Definition: circuit_breaker.upb.h:81
UPB_INLINE struct google_protobuf_UInt32Value * envoy_api_v2_cluster_CircuitBreakers_Thresholds_mutable_max_connection_pools(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, upb_arena *arena)
Definition: circuit_breaker.upb.h:142
UPB_INLINE envoy_api_v2_cluster_CircuitBreakers_Thresholds ** envoy_api_v2_cluster_CircuitBreakers_resize_thresholds(envoy_api_v2_cluster_CircuitBreakers *msg, size_t len, upb_arena *arena)
Definition: circuit_breaker.upb.h:52
UPB_INLINE envoy_api_v2_cluster_CircuitBreakers_Thresholds ** envoy_api_v2_cluster_CircuitBreakers_mutable_thresholds(envoy_api_v2_cluster_CircuitBreakers *msg, size_t *len)
Definition: circuit_breaker.upb.h:49
UPB_INLINE void envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_track_remaining(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, bool value)
Definition: circuit_breaker.upb.h:136
const upb_msglayout google_protobuf_UInt32Value_msginit
Definition: wrappers.upb.c:69
struct envoy_api_v2_cluster_CircuitBreakers_Thresholds envoy_api_v2_cluster_CircuitBreakers_Thresholds
Definition: circuit_breaker.upb.h:26
UPB_INLINE void envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_priority(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, int32_t value)
Definition: circuit_breaker.upb.h:85
UPB_INLINE const struct google_protobuf_UInt32Value * envoy_api_v2_cluster_CircuitBreakers_Thresholds_max_connection_pools(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg)
Definition: circuit_breaker.upb.h:83
UPB_INLINE struct google_protobuf_UInt32Value * envoy_api_v2_cluster_CircuitBreakers_Thresholds_mutable_max_pending_requests(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, upb_arena *arena)
Definition: circuit_breaker.upb.h:103
UPB_INLINE void envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_max_connections(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, struct google_protobuf_UInt32Value *value)
Definition: circuit_breaker.upb.h:88
UPB_INLINE envoy_api_v2_cluster_CircuitBreakers_Thresholds * envoy_api_v2_cluster_CircuitBreakers_Thresholds_new(upb_arena *arena)
Definition: circuit_breaker.upb.h:65
UPB_INLINE const struct google_protobuf_UInt32Value * envoy_api_v2_cluster_CircuitBreakers_Thresholds_max_requests(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg)
Definition: circuit_breaker.upb.h:80
UPB_INLINE void envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_max_requests(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, struct google_protobuf_UInt32Value *value)
Definition: circuit_breaker.upb.h:112
UPB_INLINE envoy_api_v2_cluster_CircuitBreakers * envoy_api_v2_cluster_CircuitBreakers_parse(const char *buf, size_t size, upb_arena *arena)
Definition: circuit_breaker.upb.h:38
UPB_INLINE struct google_protobuf_UInt32Value * envoy_api_v2_cluster_CircuitBreakers_Thresholds_mutable_max_retries(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, upb_arena *arena)
Definition: circuit_breaker.upb.h:127
UPB_INLINE int32_t envoy_api_v2_cluster_CircuitBreakers_Thresholds_priority(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg)
Definition: circuit_breaker.upb.h:77
UPB_INLINE const envoy_api_v2_cluster_CircuitBreakers_Thresholds *const * envoy_api_v2_cluster_CircuitBreakers_thresholds(const envoy_api_v2_cluster_CircuitBreakers *msg, size_t *len)
Definition: circuit_breaker.upb.h:47
UPB_INLINE struct google_protobuf_UInt32Value * envoy_api_v2_cluster_CircuitBreakers_Thresholds_mutable_max_connections(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, upb_arena *arena)
Definition: circuit_breaker.upb.h:91
UPB_INLINE struct envoy_api_v2_cluster_CircuitBreakers_Thresholds * envoy_api_v2_cluster_CircuitBreakers_add_thresholds(envoy_api_v2_cluster_CircuitBreakers *msg, upb_arena *arena)
Definition: circuit_breaker.upb.h:55
UPB_INLINE const struct google_protobuf_UInt32Value * envoy_api_v2_cluster_CircuitBreakers_Thresholds_max_pending_requests(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg)
Definition: circuit_breaker.upb.h:79
struct envoy_api_v2_cluster_CircuitBreakers envoy_api_v2_cluster_CircuitBreakers
Definition: circuit_breaker.upb.h:25
UPB_INLINE void envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_max_retries(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, struct google_protobuf_UInt32Value *value)
Definition: circuit_breaker.upb.h:124
const upb_msglayout envoy_api_v2_cluster_CircuitBreakers_Thresholds_msginit
Definition: circuit_breaker.upb.c:45
UPB_INLINE const struct google_protobuf_UInt32Value * envoy_api_v2_cluster_CircuitBreakers_Thresholds_max_connections(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg)
Definition: circuit_breaker.upb.h:78