| 1 |
/* This file was generated by upbc (the upb compiler) from the input |
| 2 |
* file: |
| 3 |
* |
| 4 |
* envoy/config/endpoint/v3/endpoint.proto |
| 5 |
* |
| 6 |
* Do not edit -- your changes will be discarded when the file is |
| 7 |
* regenerated. */ |
| 8 |
|
| 9 |
#ifndef ENVOY_CONFIG_ENDPOINT_V3_ENDPOINT_PROTO_UPB_H_ |
| 10 |
#define ENVOY_CONFIG_ENDPOINT_V3_ENDPOINT_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_endpoint_v3_ClusterLoadAssignment; |
| 24 |
struct envoy_config_endpoint_v3_ClusterLoadAssignment_Policy; |
| 25 |
struct envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload; |
| 26 |
struct envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry; |
| 27 |
typedef struct envoy_config_endpoint_v3_ClusterLoadAssignment envoy_config_endpoint_v3_ClusterLoadAssignment; |
| 28 |
typedef struct envoy_config_endpoint_v3_ClusterLoadAssignment_Policy envoy_config_endpoint_v3_ClusterLoadAssignment_Policy; |
| 29 |
typedef struct envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload; |
| 30 |
typedef struct envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry; |
| 31 |
extern const upb_MiniTable envoy_config_endpoint_v3_ClusterLoadAssignment_msginit; |
| 32 |
extern const upb_MiniTable envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_msginit; |
| 33 |
extern const upb_MiniTable envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_msginit; |
| 34 |
extern const upb_MiniTable envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry_msginit; |
| 35 |
struct envoy_config_endpoint_v3_Endpoint; |
| 36 |
struct envoy_config_endpoint_v3_LocalityLbEndpoints; |
| 37 |
struct envoy_type_v3_FractionalPercent; |
| 38 |
struct google_protobuf_Duration; |
| 39 |
struct google_protobuf_UInt32Value; |
| 40 |
extern const upb_MiniTable envoy_config_endpoint_v3_Endpoint_msginit; |
| 41 |
extern const upb_MiniTable envoy_config_endpoint_v3_LocalityLbEndpoints_msginit; |
| 42 |
extern const upb_MiniTable envoy_type_v3_FractionalPercent_msginit; |
| 43 |
extern const upb_MiniTable google_protobuf_Duration_msginit; |
| 44 |
extern const upb_MiniTable google_protobuf_UInt32Value_msginit; |
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
/* envoy.config.endpoint.v3.ClusterLoadAssignment */ |
| 49 |
|
| 50 |
UPB_INLINE envoy_config_endpoint_v3_ClusterLoadAssignment* envoy_config_endpoint_v3_ClusterLoadAssignment_new(upb_Arena* arena) { |
| 51 |
return (envoy_config_endpoint_v3_ClusterLoadAssignment*)_upb_Message_New(&envoy_config_endpoint_v3_ClusterLoadAssignment_msginit, arena); |
| 52 |
} |
| 53 |
UPB_INLINE envoy_config_endpoint_v3_ClusterLoadAssignment* envoy_config_endpoint_v3_ClusterLoadAssignment_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 54 |
envoy_config_endpoint_v3_ClusterLoadAssignment* ret = envoy_config_endpoint_v3_ClusterLoadAssignment_new(arena); |
| 55 |
if (!ret) return NULL; |
| 56 |
if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_ClusterLoadAssignment_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 57 |
return NULL; |
| 58 |
} |
| 59 |
return ret; |
| 60 |
} |
| 61 |
UPB_INLINE envoy_config_endpoint_v3_ClusterLoadAssignment* envoy_config_endpoint_v3_ClusterLoadAssignment_parse_ex(const char* buf, size_t size, |
| 62 |
const upb_ExtensionRegistry* extreg, |
| 63 |
int options, upb_Arena* arena) { |
| 64 |
envoy_config_endpoint_v3_ClusterLoadAssignment* ret = envoy_config_endpoint_v3_ClusterLoadAssignment_new(arena); |
| 65 |
if (!ret) return NULL; |
| 66 |
if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_ClusterLoadAssignment_msginit, extreg, options, arena) != |
| 67 |
kUpb_DecodeStatus_Ok) { |
| 68 |
return NULL; |
| 69 |
} |
| 70 |
return ret; |
| 71 |
} |
| 72 |
UPB_INLINE char* envoy_config_endpoint_v3_ClusterLoadAssignment_serialize(const envoy_config_endpoint_v3_ClusterLoadAssignment* msg, upb_Arena* arena, size_t* len) { |
| 73 |
char* ptr; |
| 74 |
(void)upb_Encode(msg, &envoy_config_endpoint_v3_ClusterLoadAssignment_msginit, 0, arena, &ptr, len); |
| 75 |
return ptr; |
| 76 |
} |
| 77 |
UPB_INLINE char* envoy_config_endpoint_v3_ClusterLoadAssignment_serialize_ex(const envoy_config_endpoint_v3_ClusterLoadAssignment* msg, int options, |
| 78 |
upb_Arena* arena, size_t* len) { |
| 79 |
char* ptr; |
| 80 |
(void)upb_Encode(msg, &envoy_config_endpoint_v3_ClusterLoadAssignment_msginit, options, arena, &ptr, len); |
| 81 |
return ptr; |
| 82 |
} |
| 83 |
UPB_INLINE void envoy_config_endpoint_v3_ClusterLoadAssignment_clear_cluster_name(const envoy_config_endpoint_v3_ClusterLoadAssignment* msg) { |
| 84 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 85 |
} |
| 86 |
UPB_INLINE upb_StringView envoy_config_endpoint_v3_ClusterLoadAssignment_cluster_name(const envoy_config_endpoint_v3_ClusterLoadAssignment* msg) { |
| 87 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView); |
| 88 |
} |
| 89 |
UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_has_endpoints(const envoy_config_endpoint_v3_ClusterLoadAssignment* msg) { |
| 90 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); |
| 91 |
} |
| 92 |
UPB_INLINE void envoy_config_endpoint_v3_ClusterLoadAssignment_clear_endpoints(const envoy_config_endpoint_v3_ClusterLoadAssignment* msg) { |
| 93 |
_upb_array_detach(msg, UPB_SIZE(12, 24)); |
| 94 |
} |
| 95 |
UPB_INLINE const struct envoy_config_endpoint_v3_LocalityLbEndpoints* const* envoy_config_endpoint_v3_ClusterLoadAssignment_endpoints(const envoy_config_endpoint_v3_ClusterLoadAssignment* msg, size_t* len) { |
| 96 |
return (const struct envoy_config_endpoint_v3_LocalityLbEndpoints* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); |
| 97 |
} |
| 98 |
UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_has_policy(const envoy_config_endpoint_v3_ClusterLoadAssignment* msg) { |
| 99 |
return _upb_hasbit(msg, 1); |
| 100 |
} |
| 101 |
UPB_INLINE void envoy_config_endpoint_v3_ClusterLoadAssignment_clear_policy(const envoy_config_endpoint_v3_ClusterLoadAssignment* msg) { |
| 102 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 32), const upb_Message*) = NULL; |
| 103 |
} |
| 104 |
UPB_INLINE const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* envoy_config_endpoint_v3_ClusterLoadAssignment_policy(const envoy_config_endpoint_v3_ClusterLoadAssignment* msg) { |
| 105 |
return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy*); |
| 106 |
} |
| 107 |
UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_has_named_endpoints(const envoy_config_endpoint_v3_ClusterLoadAssignment* msg) { |
| 108 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); |
| 109 |
} |
| 110 |
UPB_INLINE void envoy_config_endpoint_v3_ClusterLoadAssignment_clear_named_endpoints(const envoy_config_endpoint_v3_ClusterLoadAssignment* msg) { |
| 111 |
_upb_array_detach(msg, UPB_SIZE(20, 40)); |
| 112 |
} |
| 113 |
UPB_INLINE size_t envoy_config_endpoint_v3_ClusterLoadAssignment_named_endpoints_size(const envoy_config_endpoint_v3_ClusterLoadAssignment* msg) { |
| 114 |
return _upb_msg_map_size(msg, UPB_SIZE(20, 40)); |
| 115 |
} |
| 116 |
UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_named_endpoints_get(const envoy_config_endpoint_v3_ClusterLoadAssignment* msg, upb_StringView key, struct envoy_config_endpoint_v3_Endpoint** val) { |
| 117 |
return _upb_msg_map_get(msg, UPB_SIZE(20, 40), &key, 0, val, sizeof(*val)); |
| 118 |
} |
| 119 |
UPB_INLINE const envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry* envoy_config_endpoint_v3_ClusterLoadAssignment_named_endpoints_next(const envoy_config_endpoint_v3_ClusterLoadAssignment* msg, size_t* iter) { |
| 120 |
return (const envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry*)_upb_msg_map_next(msg, UPB_SIZE(20, 40), iter); |
| 121 |
} |
| 122 |
|
| 123 |
UPB_INLINE void envoy_config_endpoint_v3_ClusterLoadAssignment_set_cluster_name(envoy_config_endpoint_v3_ClusterLoadAssignment *msg, upb_StringView value) { |
| 124 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value; |
| 125 |
} |
| 126 |
UPB_INLINE struct envoy_config_endpoint_v3_LocalityLbEndpoints** envoy_config_endpoint_v3_ClusterLoadAssignment_mutable_endpoints(envoy_config_endpoint_v3_ClusterLoadAssignment* msg, size_t* len) { |
| 127 |
return (struct envoy_config_endpoint_v3_LocalityLbEndpoints**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); |
| 128 |
} |
| 129 |
UPB_INLINE struct envoy_config_endpoint_v3_LocalityLbEndpoints** envoy_config_endpoint_v3_ClusterLoadAssignment_resize_endpoints(envoy_config_endpoint_v3_ClusterLoadAssignment* msg, size_t len, upb_Arena* arena) { |
| 130 |
return (struct envoy_config_endpoint_v3_LocalityLbEndpoints**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(2, 3), arena); |
| 131 |
} |
| 132 |
UPB_INLINE struct envoy_config_endpoint_v3_LocalityLbEndpoints* envoy_config_endpoint_v3_ClusterLoadAssignment_add_endpoints(envoy_config_endpoint_v3_ClusterLoadAssignment* msg, upb_Arena* arena) { |
| 133 |
struct envoy_config_endpoint_v3_LocalityLbEndpoints* sub = (struct envoy_config_endpoint_v3_LocalityLbEndpoints*)_upb_Message_New(&envoy_config_endpoint_v3_LocalityLbEndpoints_msginit, arena); |
| 134 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(12, 24), UPB_SIZE(2, 3), &sub, arena); |
| 135 |
if (!ok) return NULL; |
| 136 |
return sub; |
| 137 |
} |
| 138 |
UPB_INLINE void envoy_config_endpoint_v3_ClusterLoadAssignment_set_policy(envoy_config_endpoint_v3_ClusterLoadAssignment *msg, envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* value) { |
| 139 |
_upb_sethas(msg, 1); |
| 140 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 32), envoy_config_endpoint_v3_ClusterLoadAssignment_Policy*) = value; |
| 141 |
} |
| 142 |
UPB_INLINE struct envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* envoy_config_endpoint_v3_ClusterLoadAssignment_mutable_policy(envoy_config_endpoint_v3_ClusterLoadAssignment* msg, upb_Arena* arena) { |
| 143 |
struct envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* sub = (struct envoy_config_endpoint_v3_ClusterLoadAssignment_Policy*)envoy_config_endpoint_v3_ClusterLoadAssignment_policy(msg); |
| 144 |
if (sub == NULL) { |
| 145 |
sub = (struct envoy_config_endpoint_v3_ClusterLoadAssignment_Policy*)_upb_Message_New(&envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_msginit, arena); |
| 146 |
if (!sub) return NULL; |
| 147 |
envoy_config_endpoint_v3_ClusterLoadAssignment_set_policy(msg, sub); |
| 148 |
} |
| 149 |
return sub; |
| 150 |
} |
| 151 |
UPB_INLINE void envoy_config_endpoint_v3_ClusterLoadAssignment_named_endpoints_clear(envoy_config_endpoint_v3_ClusterLoadAssignment* msg) { _upb_msg_map_clear(msg, UPB_SIZE(20, 40)); } |
| 152 |
UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_named_endpoints_set(envoy_config_endpoint_v3_ClusterLoadAssignment* msg, upb_StringView key, struct envoy_config_endpoint_v3_Endpoint* val, upb_Arena* a) { |
| 153 |
return _upb_msg_map_set(msg, UPB_SIZE(20, 40), &key, 0, &val, sizeof(val), a); |
| 154 |
} |
| 155 |
UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_named_endpoints_delete(envoy_config_endpoint_v3_ClusterLoadAssignment* msg, upb_StringView key) { |
| 156 |
return _upb_msg_map_delete(msg, UPB_SIZE(20, 40), &key, 0); |
| 157 |
} |
| 158 |
UPB_INLINE envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry* envoy_config_endpoint_v3_ClusterLoadAssignment_named_endpoints_nextmutable(envoy_config_endpoint_v3_ClusterLoadAssignment* msg, size_t* iter) { |
| 159 |
return (envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry*)_upb_msg_map_next(msg, UPB_SIZE(20, 40), iter); |
| 160 |
} |
| 161 |
|
| 162 |
/* envoy.config.endpoint.v3.ClusterLoadAssignment.Policy */ |
| 163 |
|
| 164 |
UPB_INLINE envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_new(upb_Arena* arena) { |
| 165 |
return (envoy_config_endpoint_v3_ClusterLoadAssignment_Policy*)_upb_Message_New(&envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_msginit, arena); |
| 166 |
} |
| 167 |
UPB_INLINE envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 168 |
envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* ret = envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_new(arena); |
| 169 |
if (!ret) return NULL; |
| 170 |
if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 171 |
return NULL; |
| 172 |
} |
| 173 |
return ret; |
| 174 |
} |
| 175 |
UPB_INLINE envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_parse_ex(const char* buf, size_t size, |
| 176 |
const upb_ExtensionRegistry* extreg, |
| 177 |
int options, upb_Arena* arena) { |
| 178 |
envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* ret = envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_new(arena); |
| 179 |
if (!ret) return NULL; |
| 180 |
if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_msginit, extreg, options, arena) != |
| 181 |
kUpb_DecodeStatus_Ok) { |
| 182 |
return NULL; |
| 183 |
} |
| 184 |
return ret; |
| 185 |
} |
| 186 |
UPB_INLINE char* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_serialize(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* msg, upb_Arena* arena, size_t* len) { |
| 187 |
char* ptr; |
| 188 |
(void)upb_Encode(msg, &envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_msginit, 0, arena, &ptr, len); |
| 189 |
return ptr; |
| 190 |
} |
| 191 |
UPB_INLINE char* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_serialize_ex(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* msg, int options, |
| 192 |
upb_Arena* arena, size_t* len) { |
| 193 |
char* ptr; |
| 194 |
(void)upb_Encode(msg, &envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_msginit, options, arena, &ptr, len); |
| 195 |
return ptr; |
| 196 |
} |
| 197 |
UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_has_drop_overloads(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* msg) { |
| 198 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); |
| 199 |
} |
| 200 |
UPB_INLINE void envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_clear_drop_overloads(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* msg) { |
| 201 |
_upb_array_detach(msg, UPB_SIZE(4, 8)); |
| 202 |
} |
| 203 |
UPB_INLINE const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload* const* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_drop_overloads(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* msg, size_t* len) { |
| 204 |
return (const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); |
| 205 |
} |
| 206 |
UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_has_overprovisioning_factor(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* msg) { |
| 207 |
return _upb_hasbit(msg, 1); |
| 208 |
} |
| 209 |
UPB_INLINE void envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_clear_overprovisioning_factor(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* msg) { |
| 210 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 16), const upb_Message*) = NULL; |
| 211 |
} |
| 212 |
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_overprovisioning_factor(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* msg) { |
| 213 |
return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt32Value*); |
| 214 |
} |
| 215 |
UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_has_endpoint_stale_after(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* msg) { |
| 216 |
return _upb_hasbit(msg, 2); |
| 217 |
} |
| 218 |
UPB_INLINE void envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_clear_endpoint_stale_after(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* msg) { |
| 219 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), const upb_Message*) = NULL; |
| 220 |
} |
| 221 |
UPB_INLINE const struct google_protobuf_Duration* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_endpoint_stale_after(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* msg) { |
| 222 |
return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Duration*); |
| 223 |
} |
| 224 |
|
| 225 |
UPB_INLINE envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload** envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_mutable_drop_overloads(envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* msg, size_t* len) { |
| 226 |
return (envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); |
| 227 |
} |
| 228 |
UPB_INLINE envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload** envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_resize_drop_overloads(envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* msg, size_t len, upb_Arena* arena) { |
| 229 |
return (envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena); |
| 230 |
} |
| 231 |
UPB_INLINE struct envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_add_drop_overloads(envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* msg, upb_Arena* arena) { |
| 232 |
struct envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload* sub = (struct envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload*)_upb_Message_New(&envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_msginit, arena); |
| 233 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena); |
| 234 |
if (!ok) return NULL; |
| 235 |
return sub; |
| 236 |
} |
| 237 |
UPB_INLINE void envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_set_overprovisioning_factor(envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *msg, struct google_protobuf_UInt32Value* value) { |
| 238 |
_upb_sethas(msg, 1); |
| 239 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt32Value*) = value; |
| 240 |
} |
| 241 |
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_mutable_overprovisioning_factor(envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* msg, upb_Arena* arena) { |
| 242 |
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_overprovisioning_factor(msg); |
| 243 |
if (sub == NULL) { |
| 244 |
sub = (struct google_protobuf_UInt32Value*)_upb_Message_New(&google_protobuf_UInt32Value_msginit, arena); |
| 245 |
if (!sub) return NULL; |
| 246 |
envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_set_overprovisioning_factor(msg, sub); |
| 247 |
} |
| 248 |
return sub; |
| 249 |
} |
| 250 |
UPB_INLINE void envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_set_endpoint_stale_after(envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *msg, struct google_protobuf_Duration* value) { |
| 251 |
_upb_sethas(msg, 2); |
| 252 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Duration*) = value; |
| 253 |
} |
| 254 |
UPB_INLINE struct google_protobuf_Duration* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_mutable_endpoint_stale_after(envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* msg, upb_Arena* arena) { |
| 255 |
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_endpoint_stale_after(msg); |
| 256 |
if (sub == NULL) { |
| 257 |
sub = (struct google_protobuf_Duration*)_upb_Message_New(&google_protobuf_Duration_msginit, arena); |
| 258 |
if (!sub) return NULL; |
| 259 |
envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_set_endpoint_stale_after(msg, sub); |
| 260 |
} |
| 261 |
return sub; |
| 262 |
} |
| 263 |
|
| 264 |
/* envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload */ |
| 265 |
|
| 266 |
UPB_INLINE envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_new(upb_Arena* arena) { |
| 267 |
return (envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload*)_upb_Message_New(&envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_msginit, arena); |
| 268 |
} |
| 269 |
UPB_INLINE envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 270 |
envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload* ret = envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_new(arena); |
| 271 |
if (!ret) return NULL; |
| 272 |
if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 273 |
return NULL; |
| 274 |
} |
| 275 |
return ret; |
| 276 |
} |
| 277 |
UPB_INLINE envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_parse_ex(const char* buf, size_t size, |
| 278 |
const upb_ExtensionRegistry* extreg, |
| 279 |
int options, upb_Arena* arena) { |
| 280 |
envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload* ret = envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_new(arena); |
| 281 |
if (!ret) return NULL; |
| 282 |
if (upb_Decode(buf, size, ret, &envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_msginit, extreg, options, arena) != |
| 283 |
kUpb_DecodeStatus_Ok) { |
| 284 |
return NULL; |
| 285 |
} |
| 286 |
return ret; |
| 287 |
} |
| 288 |
UPB_INLINE char* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_serialize(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload* msg, upb_Arena* arena, size_t* len) { |
| 289 |
char* ptr; |
| 290 |
(void)upb_Encode(msg, &envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_msginit, 0, arena, &ptr, len); |
| 291 |
return ptr; |
| 292 |
} |
| 293 |
UPB_INLINE char* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_serialize_ex(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload* msg, int options, |
| 294 |
upb_Arena* arena, size_t* len) { |
| 295 |
char* ptr; |
| 296 |
(void)upb_Encode(msg, &envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_msginit, options, arena, &ptr, len); |
| 297 |
return ptr; |
| 298 |
} |
| 299 |
UPB_INLINE void envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_clear_category(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload* msg) { |
| 300 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 301 |
} |
| 302 |
UPB_INLINE upb_StringView envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_category(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload* msg) { |
| 303 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView); |
| 304 |
} |
| 305 |
UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_has_drop_percentage(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload* msg) { |
| 306 |
return _upb_hasbit(msg, 1); |
| 307 |
} |
| 308 |
UPB_INLINE void envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_clear_drop_percentage(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload* msg) { |
| 309 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), const upb_Message*) = NULL; |
| 310 |
} |
| 311 |
UPB_INLINE const struct envoy_type_v3_FractionalPercent* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_drop_percentage(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload* msg) { |
| 312 |
return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_type_v3_FractionalPercent*); |
| 313 |
} |
| 314 |
|
| 315 |
UPB_INLINE void envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_set_category(envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload *msg, upb_StringView value) { |
| 316 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value; |
| 317 |
} |
| 318 |
UPB_INLINE void envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_set_drop_percentage(envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload *msg, struct envoy_type_v3_FractionalPercent* value) { |
| 319 |
_upb_sethas(msg, 1); |
| 320 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_type_v3_FractionalPercent*) = value; |
| 321 |
} |
| 322 |
UPB_INLINE struct envoy_type_v3_FractionalPercent* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_mutable_drop_percentage(envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload* msg, upb_Arena* arena) { |
| 323 |
struct envoy_type_v3_FractionalPercent* sub = (struct envoy_type_v3_FractionalPercent*)envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_drop_percentage(msg); |
| 324 |
if (sub == NULL) { |
| 325 |
sub = (struct envoy_type_v3_FractionalPercent*)_upb_Message_New(&envoy_type_v3_FractionalPercent_msginit, arena); |
| 326 |
if (!sub) return NULL; |
| 327 |
envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_set_drop_percentage(msg, sub); |
| 328 |
} |
| 329 |
return sub; |
| 330 |
} |
| 331 |
|
| 332 |
/* envoy.config.endpoint.v3.ClusterLoadAssignment.NamedEndpointsEntry */ |
| 333 |
|
| 334 |
UPB_INLINE upb_StringView envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry_key(const envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry* msg) { |
| 335 |
upb_StringView ret; |
| 336 |
_upb_msg_map_key(msg, &ret, 0); |
| 337 |
return ret; |
| 338 |
} |
| 339 |
UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry_has_value(const envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry* msg) { |
| 340 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); |
| 341 |
} |
| 342 |
UPB_INLINE const struct envoy_config_endpoint_v3_Endpoint* envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry_value(const envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry* msg) { |
| 343 |
struct envoy_config_endpoint_v3_Endpoint* ret; |
| 344 |
_upb_msg_map_value(msg, &ret, sizeof(ret)); |
| 345 |
return ret; |
| 346 |
} |
| 347 |
|
| 348 |
UPB_INLINE void envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry_set_value(envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry *msg, struct envoy_config_endpoint_v3_Endpoint* value) { |
| 349 |
_upb_msg_map_set_value(msg, &value, sizeof(struct envoy_config_endpoint_v3_Endpoint*)); |
| 350 |
} |
| 351 |
|
| 352 |
extern const upb_MiniTable_File envoy_config_endpoint_v3_endpoint_proto_upb_file_layout; |
| 353 |
|
| 354 |
#ifdef __cplusplus |
| 355 |
} /* extern "C" */ |
| 356 |
#endif |
| 357 |
|
| 358 |
#include "upb/port_undef.inc" |
| 359 |
|
| 360 |
#endif /* ENVOY_CONFIG_ENDPOINT_V3_ENDPOINT_PROTO_UPB_H_ */ |