| 1 |
/* This file was generated by upbc (the upb compiler) from the input |
| 2 |
* file: |
| 3 |
* |
| 4 |
* envoy/config/rbac/v3/rbac.proto |
| 5 |
* |
| 6 |
* Do not edit -- your changes will be discarded when the file is |
| 7 |
* regenerated. */ |
| 8 |
|
| 9 |
#ifndef ENVOY_CONFIG_RBAC_V3_RBAC_PROTO_UPB_H_ |
| 10 |
#define ENVOY_CONFIG_RBAC_V3_RBAC_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_rbac_v3_RBAC; |
| 24 |
struct envoy_config_rbac_v3_RBAC_PoliciesEntry; |
| 25 |
struct envoy_config_rbac_v3_Policy; |
| 26 |
struct envoy_config_rbac_v3_Permission; |
| 27 |
struct envoy_config_rbac_v3_Permission_Set; |
| 28 |
struct envoy_config_rbac_v3_Principal; |
| 29 |
struct envoy_config_rbac_v3_Principal_Set; |
| 30 |
struct envoy_config_rbac_v3_Principal_Authenticated; |
| 31 |
struct envoy_config_rbac_v3_Action; |
| 32 |
typedef struct envoy_config_rbac_v3_RBAC envoy_config_rbac_v3_RBAC; |
| 33 |
typedef struct envoy_config_rbac_v3_RBAC_PoliciesEntry envoy_config_rbac_v3_RBAC_PoliciesEntry; |
| 34 |
typedef struct envoy_config_rbac_v3_Policy envoy_config_rbac_v3_Policy; |
| 35 |
typedef struct envoy_config_rbac_v3_Permission envoy_config_rbac_v3_Permission; |
| 36 |
typedef struct envoy_config_rbac_v3_Permission_Set envoy_config_rbac_v3_Permission_Set; |
| 37 |
typedef struct envoy_config_rbac_v3_Principal envoy_config_rbac_v3_Principal; |
| 38 |
typedef struct envoy_config_rbac_v3_Principal_Set envoy_config_rbac_v3_Principal_Set; |
| 39 |
typedef struct envoy_config_rbac_v3_Principal_Authenticated envoy_config_rbac_v3_Principal_Authenticated; |
| 40 |
typedef struct envoy_config_rbac_v3_Action envoy_config_rbac_v3_Action; |
| 41 |
extern const upb_MiniTable envoy_config_rbac_v3_RBAC_msginit; |
| 42 |
extern const upb_MiniTable envoy_config_rbac_v3_RBAC_PoliciesEntry_msginit; |
| 43 |
extern const upb_MiniTable envoy_config_rbac_v3_Policy_msginit; |
| 44 |
extern const upb_MiniTable envoy_config_rbac_v3_Permission_msginit; |
| 45 |
extern const upb_MiniTable envoy_config_rbac_v3_Permission_Set_msginit; |
| 46 |
extern const upb_MiniTable envoy_config_rbac_v3_Principal_msginit; |
| 47 |
extern const upb_MiniTable envoy_config_rbac_v3_Principal_Set_msginit; |
| 48 |
extern const upb_MiniTable envoy_config_rbac_v3_Principal_Authenticated_msginit; |
| 49 |
extern const upb_MiniTable envoy_config_rbac_v3_Action_msginit; |
| 50 |
struct envoy_config_core_v3_CidrRange; |
| 51 |
struct envoy_config_core_v3_TypedExtensionConfig; |
| 52 |
struct envoy_config_route_v3_HeaderMatcher; |
| 53 |
struct envoy_type_matcher_v3_MetadataMatcher; |
| 54 |
struct envoy_type_matcher_v3_PathMatcher; |
| 55 |
struct envoy_type_matcher_v3_StringMatcher; |
| 56 |
struct envoy_type_v3_Int32Range; |
| 57 |
struct google_api_expr_v1alpha1_CheckedExpr; |
| 58 |
struct google_api_expr_v1alpha1_Expr; |
| 59 |
extern const upb_MiniTable envoy_config_core_v3_CidrRange_msginit; |
| 60 |
extern const upb_MiniTable envoy_config_core_v3_TypedExtensionConfig_msginit; |
| 61 |
extern const upb_MiniTable envoy_config_route_v3_HeaderMatcher_msginit; |
| 62 |
extern const upb_MiniTable envoy_type_matcher_v3_MetadataMatcher_msginit; |
| 63 |
extern const upb_MiniTable envoy_type_matcher_v3_PathMatcher_msginit; |
| 64 |
extern const upb_MiniTable envoy_type_matcher_v3_StringMatcher_msginit; |
| 65 |
extern const upb_MiniTable envoy_type_v3_Int32Range_msginit; |
| 66 |
extern const upb_MiniTable google_api_expr_v1alpha1_CheckedExpr_msginit; |
| 67 |
extern const upb_MiniTable google_api_expr_v1alpha1_Expr_msginit; |
| 68 |
|
| 69 |
typedef enum { |
| 70 |
envoy_config_rbac_v3_RBAC_ALLOW = 0, |
| 71 |
envoy_config_rbac_v3_RBAC_DENY = 1, |
| 72 |
envoy_config_rbac_v3_RBAC_LOG = 2 |
| 73 |
} envoy_config_rbac_v3_RBAC_Action; |
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
/* envoy.config.rbac.v3.RBAC */ |
| 78 |
|
| 79 |
UPB_INLINE envoy_config_rbac_v3_RBAC* envoy_config_rbac_v3_RBAC_new(upb_Arena* arena) { |
| 80 |
return (envoy_config_rbac_v3_RBAC*)_upb_Message_New(&envoy_config_rbac_v3_RBAC_msginit, arena); |
| 81 |
} |
| 82 |
UPB_INLINE envoy_config_rbac_v3_RBAC* envoy_config_rbac_v3_RBAC_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 83 |
envoy_config_rbac_v3_RBAC* ret = envoy_config_rbac_v3_RBAC_new(arena); |
| 84 |
if (!ret) return NULL; |
| 85 |
if (upb_Decode(buf, size, ret, &envoy_config_rbac_v3_RBAC_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 86 |
return NULL; |
| 87 |
} |
| 88 |
return ret; |
| 89 |
} |
| 90 |
UPB_INLINE envoy_config_rbac_v3_RBAC* envoy_config_rbac_v3_RBAC_parse_ex(const char* buf, size_t size, |
| 91 |
const upb_ExtensionRegistry* extreg, |
| 92 |
int options, upb_Arena* arena) { |
| 93 |
envoy_config_rbac_v3_RBAC* ret = envoy_config_rbac_v3_RBAC_new(arena); |
| 94 |
if (!ret) return NULL; |
| 95 |
if (upb_Decode(buf, size, ret, &envoy_config_rbac_v3_RBAC_msginit, extreg, options, arena) != |
| 96 |
kUpb_DecodeStatus_Ok) { |
| 97 |
return NULL; |
| 98 |
} |
| 99 |
return ret; |
| 100 |
} |
| 101 |
UPB_INLINE char* envoy_config_rbac_v3_RBAC_serialize(const envoy_config_rbac_v3_RBAC* msg, upb_Arena* arena, size_t* len) { |
| 102 |
char* ptr; |
| 103 |
(void)upb_Encode(msg, &envoy_config_rbac_v3_RBAC_msginit, 0, arena, &ptr, len); |
| 104 |
return ptr; |
| 105 |
} |
| 106 |
UPB_INLINE char* envoy_config_rbac_v3_RBAC_serialize_ex(const envoy_config_rbac_v3_RBAC* msg, int options, |
| 107 |
upb_Arena* arena, size_t* len) { |
| 108 |
char* ptr; |
| 109 |
(void)upb_Encode(msg, &envoy_config_rbac_v3_RBAC_msginit, options, arena, &ptr, len); |
| 110 |
return ptr; |
| 111 |
} |
| 112 |
UPB_INLINE void envoy_config_rbac_v3_RBAC_clear_action(const envoy_config_rbac_v3_RBAC* msg) { |
| 113 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = 0; |
| 114 |
} |
| 115 |
UPB_INLINE int32_t envoy_config_rbac_v3_RBAC_action(const envoy_config_rbac_v3_RBAC* msg) { |
| 116 |
return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); |
| 117 |
} |
| 118 |
UPB_INLINE bool envoy_config_rbac_v3_RBAC_has_policies(const envoy_config_rbac_v3_RBAC* msg) { |
| 119 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); |
| 120 |
} |
| 121 |
UPB_INLINE void envoy_config_rbac_v3_RBAC_clear_policies(const envoy_config_rbac_v3_RBAC* msg) { |
| 122 |
_upb_array_detach(msg, UPB_SIZE(4, 8)); |
| 123 |
} |
| 124 |
UPB_INLINE size_t envoy_config_rbac_v3_RBAC_policies_size(const envoy_config_rbac_v3_RBAC* msg) { |
| 125 |
return _upb_msg_map_size(msg, UPB_SIZE(4, 8)); |
| 126 |
} |
| 127 |
UPB_INLINE bool envoy_config_rbac_v3_RBAC_policies_get(const envoy_config_rbac_v3_RBAC* msg, upb_StringView key, envoy_config_rbac_v3_Policy** val) { |
| 128 |
return _upb_msg_map_get(msg, UPB_SIZE(4, 8), &key, 0, val, sizeof(*val)); |
| 129 |
} |
| 130 |
UPB_INLINE const envoy_config_rbac_v3_RBAC_PoliciesEntry* envoy_config_rbac_v3_RBAC_policies_next(const envoy_config_rbac_v3_RBAC* msg, size_t* iter) { |
| 131 |
return (const envoy_config_rbac_v3_RBAC_PoliciesEntry*)_upb_msg_map_next(msg, UPB_SIZE(4, 8), iter); |
| 132 |
} |
| 133 |
|
| 134 |
UPB_INLINE void envoy_config_rbac_v3_RBAC_set_action(envoy_config_rbac_v3_RBAC *msg, int32_t value) { |
| 135 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; |
| 136 |
} |
| 137 |
UPB_INLINE void envoy_config_rbac_v3_RBAC_policies_clear(envoy_config_rbac_v3_RBAC* msg) { _upb_msg_map_clear(msg, UPB_SIZE(4, 8)); } |
| 138 |
UPB_INLINE bool envoy_config_rbac_v3_RBAC_policies_set(envoy_config_rbac_v3_RBAC* msg, upb_StringView key, envoy_config_rbac_v3_Policy* val, upb_Arena* a) { |
| 139 |
return _upb_msg_map_set(msg, UPB_SIZE(4, 8), &key, 0, &val, sizeof(val), a); |
| 140 |
} |
| 141 |
UPB_INLINE bool envoy_config_rbac_v3_RBAC_policies_delete(envoy_config_rbac_v3_RBAC* msg, upb_StringView key) { |
| 142 |
return _upb_msg_map_delete(msg, UPB_SIZE(4, 8), &key, 0); |
| 143 |
} |
| 144 |
UPB_INLINE envoy_config_rbac_v3_RBAC_PoliciesEntry* envoy_config_rbac_v3_RBAC_policies_nextmutable(envoy_config_rbac_v3_RBAC* msg, size_t* iter) { |
| 145 |
return (envoy_config_rbac_v3_RBAC_PoliciesEntry*)_upb_msg_map_next(msg, UPB_SIZE(4, 8), iter); |
| 146 |
} |
| 147 |
|
| 148 |
/* envoy.config.rbac.v3.RBAC.PoliciesEntry */ |
| 149 |
|
| 150 |
UPB_INLINE upb_StringView envoy_config_rbac_v3_RBAC_PoliciesEntry_key(const envoy_config_rbac_v3_RBAC_PoliciesEntry* msg) { |
| 151 |
upb_StringView ret; |
| 152 |
_upb_msg_map_key(msg, &ret, 0); |
| 153 |
return ret; |
| 154 |
} |
| 155 |
UPB_INLINE bool envoy_config_rbac_v3_RBAC_PoliciesEntry_has_value(const envoy_config_rbac_v3_RBAC_PoliciesEntry* msg) { |
| 156 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); |
| 157 |
} |
| 158 |
UPB_INLINE const envoy_config_rbac_v3_Policy* envoy_config_rbac_v3_RBAC_PoliciesEntry_value(const envoy_config_rbac_v3_RBAC_PoliciesEntry* msg) { |
| 159 |
envoy_config_rbac_v3_Policy* ret; |
| 160 |
_upb_msg_map_value(msg, &ret, sizeof(ret)); |
| 161 |
return ret; |
| 162 |
} |
| 163 |
|
| 164 |
UPB_INLINE void envoy_config_rbac_v3_RBAC_PoliciesEntry_set_value(envoy_config_rbac_v3_RBAC_PoliciesEntry *msg, envoy_config_rbac_v3_Policy* value) { |
| 165 |
_upb_msg_map_set_value(msg, &value, sizeof(envoy_config_rbac_v3_Policy*)); |
| 166 |
} |
| 167 |
|
| 168 |
/* envoy.config.rbac.v3.Policy */ |
| 169 |
|
| 170 |
UPB_INLINE envoy_config_rbac_v3_Policy* envoy_config_rbac_v3_Policy_new(upb_Arena* arena) { |
| 171 |
return (envoy_config_rbac_v3_Policy*)_upb_Message_New(&envoy_config_rbac_v3_Policy_msginit, arena); |
| 172 |
} |
| 173 |
UPB_INLINE envoy_config_rbac_v3_Policy* envoy_config_rbac_v3_Policy_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 174 |
envoy_config_rbac_v3_Policy* ret = envoy_config_rbac_v3_Policy_new(arena); |
| 175 |
if (!ret) return NULL; |
| 176 |
if (upb_Decode(buf, size, ret, &envoy_config_rbac_v3_Policy_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 177 |
return NULL; |
| 178 |
} |
| 179 |
return ret; |
| 180 |
} |
| 181 |
UPB_INLINE envoy_config_rbac_v3_Policy* envoy_config_rbac_v3_Policy_parse_ex(const char* buf, size_t size, |
| 182 |
const upb_ExtensionRegistry* extreg, |
| 183 |
int options, upb_Arena* arena) { |
| 184 |
envoy_config_rbac_v3_Policy* ret = envoy_config_rbac_v3_Policy_new(arena); |
| 185 |
if (!ret) return NULL; |
| 186 |
if (upb_Decode(buf, size, ret, &envoy_config_rbac_v3_Policy_msginit, extreg, options, arena) != |
| 187 |
kUpb_DecodeStatus_Ok) { |
| 188 |
return NULL; |
| 189 |
} |
| 190 |
return ret; |
| 191 |
} |
| 192 |
UPB_INLINE char* envoy_config_rbac_v3_Policy_serialize(const envoy_config_rbac_v3_Policy* msg, upb_Arena* arena, size_t* len) { |
| 193 |
char* ptr; |
| 194 |
(void)upb_Encode(msg, &envoy_config_rbac_v3_Policy_msginit, 0, arena, &ptr, len); |
| 195 |
return ptr; |
| 196 |
} |
| 197 |
UPB_INLINE char* envoy_config_rbac_v3_Policy_serialize_ex(const envoy_config_rbac_v3_Policy* msg, int options, |
| 198 |
upb_Arena* arena, size_t* len) { |
| 199 |
char* ptr; |
| 200 |
(void)upb_Encode(msg, &envoy_config_rbac_v3_Policy_msginit, options, arena, &ptr, len); |
| 201 |
return ptr; |
| 202 |
} |
| 203 |
UPB_INLINE bool envoy_config_rbac_v3_Policy_has_permissions(const envoy_config_rbac_v3_Policy* msg) { |
| 204 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); |
| 205 |
} |
| 206 |
UPB_INLINE void envoy_config_rbac_v3_Policy_clear_permissions(const envoy_config_rbac_v3_Policy* msg) { |
| 207 |
_upb_array_detach(msg, UPB_SIZE(4, 8)); |
| 208 |
} |
| 209 |
UPB_INLINE const envoy_config_rbac_v3_Permission* const* envoy_config_rbac_v3_Policy_permissions(const envoy_config_rbac_v3_Policy* msg, size_t* len) { |
| 210 |
return (const envoy_config_rbac_v3_Permission* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); |
| 211 |
} |
| 212 |
UPB_INLINE bool envoy_config_rbac_v3_Policy_has_principals(const envoy_config_rbac_v3_Policy* msg) { |
| 213 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); |
| 214 |
} |
| 215 |
UPB_INLINE void envoy_config_rbac_v3_Policy_clear_principals(const envoy_config_rbac_v3_Policy* msg) { |
| 216 |
_upb_array_detach(msg, UPB_SIZE(8, 16)); |
| 217 |
} |
| 218 |
UPB_INLINE const envoy_config_rbac_v3_Principal* const* envoy_config_rbac_v3_Policy_principals(const envoy_config_rbac_v3_Policy* msg, size_t* len) { |
| 219 |
return (const envoy_config_rbac_v3_Principal* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); |
| 220 |
} |
| 221 |
UPB_INLINE bool envoy_config_rbac_v3_Policy_has_condition(const envoy_config_rbac_v3_Policy* msg) { |
| 222 |
return _upb_hasbit(msg, 1); |
| 223 |
} |
| 224 |
UPB_INLINE void envoy_config_rbac_v3_Policy_clear_condition(const envoy_config_rbac_v3_Policy* msg) { |
| 225 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), const upb_Message*) = NULL; |
| 226 |
} |
| 227 |
UPB_INLINE const struct google_api_expr_v1alpha1_Expr* envoy_config_rbac_v3_Policy_condition(const envoy_config_rbac_v3_Policy* msg) { |
| 228 |
return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_api_expr_v1alpha1_Expr*); |
| 229 |
} |
| 230 |
UPB_INLINE bool envoy_config_rbac_v3_Policy_has_checked_condition(const envoy_config_rbac_v3_Policy* msg) { |
| 231 |
return _upb_hasbit(msg, 2); |
| 232 |
} |
| 233 |
UPB_INLINE void envoy_config_rbac_v3_Policy_clear_checked_condition(const envoy_config_rbac_v3_Policy* msg) { |
| 234 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 32), const upb_Message*) = NULL; |
| 235 |
} |
| 236 |
UPB_INLINE const struct google_api_expr_v1alpha1_CheckedExpr* envoy_config_rbac_v3_Policy_checked_condition(const envoy_config_rbac_v3_Policy* msg) { |
| 237 |
return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_api_expr_v1alpha1_CheckedExpr*); |
| 238 |
} |
| 239 |
|
| 240 |
UPB_INLINE envoy_config_rbac_v3_Permission** envoy_config_rbac_v3_Policy_mutable_permissions(envoy_config_rbac_v3_Policy* msg, size_t* len) { |
| 241 |
return (envoy_config_rbac_v3_Permission**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); |
| 242 |
} |
| 243 |
UPB_INLINE envoy_config_rbac_v3_Permission** envoy_config_rbac_v3_Policy_resize_permissions(envoy_config_rbac_v3_Policy* msg, size_t len, upb_Arena* arena) { |
| 244 |
return (envoy_config_rbac_v3_Permission**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena); |
| 245 |
} |
| 246 |
UPB_INLINE struct envoy_config_rbac_v3_Permission* envoy_config_rbac_v3_Policy_add_permissions(envoy_config_rbac_v3_Policy* msg, upb_Arena* arena) { |
| 247 |
struct envoy_config_rbac_v3_Permission* sub = (struct envoy_config_rbac_v3_Permission*)_upb_Message_New(&envoy_config_rbac_v3_Permission_msginit, arena); |
| 248 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena); |
| 249 |
if (!ok) return NULL; |
| 250 |
return sub; |
| 251 |
} |
| 252 |
UPB_INLINE envoy_config_rbac_v3_Principal** envoy_config_rbac_v3_Policy_mutable_principals(envoy_config_rbac_v3_Policy* msg, size_t* len) { |
| 253 |
return (envoy_config_rbac_v3_Principal**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len); |
| 254 |
} |
| 255 |
UPB_INLINE envoy_config_rbac_v3_Principal** envoy_config_rbac_v3_Policy_resize_principals(envoy_config_rbac_v3_Policy* msg, size_t len, upb_Arena* arena) { |
| 256 |
return (envoy_config_rbac_v3_Principal**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena); |
| 257 |
} |
| 258 |
UPB_INLINE struct envoy_config_rbac_v3_Principal* envoy_config_rbac_v3_Policy_add_principals(envoy_config_rbac_v3_Policy* msg, upb_Arena* arena) { |
| 259 |
struct envoy_config_rbac_v3_Principal* sub = (struct envoy_config_rbac_v3_Principal*)_upb_Message_New(&envoy_config_rbac_v3_Principal_msginit, arena); |
| 260 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(8, 16), UPB_SIZE(2, 3), &sub, arena); |
| 261 |
if (!ok) return NULL; |
| 262 |
return sub; |
| 263 |
} |
| 264 |
UPB_INLINE void envoy_config_rbac_v3_Policy_set_condition(envoy_config_rbac_v3_Policy *msg, struct google_api_expr_v1alpha1_Expr* value) { |
| 265 |
_upb_sethas(msg, 1); |
| 266 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_api_expr_v1alpha1_Expr*) = value; |
| 267 |
} |
| 268 |
UPB_INLINE struct google_api_expr_v1alpha1_Expr* envoy_config_rbac_v3_Policy_mutable_condition(envoy_config_rbac_v3_Policy* msg, upb_Arena* arena) { |
| 269 |
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)envoy_config_rbac_v3_Policy_condition(msg); |
| 270 |
if (sub == NULL) { |
| 271 |
sub = (struct google_api_expr_v1alpha1_Expr*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_msginit, arena); |
| 272 |
if (!sub) return NULL; |
| 273 |
envoy_config_rbac_v3_Policy_set_condition(msg, sub); |
| 274 |
} |
| 275 |
return sub; |
| 276 |
} |
| 277 |
UPB_INLINE void envoy_config_rbac_v3_Policy_set_checked_condition(envoy_config_rbac_v3_Policy *msg, struct google_api_expr_v1alpha1_CheckedExpr* value) { |
| 278 |
_upb_sethas(msg, 2); |
| 279 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_api_expr_v1alpha1_CheckedExpr*) = value; |
| 280 |
} |
| 281 |
UPB_INLINE struct google_api_expr_v1alpha1_CheckedExpr* envoy_config_rbac_v3_Policy_mutable_checked_condition(envoy_config_rbac_v3_Policy* msg, upb_Arena* arena) { |
| 282 |
struct google_api_expr_v1alpha1_CheckedExpr* sub = (struct google_api_expr_v1alpha1_CheckedExpr*)envoy_config_rbac_v3_Policy_checked_condition(msg); |
| 283 |
if (sub == NULL) { |
| 284 |
sub = (struct google_api_expr_v1alpha1_CheckedExpr*)_upb_Message_New(&google_api_expr_v1alpha1_CheckedExpr_msginit, arena); |
| 285 |
if (!sub) return NULL; |
| 286 |
envoy_config_rbac_v3_Policy_set_checked_condition(msg, sub); |
| 287 |
} |
| 288 |
return sub; |
| 289 |
} |
| 290 |
|
| 291 |
/* envoy.config.rbac.v3.Permission */ |
| 292 |
|
| 293 |
UPB_INLINE envoy_config_rbac_v3_Permission* envoy_config_rbac_v3_Permission_new(upb_Arena* arena) { |
| 294 |
return (envoy_config_rbac_v3_Permission*)_upb_Message_New(&envoy_config_rbac_v3_Permission_msginit, arena); |
| 295 |
} |
| 296 |
UPB_INLINE envoy_config_rbac_v3_Permission* envoy_config_rbac_v3_Permission_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 297 |
envoy_config_rbac_v3_Permission* ret = envoy_config_rbac_v3_Permission_new(arena); |
| 298 |
if (!ret) return NULL; |
| 299 |
if (upb_Decode(buf, size, ret, &envoy_config_rbac_v3_Permission_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 300 |
return NULL; |
| 301 |
} |
| 302 |
return ret; |
| 303 |
} |
| 304 |
UPB_INLINE envoy_config_rbac_v3_Permission* envoy_config_rbac_v3_Permission_parse_ex(const char* buf, size_t size, |
| 305 |
const upb_ExtensionRegistry* extreg, |
| 306 |
int options, upb_Arena* arena) { |
| 307 |
envoy_config_rbac_v3_Permission* ret = envoy_config_rbac_v3_Permission_new(arena); |
| 308 |
if (!ret) return NULL; |
| 309 |
if (upb_Decode(buf, size, ret, &envoy_config_rbac_v3_Permission_msginit, extreg, options, arena) != |
| 310 |
kUpb_DecodeStatus_Ok) { |
| 311 |
return NULL; |
| 312 |
} |
| 313 |
return ret; |
| 314 |
} |
| 315 |
UPB_INLINE char* envoy_config_rbac_v3_Permission_serialize(const envoy_config_rbac_v3_Permission* msg, upb_Arena* arena, size_t* len) { |
| 316 |
char* ptr; |
| 317 |
(void)upb_Encode(msg, &envoy_config_rbac_v3_Permission_msginit, 0, arena, &ptr, len); |
| 318 |
return ptr; |
| 319 |
} |
| 320 |
UPB_INLINE char* envoy_config_rbac_v3_Permission_serialize_ex(const envoy_config_rbac_v3_Permission* msg, int options, |
| 321 |
upb_Arena* arena, size_t* len) { |
| 322 |
char* ptr; |
| 323 |
(void)upb_Encode(msg, &envoy_config_rbac_v3_Permission_msginit, options, arena, &ptr, len); |
| 324 |
return ptr; |
| 325 |
} |
| 326 |
typedef enum { |
| 327 |
envoy_config_rbac_v3_Permission_rule_and_rules = 1, |
| 328 |
envoy_config_rbac_v3_Permission_rule_or_rules = 2, |
| 329 |
envoy_config_rbac_v3_Permission_rule_any = 3, |
| 330 |
envoy_config_rbac_v3_Permission_rule_header = 4, |
| 331 |
envoy_config_rbac_v3_Permission_rule_url_path = 10, |
| 332 |
envoy_config_rbac_v3_Permission_rule_destination_ip = 5, |
| 333 |
envoy_config_rbac_v3_Permission_rule_destination_port = 6, |
| 334 |
envoy_config_rbac_v3_Permission_rule_destination_port_range = 11, |
| 335 |
envoy_config_rbac_v3_Permission_rule_metadata = 7, |
| 336 |
envoy_config_rbac_v3_Permission_rule_not_rule = 8, |
| 337 |
envoy_config_rbac_v3_Permission_rule_requested_server_name = 9, |
| 338 |
envoy_config_rbac_v3_Permission_rule_matcher = 12, |
| 339 |
envoy_config_rbac_v3_Permission_rule_NOT_SET = 0 |
| 340 |
} envoy_config_rbac_v3_Permission_rule_oneofcases; |
| 341 |
UPB_INLINE envoy_config_rbac_v3_Permission_rule_oneofcases envoy_config_rbac_v3_Permission_rule_case(const envoy_config_rbac_v3_Permission* msg) { |
| 342 |
return (envoy_config_rbac_v3_Permission_rule_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); |
| 343 |
} |
| 344 |
UPB_INLINE bool envoy_config_rbac_v3_Permission_has_and_rules(const envoy_config_rbac_v3_Permission* msg) { |
| 345 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 1; |
| 346 |
} |
| 347 |
UPB_INLINE void envoy_config_rbac_v3_Permission_clear_and_rules(const envoy_config_rbac_v3_Permission* msg) { |
| 348 |
UPB_WRITE_ONEOF(msg, envoy_config_rbac_v3_Permission_Set*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_rbac_v3_Permission_rule_NOT_SET); |
| 349 |
} |
| 350 |
UPB_INLINE const envoy_config_rbac_v3_Permission_Set* envoy_config_rbac_v3_Permission_and_rules(const envoy_config_rbac_v3_Permission* msg) { |
| 351 |
return UPB_READ_ONEOF(msg, const envoy_config_rbac_v3_Permission_Set*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 1, NULL); |
| 352 |
} |
| 353 |
UPB_INLINE bool envoy_config_rbac_v3_Permission_has_or_rules(const envoy_config_rbac_v3_Permission* msg) { |
| 354 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 2; |
| 355 |
} |
| 356 |
UPB_INLINE void envoy_config_rbac_v3_Permission_clear_or_rules(const envoy_config_rbac_v3_Permission* msg) { |
| 357 |
UPB_WRITE_ONEOF(msg, envoy_config_rbac_v3_Permission_Set*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_rbac_v3_Permission_rule_NOT_SET); |
| 358 |
} |
| 359 |
UPB_INLINE const envoy_config_rbac_v3_Permission_Set* envoy_config_rbac_v3_Permission_or_rules(const envoy_config_rbac_v3_Permission* msg) { |
| 360 |
return UPB_READ_ONEOF(msg, const envoy_config_rbac_v3_Permission_Set*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 2, NULL); |
| 361 |
} |
| 362 |
UPB_INLINE bool envoy_config_rbac_v3_Permission_has_any(const envoy_config_rbac_v3_Permission* msg) { |
| 363 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 3; |
| 364 |
} |
| 365 |
UPB_INLINE void envoy_config_rbac_v3_Permission_clear_any(const envoy_config_rbac_v3_Permission* msg) { |
| 366 |
UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_rbac_v3_Permission_rule_NOT_SET); |
| 367 |
} |
| 368 |
UPB_INLINE bool envoy_config_rbac_v3_Permission_any(const envoy_config_rbac_v3_Permission* msg) { |
| 369 |
return UPB_READ_ONEOF(msg, bool, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 3, false); |
| 370 |
} |
| 371 |
UPB_INLINE bool envoy_config_rbac_v3_Permission_has_header(const envoy_config_rbac_v3_Permission* msg) { |
| 372 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 4; |
| 373 |
} |
| 374 |
UPB_INLINE void envoy_config_rbac_v3_Permission_clear_header(const envoy_config_rbac_v3_Permission* msg) { |
| 375 |
UPB_WRITE_ONEOF(msg, struct envoy_config_route_v3_HeaderMatcher*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_rbac_v3_Permission_rule_NOT_SET); |
| 376 |
} |
| 377 |
UPB_INLINE const struct envoy_config_route_v3_HeaderMatcher* envoy_config_rbac_v3_Permission_header(const envoy_config_rbac_v3_Permission* msg) { |
| 378 |
return UPB_READ_ONEOF(msg, const struct envoy_config_route_v3_HeaderMatcher*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 4, NULL); |
| 379 |
} |
| 380 |
UPB_INLINE bool envoy_config_rbac_v3_Permission_has_destination_ip(const envoy_config_rbac_v3_Permission* msg) { |
| 381 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 5; |
| 382 |
} |
| 383 |
UPB_INLINE void envoy_config_rbac_v3_Permission_clear_destination_ip(const envoy_config_rbac_v3_Permission* msg) { |
| 384 |
UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_CidrRange*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_rbac_v3_Permission_rule_NOT_SET); |
| 385 |
} |
| 386 |
UPB_INLINE const struct envoy_config_core_v3_CidrRange* envoy_config_rbac_v3_Permission_destination_ip(const envoy_config_rbac_v3_Permission* msg) { |
| 387 |
return UPB_READ_ONEOF(msg, const struct envoy_config_core_v3_CidrRange*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 5, NULL); |
| 388 |
} |
| 389 |
UPB_INLINE bool envoy_config_rbac_v3_Permission_has_destination_port(const envoy_config_rbac_v3_Permission* msg) { |
| 390 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 6; |
| 391 |
} |
| 392 |
UPB_INLINE void envoy_config_rbac_v3_Permission_clear_destination_port(const envoy_config_rbac_v3_Permission* msg) { |
| 393 |
UPB_WRITE_ONEOF(msg, uint32_t, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_rbac_v3_Permission_rule_NOT_SET); |
| 394 |
} |
| 395 |
UPB_INLINE uint32_t envoy_config_rbac_v3_Permission_destination_port(const envoy_config_rbac_v3_Permission* msg) { |
| 396 |
return UPB_READ_ONEOF(msg, uint32_t, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 6, _upb_UInt32_FromU(0u)); |
| 397 |
} |
| 398 |
UPB_INLINE bool envoy_config_rbac_v3_Permission_has_metadata(const envoy_config_rbac_v3_Permission* msg) { |
| 399 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 7; |
| 400 |
} |
| 401 |
UPB_INLINE void envoy_config_rbac_v3_Permission_clear_metadata(const envoy_config_rbac_v3_Permission* msg) { |
| 402 |
UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_MetadataMatcher*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_rbac_v3_Permission_rule_NOT_SET); |
| 403 |
} |
| 404 |
UPB_INLINE const struct envoy_type_matcher_v3_MetadataMatcher* envoy_config_rbac_v3_Permission_metadata(const envoy_config_rbac_v3_Permission* msg) { |
| 405 |
return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_v3_MetadataMatcher*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 7, NULL); |
| 406 |
} |
| 407 |
UPB_INLINE bool envoy_config_rbac_v3_Permission_has_not_rule(const envoy_config_rbac_v3_Permission* msg) { |
| 408 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 8; |
| 409 |
} |
| 410 |
UPB_INLINE void envoy_config_rbac_v3_Permission_clear_not_rule(const envoy_config_rbac_v3_Permission* msg) { |
| 411 |
UPB_WRITE_ONEOF(msg, envoy_config_rbac_v3_Permission*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_rbac_v3_Permission_rule_NOT_SET); |
| 412 |
} |
| 413 |
UPB_INLINE const envoy_config_rbac_v3_Permission* envoy_config_rbac_v3_Permission_not_rule(const envoy_config_rbac_v3_Permission* msg) { |
| 414 |
return UPB_READ_ONEOF(msg, const envoy_config_rbac_v3_Permission*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 8, NULL); |
| 415 |
} |
| 416 |
UPB_INLINE bool envoy_config_rbac_v3_Permission_has_requested_server_name(const envoy_config_rbac_v3_Permission* msg) { |
| 417 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 9; |
| 418 |
} |
| 419 |
UPB_INLINE void envoy_config_rbac_v3_Permission_clear_requested_server_name(const envoy_config_rbac_v3_Permission* msg) { |
| 420 |
UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_StringMatcher*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_rbac_v3_Permission_rule_NOT_SET); |
| 421 |
} |
| 422 |
UPB_INLINE const struct envoy_type_matcher_v3_StringMatcher* envoy_config_rbac_v3_Permission_requested_server_name(const envoy_config_rbac_v3_Permission* msg) { |
| 423 |
return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_v3_StringMatcher*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 9, NULL); |
| 424 |
} |
| 425 |
UPB_INLINE bool envoy_config_rbac_v3_Permission_has_url_path(const envoy_config_rbac_v3_Permission* msg) { |
| 426 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 10; |
| 427 |
} |
| 428 |
UPB_INLINE void envoy_config_rbac_v3_Permission_clear_url_path(const envoy_config_rbac_v3_Permission* msg) { |
| 429 |
UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_PathMatcher*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_rbac_v3_Permission_rule_NOT_SET); |
| 430 |
} |
| 431 |
UPB_INLINE const struct envoy_type_matcher_v3_PathMatcher* envoy_config_rbac_v3_Permission_url_path(const envoy_config_rbac_v3_Permission* msg) { |
| 432 |
return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_v3_PathMatcher*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 10, NULL); |
| 433 |
} |
| 434 |
UPB_INLINE bool envoy_config_rbac_v3_Permission_has_destination_port_range(const envoy_config_rbac_v3_Permission* msg) { |
| 435 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 11; |
| 436 |
} |
| 437 |
UPB_INLINE void envoy_config_rbac_v3_Permission_clear_destination_port_range(const envoy_config_rbac_v3_Permission* msg) { |
| 438 |
UPB_WRITE_ONEOF(msg, struct envoy_type_v3_Int32Range*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_rbac_v3_Permission_rule_NOT_SET); |
| 439 |
} |
| 440 |
UPB_INLINE const struct envoy_type_v3_Int32Range* envoy_config_rbac_v3_Permission_destination_port_range(const envoy_config_rbac_v3_Permission* msg) { |
| 441 |
return UPB_READ_ONEOF(msg, const struct envoy_type_v3_Int32Range*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 11, NULL); |
| 442 |
} |
| 443 |
UPB_INLINE bool envoy_config_rbac_v3_Permission_has_matcher(const envoy_config_rbac_v3_Permission* msg) { |
| 444 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 12; |
| 445 |
} |
| 446 |
UPB_INLINE void envoy_config_rbac_v3_Permission_clear_matcher(const envoy_config_rbac_v3_Permission* msg) { |
| 447 |
UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_TypedExtensionConfig*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_rbac_v3_Permission_rule_NOT_SET); |
| 448 |
} |
| 449 |
UPB_INLINE const struct envoy_config_core_v3_TypedExtensionConfig* envoy_config_rbac_v3_Permission_matcher(const envoy_config_rbac_v3_Permission* msg) { |
| 450 |
return UPB_READ_ONEOF(msg, const struct envoy_config_core_v3_TypedExtensionConfig*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 12, NULL); |
| 451 |
} |
| 452 |
|
| 453 |
UPB_INLINE void envoy_config_rbac_v3_Permission_set_and_rules(envoy_config_rbac_v3_Permission *msg, envoy_config_rbac_v3_Permission_Set* value) { |
| 454 |
UPB_WRITE_ONEOF(msg, envoy_config_rbac_v3_Permission_Set*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 1); |
| 455 |
} |
| 456 |
UPB_INLINE struct envoy_config_rbac_v3_Permission_Set* envoy_config_rbac_v3_Permission_mutable_and_rules(envoy_config_rbac_v3_Permission* msg, upb_Arena* arena) { |
| 457 |
struct envoy_config_rbac_v3_Permission_Set* sub = (struct envoy_config_rbac_v3_Permission_Set*)envoy_config_rbac_v3_Permission_and_rules(msg); |
| 458 |
if (sub == NULL) { |
| 459 |
sub = (struct envoy_config_rbac_v3_Permission_Set*)_upb_Message_New(&envoy_config_rbac_v3_Permission_Set_msginit, arena); |
| 460 |
if (!sub) return NULL; |
| 461 |
envoy_config_rbac_v3_Permission_set_and_rules(msg, sub); |
| 462 |
} |
| 463 |
return sub; |
| 464 |
} |
| 465 |
UPB_INLINE void envoy_config_rbac_v3_Permission_set_or_rules(envoy_config_rbac_v3_Permission *msg, envoy_config_rbac_v3_Permission_Set* value) { |
| 466 |
UPB_WRITE_ONEOF(msg, envoy_config_rbac_v3_Permission_Set*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 2); |
| 467 |
} |
| 468 |
UPB_INLINE struct envoy_config_rbac_v3_Permission_Set* envoy_config_rbac_v3_Permission_mutable_or_rules(envoy_config_rbac_v3_Permission* msg, upb_Arena* arena) { |
| 469 |
struct envoy_config_rbac_v3_Permission_Set* sub = (struct envoy_config_rbac_v3_Permission_Set*)envoy_config_rbac_v3_Permission_or_rules(msg); |
| 470 |
if (sub == NULL) { |
| 471 |
sub = (struct envoy_config_rbac_v3_Permission_Set*)_upb_Message_New(&envoy_config_rbac_v3_Permission_Set_msginit, arena); |
| 472 |
if (!sub) return NULL; |
| 473 |
envoy_config_rbac_v3_Permission_set_or_rules(msg, sub); |
| 474 |
} |
| 475 |
return sub; |
| 476 |
} |
| 477 |
UPB_INLINE void envoy_config_rbac_v3_Permission_set_any(envoy_config_rbac_v3_Permission *msg, bool value) { |
| 478 |
UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 3); |
| 479 |
} |
| 480 |
UPB_INLINE void envoy_config_rbac_v3_Permission_set_header(envoy_config_rbac_v3_Permission *msg, struct envoy_config_route_v3_HeaderMatcher* value) { |
| 481 |
UPB_WRITE_ONEOF(msg, struct envoy_config_route_v3_HeaderMatcher*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 4); |
| 482 |
} |
| 483 |
UPB_INLINE struct envoy_config_route_v3_HeaderMatcher* envoy_config_rbac_v3_Permission_mutable_header(envoy_config_rbac_v3_Permission* msg, upb_Arena* arena) { |
| 484 |
struct envoy_config_route_v3_HeaderMatcher* sub = (struct envoy_config_route_v3_HeaderMatcher*)envoy_config_rbac_v3_Permission_header(msg); |
| 485 |
if (sub == NULL) { |
| 486 |
sub = (struct envoy_config_route_v3_HeaderMatcher*)_upb_Message_New(&envoy_config_route_v3_HeaderMatcher_msginit, arena); |
| 487 |
if (!sub) return NULL; |
| 488 |
envoy_config_rbac_v3_Permission_set_header(msg, sub); |
| 489 |
} |
| 490 |
return sub; |
| 491 |
} |
| 492 |
UPB_INLINE void envoy_config_rbac_v3_Permission_set_destination_ip(envoy_config_rbac_v3_Permission *msg, struct envoy_config_core_v3_CidrRange* value) { |
| 493 |
UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_CidrRange*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 5); |
| 494 |
} |
| 495 |
UPB_INLINE struct envoy_config_core_v3_CidrRange* envoy_config_rbac_v3_Permission_mutable_destination_ip(envoy_config_rbac_v3_Permission* msg, upb_Arena* arena) { |
| 496 |
struct envoy_config_core_v3_CidrRange* sub = (struct envoy_config_core_v3_CidrRange*)envoy_config_rbac_v3_Permission_destination_ip(msg); |
| 497 |
if (sub == NULL) { |
| 498 |
sub = (struct envoy_config_core_v3_CidrRange*)_upb_Message_New(&envoy_config_core_v3_CidrRange_msginit, arena); |
| 499 |
if (!sub) return NULL; |
| 500 |
envoy_config_rbac_v3_Permission_set_destination_ip(msg, sub); |
| 501 |
} |
| 502 |
return sub; |
| 503 |
} |
| 504 |
UPB_INLINE void envoy_config_rbac_v3_Permission_set_destination_port(envoy_config_rbac_v3_Permission *msg, uint32_t value) { |
| 505 |
UPB_WRITE_ONEOF(msg, uint32_t, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 6); |
| 506 |
} |
| 507 |
UPB_INLINE void envoy_config_rbac_v3_Permission_set_metadata(envoy_config_rbac_v3_Permission *msg, struct envoy_type_matcher_v3_MetadataMatcher* value) { |
| 508 |
UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_MetadataMatcher*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 7); |
| 509 |
} |
| 510 |
UPB_INLINE struct envoy_type_matcher_v3_MetadataMatcher* envoy_config_rbac_v3_Permission_mutable_metadata(envoy_config_rbac_v3_Permission* msg, upb_Arena* arena) { |
| 511 |
struct envoy_type_matcher_v3_MetadataMatcher* sub = (struct envoy_type_matcher_v3_MetadataMatcher*)envoy_config_rbac_v3_Permission_metadata(msg); |
| 512 |
if (sub == NULL) { |
| 513 |
sub = (struct envoy_type_matcher_v3_MetadataMatcher*)_upb_Message_New(&envoy_type_matcher_v3_MetadataMatcher_msginit, arena); |
| 514 |
if (!sub) return NULL; |
| 515 |
envoy_config_rbac_v3_Permission_set_metadata(msg, sub); |
| 516 |
} |
| 517 |
return sub; |
| 518 |
} |
| 519 |
UPB_INLINE void envoy_config_rbac_v3_Permission_set_not_rule(envoy_config_rbac_v3_Permission *msg, envoy_config_rbac_v3_Permission* value) { |
| 520 |
UPB_WRITE_ONEOF(msg, envoy_config_rbac_v3_Permission*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 8); |
| 521 |
} |
| 522 |
UPB_INLINE struct envoy_config_rbac_v3_Permission* envoy_config_rbac_v3_Permission_mutable_not_rule(envoy_config_rbac_v3_Permission* msg, upb_Arena* arena) { |
| 523 |
struct envoy_config_rbac_v3_Permission* sub = (struct envoy_config_rbac_v3_Permission*)envoy_config_rbac_v3_Permission_not_rule(msg); |
| 524 |
if (sub == NULL) { |
| 525 |
sub = (struct envoy_config_rbac_v3_Permission*)_upb_Message_New(&envoy_config_rbac_v3_Permission_msginit, arena); |
| 526 |
if (!sub) return NULL; |
| 527 |
envoy_config_rbac_v3_Permission_set_not_rule(msg, sub); |
| 528 |
} |
| 529 |
return sub; |
| 530 |
} |
| 531 |
UPB_INLINE void envoy_config_rbac_v3_Permission_set_requested_server_name(envoy_config_rbac_v3_Permission *msg, struct envoy_type_matcher_v3_StringMatcher* value) { |
| 532 |
UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_StringMatcher*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 9); |
| 533 |
} |
| 534 |
UPB_INLINE struct envoy_type_matcher_v3_StringMatcher* envoy_config_rbac_v3_Permission_mutable_requested_server_name(envoy_config_rbac_v3_Permission* msg, upb_Arena* arena) { |
| 535 |
struct envoy_type_matcher_v3_StringMatcher* sub = (struct envoy_type_matcher_v3_StringMatcher*)envoy_config_rbac_v3_Permission_requested_server_name(msg); |
| 536 |
if (sub == NULL) { |
| 537 |
sub = (struct envoy_type_matcher_v3_StringMatcher*)_upb_Message_New(&envoy_type_matcher_v3_StringMatcher_msginit, arena); |
| 538 |
if (!sub) return NULL; |
| 539 |
envoy_config_rbac_v3_Permission_set_requested_server_name(msg, sub); |
| 540 |
} |
| 541 |
return sub; |
| 542 |
} |
| 543 |
UPB_INLINE void envoy_config_rbac_v3_Permission_set_url_path(envoy_config_rbac_v3_Permission *msg, struct envoy_type_matcher_v3_PathMatcher* value) { |
| 544 |
UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_PathMatcher*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 10); |
| 545 |
} |
| 546 |
UPB_INLINE struct envoy_type_matcher_v3_PathMatcher* envoy_config_rbac_v3_Permission_mutable_url_path(envoy_config_rbac_v3_Permission* msg, upb_Arena* arena) { |
| 547 |
struct envoy_type_matcher_v3_PathMatcher* sub = (struct envoy_type_matcher_v3_PathMatcher*)envoy_config_rbac_v3_Permission_url_path(msg); |
| 548 |
if (sub == NULL) { |
| 549 |
sub = (struct envoy_type_matcher_v3_PathMatcher*)_upb_Message_New(&envoy_type_matcher_v3_PathMatcher_msginit, arena); |
| 550 |
if (!sub) return NULL; |
| 551 |
envoy_config_rbac_v3_Permission_set_url_path(msg, sub); |
| 552 |
} |
| 553 |
return sub; |
| 554 |
} |
| 555 |
UPB_INLINE void envoy_config_rbac_v3_Permission_set_destination_port_range(envoy_config_rbac_v3_Permission *msg, struct envoy_type_v3_Int32Range* value) { |
| 556 |
UPB_WRITE_ONEOF(msg, struct envoy_type_v3_Int32Range*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 11); |
| 557 |
} |
| 558 |
UPB_INLINE struct envoy_type_v3_Int32Range* envoy_config_rbac_v3_Permission_mutable_destination_port_range(envoy_config_rbac_v3_Permission* msg, upb_Arena* arena) { |
| 559 |
struct envoy_type_v3_Int32Range* sub = (struct envoy_type_v3_Int32Range*)envoy_config_rbac_v3_Permission_destination_port_range(msg); |
| 560 |
if (sub == NULL) { |
| 561 |
sub = (struct envoy_type_v3_Int32Range*)_upb_Message_New(&envoy_type_v3_Int32Range_msginit, arena); |
| 562 |
if (!sub) return NULL; |
| 563 |
envoy_config_rbac_v3_Permission_set_destination_port_range(msg, sub); |
| 564 |
} |
| 565 |
return sub; |
| 566 |
} |
| 567 |
UPB_INLINE void envoy_config_rbac_v3_Permission_set_matcher(envoy_config_rbac_v3_Permission *msg, struct envoy_config_core_v3_TypedExtensionConfig* value) { |
| 568 |
UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_TypedExtensionConfig*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 12); |
| 569 |
} |
| 570 |
UPB_INLINE struct envoy_config_core_v3_TypedExtensionConfig* envoy_config_rbac_v3_Permission_mutable_matcher(envoy_config_rbac_v3_Permission* msg, upb_Arena* arena) { |
| 571 |
struct envoy_config_core_v3_TypedExtensionConfig* sub = (struct envoy_config_core_v3_TypedExtensionConfig*)envoy_config_rbac_v3_Permission_matcher(msg); |
| 572 |
if (sub == NULL) { |
| 573 |
sub = (struct envoy_config_core_v3_TypedExtensionConfig*)_upb_Message_New(&envoy_config_core_v3_TypedExtensionConfig_msginit, arena); |
| 574 |
if (!sub) return NULL; |
| 575 |
envoy_config_rbac_v3_Permission_set_matcher(msg, sub); |
| 576 |
} |
| 577 |
return sub; |
| 578 |
} |
| 579 |
|
| 580 |
/* envoy.config.rbac.v3.Permission.Set */ |
| 581 |
|
| 582 |
UPB_INLINE envoy_config_rbac_v3_Permission_Set* envoy_config_rbac_v3_Permission_Set_new(upb_Arena* arena) { |
| 583 |
return (envoy_config_rbac_v3_Permission_Set*)_upb_Message_New(&envoy_config_rbac_v3_Permission_Set_msginit, arena); |
| 584 |
} |
| 585 |
UPB_INLINE envoy_config_rbac_v3_Permission_Set* envoy_config_rbac_v3_Permission_Set_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 586 |
envoy_config_rbac_v3_Permission_Set* ret = envoy_config_rbac_v3_Permission_Set_new(arena); |
| 587 |
if (!ret) return NULL; |
| 588 |
if (upb_Decode(buf, size, ret, &envoy_config_rbac_v3_Permission_Set_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 589 |
return NULL; |
| 590 |
} |
| 591 |
return ret; |
| 592 |
} |
| 593 |
UPB_INLINE envoy_config_rbac_v3_Permission_Set* envoy_config_rbac_v3_Permission_Set_parse_ex(const char* buf, size_t size, |
| 594 |
const upb_ExtensionRegistry* extreg, |
| 595 |
int options, upb_Arena* arena) { |
| 596 |
envoy_config_rbac_v3_Permission_Set* ret = envoy_config_rbac_v3_Permission_Set_new(arena); |
| 597 |
if (!ret) return NULL; |
| 598 |
if (upb_Decode(buf, size, ret, &envoy_config_rbac_v3_Permission_Set_msginit, extreg, options, arena) != |
| 599 |
kUpb_DecodeStatus_Ok) { |
| 600 |
return NULL; |
| 601 |
} |
| 602 |
return ret; |
| 603 |
} |
| 604 |
UPB_INLINE char* envoy_config_rbac_v3_Permission_Set_serialize(const envoy_config_rbac_v3_Permission_Set* msg, upb_Arena* arena, size_t* len) { |
| 605 |
char* ptr; |
| 606 |
(void)upb_Encode(msg, &envoy_config_rbac_v3_Permission_Set_msginit, 0, arena, &ptr, len); |
| 607 |
return ptr; |
| 608 |
} |
| 609 |
UPB_INLINE char* envoy_config_rbac_v3_Permission_Set_serialize_ex(const envoy_config_rbac_v3_Permission_Set* msg, int options, |
| 610 |
upb_Arena* arena, size_t* len) { |
| 611 |
char* ptr; |
| 612 |
(void)upb_Encode(msg, &envoy_config_rbac_v3_Permission_Set_msginit, options, arena, &ptr, len); |
| 613 |
return ptr; |
| 614 |
} |
| 615 |
UPB_INLINE bool envoy_config_rbac_v3_Permission_Set_has_rules(const envoy_config_rbac_v3_Permission_Set* msg) { |
| 616 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); |
| 617 |
} |
| 618 |
UPB_INLINE void envoy_config_rbac_v3_Permission_Set_clear_rules(const envoy_config_rbac_v3_Permission_Set* msg) { |
| 619 |
_upb_array_detach(msg, UPB_SIZE(0, 0)); |
| 620 |
} |
| 621 |
UPB_INLINE const envoy_config_rbac_v3_Permission* const* envoy_config_rbac_v3_Permission_Set_rules(const envoy_config_rbac_v3_Permission_Set* msg, size_t* len) { |
| 622 |
return (const envoy_config_rbac_v3_Permission* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); |
| 623 |
} |
| 624 |
|
| 625 |
UPB_INLINE envoy_config_rbac_v3_Permission** envoy_config_rbac_v3_Permission_Set_mutable_rules(envoy_config_rbac_v3_Permission_Set* msg, size_t* len) { |
| 626 |
return (envoy_config_rbac_v3_Permission**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); |
| 627 |
} |
| 628 |
UPB_INLINE envoy_config_rbac_v3_Permission** envoy_config_rbac_v3_Permission_Set_resize_rules(envoy_config_rbac_v3_Permission_Set* msg, size_t len, upb_Arena* arena) { |
| 629 |
return (envoy_config_rbac_v3_Permission**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena); |
| 630 |
} |
| 631 |
UPB_INLINE struct envoy_config_rbac_v3_Permission* envoy_config_rbac_v3_Permission_Set_add_rules(envoy_config_rbac_v3_Permission_Set* msg, upb_Arena* arena) { |
| 632 |
struct envoy_config_rbac_v3_Permission* sub = (struct envoy_config_rbac_v3_Permission*)_upb_Message_New(&envoy_config_rbac_v3_Permission_msginit, arena); |
| 633 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena); |
| 634 |
if (!ok) return NULL; |
| 635 |
return sub; |
| 636 |
} |
| 637 |
|
| 638 |
/* envoy.config.rbac.v3.Principal */ |
| 639 |
|
| 640 |
UPB_INLINE envoy_config_rbac_v3_Principal* envoy_config_rbac_v3_Principal_new(upb_Arena* arena) { |
| 641 |
return (envoy_config_rbac_v3_Principal*)_upb_Message_New(&envoy_config_rbac_v3_Principal_msginit, arena); |
| 642 |
} |
| 643 |
UPB_INLINE envoy_config_rbac_v3_Principal* envoy_config_rbac_v3_Principal_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 644 |
envoy_config_rbac_v3_Principal* ret = envoy_config_rbac_v3_Principal_new(arena); |
| 645 |
if (!ret) return NULL; |
| 646 |
if (upb_Decode(buf, size, ret, &envoy_config_rbac_v3_Principal_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 647 |
return NULL; |
| 648 |
} |
| 649 |
return ret; |
| 650 |
} |
| 651 |
UPB_INLINE envoy_config_rbac_v3_Principal* envoy_config_rbac_v3_Principal_parse_ex(const char* buf, size_t size, |
| 652 |
const upb_ExtensionRegistry* extreg, |
| 653 |
int options, upb_Arena* arena) { |
| 654 |
envoy_config_rbac_v3_Principal* ret = envoy_config_rbac_v3_Principal_new(arena); |
| 655 |
if (!ret) return NULL; |
| 656 |
if (upb_Decode(buf, size, ret, &envoy_config_rbac_v3_Principal_msginit, extreg, options, arena) != |
| 657 |
kUpb_DecodeStatus_Ok) { |
| 658 |
return NULL; |
| 659 |
} |
| 660 |
return ret; |
| 661 |
} |
| 662 |
UPB_INLINE char* envoy_config_rbac_v3_Principal_serialize(const envoy_config_rbac_v3_Principal* msg, upb_Arena* arena, size_t* len) { |
| 663 |
char* ptr; |
| 664 |
(void)upb_Encode(msg, &envoy_config_rbac_v3_Principal_msginit, 0, arena, &ptr, len); |
| 665 |
return ptr; |
| 666 |
} |
| 667 |
UPB_INLINE char* envoy_config_rbac_v3_Principal_serialize_ex(const envoy_config_rbac_v3_Principal* msg, int options, |
| 668 |
upb_Arena* arena, size_t* len) { |
| 669 |
char* ptr; |
| 670 |
(void)upb_Encode(msg, &envoy_config_rbac_v3_Principal_msginit, options, arena, &ptr, len); |
| 671 |
return ptr; |
| 672 |
} |
| 673 |
typedef enum { |
| 674 |
envoy_config_rbac_v3_Principal_identifier_and_ids = 1, |
| 675 |
envoy_config_rbac_v3_Principal_identifier_or_ids = 2, |
| 676 |
envoy_config_rbac_v3_Principal_identifier_any = 3, |
| 677 |
envoy_config_rbac_v3_Principal_identifier_authenticated = 4, |
| 678 |
envoy_config_rbac_v3_Principal_identifier_source_ip = 5, |
| 679 |
envoy_config_rbac_v3_Principal_identifier_direct_remote_ip = 10, |
| 680 |
envoy_config_rbac_v3_Principal_identifier_remote_ip = 11, |
| 681 |
envoy_config_rbac_v3_Principal_identifier_header = 6, |
| 682 |
envoy_config_rbac_v3_Principal_identifier_url_path = 9, |
| 683 |
envoy_config_rbac_v3_Principal_identifier_metadata = 7, |
| 684 |
envoy_config_rbac_v3_Principal_identifier_not_id = 8, |
| 685 |
envoy_config_rbac_v3_Principal_identifier_NOT_SET = 0 |
| 686 |
} envoy_config_rbac_v3_Principal_identifier_oneofcases; |
| 687 |
UPB_INLINE envoy_config_rbac_v3_Principal_identifier_oneofcases envoy_config_rbac_v3_Principal_identifier_case(const envoy_config_rbac_v3_Principal* msg) { |
| 688 |
return (envoy_config_rbac_v3_Principal_identifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); |
| 689 |
} |
| 690 |
UPB_INLINE bool envoy_config_rbac_v3_Principal_has_and_ids(const envoy_config_rbac_v3_Principal* msg) { |
| 691 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 1; |
| 692 |
} |
| 693 |
UPB_INLINE void envoy_config_rbac_v3_Principal_clear_and_ids(const envoy_config_rbac_v3_Principal* msg) { |
| 694 |
UPB_WRITE_ONEOF(msg, envoy_config_rbac_v3_Principal_Set*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_rbac_v3_Principal_identifier_NOT_SET); |
| 695 |
} |
| 696 |
UPB_INLINE const envoy_config_rbac_v3_Principal_Set* envoy_config_rbac_v3_Principal_and_ids(const envoy_config_rbac_v3_Principal* msg) { |
| 697 |
return UPB_READ_ONEOF(msg, const envoy_config_rbac_v3_Principal_Set*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 1, NULL); |
| 698 |
} |
| 699 |
UPB_INLINE bool envoy_config_rbac_v3_Principal_has_or_ids(const envoy_config_rbac_v3_Principal* msg) { |
| 700 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 2; |
| 701 |
} |
| 702 |
UPB_INLINE void envoy_config_rbac_v3_Principal_clear_or_ids(const envoy_config_rbac_v3_Principal* msg) { |
| 703 |
UPB_WRITE_ONEOF(msg, envoy_config_rbac_v3_Principal_Set*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_rbac_v3_Principal_identifier_NOT_SET); |
| 704 |
} |
| 705 |
UPB_INLINE const envoy_config_rbac_v3_Principal_Set* envoy_config_rbac_v3_Principal_or_ids(const envoy_config_rbac_v3_Principal* msg) { |
| 706 |
return UPB_READ_ONEOF(msg, const envoy_config_rbac_v3_Principal_Set*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 2, NULL); |
| 707 |
} |
| 708 |
UPB_INLINE bool envoy_config_rbac_v3_Principal_has_any(const envoy_config_rbac_v3_Principal* msg) { |
| 709 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 3; |
| 710 |
} |
| 711 |
UPB_INLINE void envoy_config_rbac_v3_Principal_clear_any(const envoy_config_rbac_v3_Principal* msg) { |
| 712 |
UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_rbac_v3_Principal_identifier_NOT_SET); |
| 713 |
} |
| 714 |
UPB_INLINE bool envoy_config_rbac_v3_Principal_any(const envoy_config_rbac_v3_Principal* msg) { |
| 715 |
return UPB_READ_ONEOF(msg, bool, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 3, false); |
| 716 |
} |
| 717 |
UPB_INLINE bool envoy_config_rbac_v3_Principal_has_authenticated(const envoy_config_rbac_v3_Principal* msg) { |
| 718 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 4; |
| 719 |
} |
| 720 |
UPB_INLINE void envoy_config_rbac_v3_Principal_clear_authenticated(const envoy_config_rbac_v3_Principal* msg) { |
| 721 |
UPB_WRITE_ONEOF(msg, envoy_config_rbac_v3_Principal_Authenticated*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_rbac_v3_Principal_identifier_NOT_SET); |
| 722 |
} |
| 723 |
UPB_INLINE const envoy_config_rbac_v3_Principal_Authenticated* envoy_config_rbac_v3_Principal_authenticated(const envoy_config_rbac_v3_Principal* msg) { |
| 724 |
return UPB_READ_ONEOF(msg, const envoy_config_rbac_v3_Principal_Authenticated*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 4, NULL); |
| 725 |
} |
| 726 |
UPB_INLINE bool envoy_config_rbac_v3_Principal_has_source_ip(const envoy_config_rbac_v3_Principal* msg) { |
| 727 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 5; |
| 728 |
} |
| 729 |
UPB_INLINE void envoy_config_rbac_v3_Principal_clear_source_ip(const envoy_config_rbac_v3_Principal* msg) { |
| 730 |
UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_CidrRange*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_rbac_v3_Principal_identifier_NOT_SET); |
| 731 |
} |
| 732 |
UPB_INLINE const struct envoy_config_core_v3_CidrRange* envoy_config_rbac_v3_Principal_source_ip(const envoy_config_rbac_v3_Principal* msg) { |
| 733 |
return UPB_READ_ONEOF(msg, const struct envoy_config_core_v3_CidrRange*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 5, NULL); |
| 734 |
} |
| 735 |
UPB_INLINE bool envoy_config_rbac_v3_Principal_has_header(const envoy_config_rbac_v3_Principal* msg) { |
| 736 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 6; |
| 737 |
} |
| 738 |
UPB_INLINE void envoy_config_rbac_v3_Principal_clear_header(const envoy_config_rbac_v3_Principal* msg) { |
| 739 |
UPB_WRITE_ONEOF(msg, struct envoy_config_route_v3_HeaderMatcher*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_rbac_v3_Principal_identifier_NOT_SET); |
| 740 |
} |
| 741 |
UPB_INLINE const struct envoy_config_route_v3_HeaderMatcher* envoy_config_rbac_v3_Principal_header(const envoy_config_rbac_v3_Principal* msg) { |
| 742 |
return UPB_READ_ONEOF(msg, const struct envoy_config_route_v3_HeaderMatcher*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 6, NULL); |
| 743 |
} |
| 744 |
UPB_INLINE bool envoy_config_rbac_v3_Principal_has_metadata(const envoy_config_rbac_v3_Principal* msg) { |
| 745 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 7; |
| 746 |
} |
| 747 |
UPB_INLINE void envoy_config_rbac_v3_Principal_clear_metadata(const envoy_config_rbac_v3_Principal* msg) { |
| 748 |
UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_MetadataMatcher*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_rbac_v3_Principal_identifier_NOT_SET); |
| 749 |
} |
| 750 |
UPB_INLINE const struct envoy_type_matcher_v3_MetadataMatcher* envoy_config_rbac_v3_Principal_metadata(const envoy_config_rbac_v3_Principal* msg) { |
| 751 |
return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_v3_MetadataMatcher*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 7, NULL); |
| 752 |
} |
| 753 |
UPB_INLINE bool envoy_config_rbac_v3_Principal_has_not_id(const envoy_config_rbac_v3_Principal* msg) { |
| 754 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 8; |
| 755 |
} |
| 756 |
UPB_INLINE void envoy_config_rbac_v3_Principal_clear_not_id(const envoy_config_rbac_v3_Principal* msg) { |
| 757 |
UPB_WRITE_ONEOF(msg, envoy_config_rbac_v3_Principal*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_rbac_v3_Principal_identifier_NOT_SET); |
| 758 |
} |
| 759 |
UPB_INLINE const envoy_config_rbac_v3_Principal* envoy_config_rbac_v3_Principal_not_id(const envoy_config_rbac_v3_Principal* msg) { |
| 760 |
return UPB_READ_ONEOF(msg, const envoy_config_rbac_v3_Principal*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 8, NULL); |
| 761 |
} |
| 762 |
UPB_INLINE bool envoy_config_rbac_v3_Principal_has_url_path(const envoy_config_rbac_v3_Principal* msg) { |
| 763 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 9; |
| 764 |
} |
| 765 |
UPB_INLINE void envoy_config_rbac_v3_Principal_clear_url_path(const envoy_config_rbac_v3_Principal* msg) { |
| 766 |
UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_PathMatcher*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_rbac_v3_Principal_identifier_NOT_SET); |
| 767 |
} |
| 768 |
UPB_INLINE const struct envoy_type_matcher_v3_PathMatcher* envoy_config_rbac_v3_Principal_url_path(const envoy_config_rbac_v3_Principal* msg) { |
| 769 |
return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_v3_PathMatcher*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 9, NULL); |
| 770 |
} |
| 771 |
UPB_INLINE bool envoy_config_rbac_v3_Principal_has_direct_remote_ip(const envoy_config_rbac_v3_Principal* msg) { |
| 772 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 10; |
| 773 |
} |
| 774 |
UPB_INLINE void envoy_config_rbac_v3_Principal_clear_direct_remote_ip(const envoy_config_rbac_v3_Principal* msg) { |
| 775 |
UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_CidrRange*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_rbac_v3_Principal_identifier_NOT_SET); |
| 776 |
} |
| 777 |
UPB_INLINE const struct envoy_config_core_v3_CidrRange* envoy_config_rbac_v3_Principal_direct_remote_ip(const envoy_config_rbac_v3_Principal* msg) { |
| 778 |
return UPB_READ_ONEOF(msg, const struct envoy_config_core_v3_CidrRange*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 10, NULL); |
| 779 |
} |
| 780 |
UPB_INLINE bool envoy_config_rbac_v3_Principal_has_remote_ip(const envoy_config_rbac_v3_Principal* msg) { |
| 781 |
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 11; |
| 782 |
} |
| 783 |
UPB_INLINE void envoy_config_rbac_v3_Principal_clear_remote_ip(const envoy_config_rbac_v3_Principal* msg) { |
| 784 |
UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_CidrRange*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_config_rbac_v3_Principal_identifier_NOT_SET); |
| 785 |
} |
| 786 |
UPB_INLINE const struct envoy_config_core_v3_CidrRange* envoy_config_rbac_v3_Principal_remote_ip(const envoy_config_rbac_v3_Principal* msg) { |
| 787 |
return UPB_READ_ONEOF(msg, const struct envoy_config_core_v3_CidrRange*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 11, NULL); |
| 788 |
} |
| 789 |
|
| 790 |
UPB_INLINE void envoy_config_rbac_v3_Principal_set_and_ids(envoy_config_rbac_v3_Principal *msg, envoy_config_rbac_v3_Principal_Set* value) { |
| 791 |
UPB_WRITE_ONEOF(msg, envoy_config_rbac_v3_Principal_Set*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 1); |
| 792 |
} |
| 793 |
UPB_INLINE struct envoy_config_rbac_v3_Principal_Set* envoy_config_rbac_v3_Principal_mutable_and_ids(envoy_config_rbac_v3_Principal* msg, upb_Arena* arena) { |
| 794 |
struct envoy_config_rbac_v3_Principal_Set* sub = (struct envoy_config_rbac_v3_Principal_Set*)envoy_config_rbac_v3_Principal_and_ids(msg); |
| 795 |
if (sub == NULL) { |
| 796 |
sub = (struct envoy_config_rbac_v3_Principal_Set*)_upb_Message_New(&envoy_config_rbac_v3_Principal_Set_msginit, arena); |
| 797 |
if (!sub) return NULL; |
| 798 |
envoy_config_rbac_v3_Principal_set_and_ids(msg, sub); |
| 799 |
} |
| 800 |
return sub; |
| 801 |
} |
| 802 |
UPB_INLINE void envoy_config_rbac_v3_Principal_set_or_ids(envoy_config_rbac_v3_Principal *msg, envoy_config_rbac_v3_Principal_Set* value) { |
| 803 |
UPB_WRITE_ONEOF(msg, envoy_config_rbac_v3_Principal_Set*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 2); |
| 804 |
} |
| 805 |
UPB_INLINE struct envoy_config_rbac_v3_Principal_Set* envoy_config_rbac_v3_Principal_mutable_or_ids(envoy_config_rbac_v3_Principal* msg, upb_Arena* arena) { |
| 806 |
struct envoy_config_rbac_v3_Principal_Set* sub = (struct envoy_config_rbac_v3_Principal_Set*)envoy_config_rbac_v3_Principal_or_ids(msg); |
| 807 |
if (sub == NULL) { |
| 808 |
sub = (struct envoy_config_rbac_v3_Principal_Set*)_upb_Message_New(&envoy_config_rbac_v3_Principal_Set_msginit, arena); |
| 809 |
if (!sub) return NULL; |
| 810 |
envoy_config_rbac_v3_Principal_set_or_ids(msg, sub); |
| 811 |
} |
| 812 |
return sub; |
| 813 |
} |
| 814 |
UPB_INLINE void envoy_config_rbac_v3_Principal_set_any(envoy_config_rbac_v3_Principal *msg, bool value) { |
| 815 |
UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 3); |
| 816 |
} |
| 817 |
UPB_INLINE void envoy_config_rbac_v3_Principal_set_authenticated(envoy_config_rbac_v3_Principal *msg, envoy_config_rbac_v3_Principal_Authenticated* value) { |
| 818 |
UPB_WRITE_ONEOF(msg, envoy_config_rbac_v3_Principal_Authenticated*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 4); |
| 819 |
} |
| 820 |
UPB_INLINE struct envoy_config_rbac_v3_Principal_Authenticated* envoy_config_rbac_v3_Principal_mutable_authenticated(envoy_config_rbac_v3_Principal* msg, upb_Arena* arena) { |
| 821 |
struct envoy_config_rbac_v3_Principal_Authenticated* sub = (struct envoy_config_rbac_v3_Principal_Authenticated*)envoy_config_rbac_v3_Principal_authenticated(msg); |
| 822 |
if (sub == NULL) { |
| 823 |
sub = (struct envoy_config_rbac_v3_Principal_Authenticated*)_upb_Message_New(&envoy_config_rbac_v3_Principal_Authenticated_msginit, arena); |
| 824 |
if (!sub) return NULL; |
| 825 |
envoy_config_rbac_v3_Principal_set_authenticated(msg, sub); |
| 826 |
} |
| 827 |
return sub; |
| 828 |
} |
| 829 |
UPB_INLINE void envoy_config_rbac_v3_Principal_set_source_ip(envoy_config_rbac_v3_Principal *msg, struct envoy_config_core_v3_CidrRange* value) { |
| 830 |
UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_CidrRange*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 5); |
| 831 |
} |
| 832 |
UPB_INLINE struct envoy_config_core_v3_CidrRange* envoy_config_rbac_v3_Principal_mutable_source_ip(envoy_config_rbac_v3_Principal* msg, upb_Arena* arena) { |
| 833 |
struct envoy_config_core_v3_CidrRange* sub = (struct envoy_config_core_v3_CidrRange*)envoy_config_rbac_v3_Principal_source_ip(msg); |
| 834 |
if (sub == NULL) { |
| 835 |
sub = (struct envoy_config_core_v3_CidrRange*)_upb_Message_New(&envoy_config_core_v3_CidrRange_msginit, arena); |
| 836 |
if (!sub) return NULL; |
| 837 |
envoy_config_rbac_v3_Principal_set_source_ip(msg, sub); |
| 838 |
} |
| 839 |
return sub; |
| 840 |
} |
| 841 |
UPB_INLINE void envoy_config_rbac_v3_Principal_set_header(envoy_config_rbac_v3_Principal *msg, struct envoy_config_route_v3_HeaderMatcher* value) { |
| 842 |
UPB_WRITE_ONEOF(msg, struct envoy_config_route_v3_HeaderMatcher*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 6); |
| 843 |
} |
| 844 |
UPB_INLINE struct envoy_config_route_v3_HeaderMatcher* envoy_config_rbac_v3_Principal_mutable_header(envoy_config_rbac_v3_Principal* msg, upb_Arena* arena) { |
| 845 |
struct envoy_config_route_v3_HeaderMatcher* sub = (struct envoy_config_route_v3_HeaderMatcher*)envoy_config_rbac_v3_Principal_header(msg); |
| 846 |
if (sub == NULL) { |
| 847 |
sub = (struct envoy_config_route_v3_HeaderMatcher*)_upb_Message_New(&envoy_config_route_v3_HeaderMatcher_msginit, arena); |
| 848 |
if (!sub) return NULL; |
| 849 |
envoy_config_rbac_v3_Principal_set_header(msg, sub); |
| 850 |
} |
| 851 |
return sub; |
| 852 |
} |
| 853 |
UPB_INLINE void envoy_config_rbac_v3_Principal_set_metadata(envoy_config_rbac_v3_Principal *msg, struct envoy_type_matcher_v3_MetadataMatcher* value) { |
| 854 |
UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_MetadataMatcher*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 7); |
| 855 |
} |
| 856 |
UPB_INLINE struct envoy_type_matcher_v3_MetadataMatcher* envoy_config_rbac_v3_Principal_mutable_metadata(envoy_config_rbac_v3_Principal* msg, upb_Arena* arena) { |
| 857 |
struct envoy_type_matcher_v3_MetadataMatcher* sub = (struct envoy_type_matcher_v3_MetadataMatcher*)envoy_config_rbac_v3_Principal_metadata(msg); |
| 858 |
if (sub == NULL) { |
| 859 |
sub = (struct envoy_type_matcher_v3_MetadataMatcher*)_upb_Message_New(&envoy_type_matcher_v3_MetadataMatcher_msginit, arena); |
| 860 |
if (!sub) return NULL; |
| 861 |
envoy_config_rbac_v3_Principal_set_metadata(msg, sub); |
| 862 |
} |
| 863 |
return sub; |
| 864 |
} |
| 865 |
UPB_INLINE void envoy_config_rbac_v3_Principal_set_not_id(envoy_config_rbac_v3_Principal *msg, envoy_config_rbac_v3_Principal* value) { |
| 866 |
UPB_WRITE_ONEOF(msg, envoy_config_rbac_v3_Principal*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 8); |
| 867 |
} |
| 868 |
UPB_INLINE struct envoy_config_rbac_v3_Principal* envoy_config_rbac_v3_Principal_mutable_not_id(envoy_config_rbac_v3_Principal* msg, upb_Arena* arena) { |
| 869 |
struct envoy_config_rbac_v3_Principal* sub = (struct envoy_config_rbac_v3_Principal*)envoy_config_rbac_v3_Principal_not_id(msg); |
| 870 |
if (sub == NULL) { |
| 871 |
sub = (struct envoy_config_rbac_v3_Principal*)_upb_Message_New(&envoy_config_rbac_v3_Principal_msginit, arena); |
| 872 |
if (!sub) return NULL; |
| 873 |
envoy_config_rbac_v3_Principal_set_not_id(msg, sub); |
| 874 |
} |
| 875 |
return sub; |
| 876 |
} |
| 877 |
UPB_INLINE void envoy_config_rbac_v3_Principal_set_url_path(envoy_config_rbac_v3_Principal *msg, struct envoy_type_matcher_v3_PathMatcher* value) { |
| 878 |
UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_PathMatcher*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 9); |
| 879 |
} |
| 880 |
UPB_INLINE struct envoy_type_matcher_v3_PathMatcher* envoy_config_rbac_v3_Principal_mutable_url_path(envoy_config_rbac_v3_Principal* msg, upb_Arena* arena) { |
| 881 |
struct envoy_type_matcher_v3_PathMatcher* sub = (struct envoy_type_matcher_v3_PathMatcher*)envoy_config_rbac_v3_Principal_url_path(msg); |
| 882 |
if (sub == NULL) { |
| 883 |
sub = (struct envoy_type_matcher_v3_PathMatcher*)_upb_Message_New(&envoy_type_matcher_v3_PathMatcher_msginit, arena); |
| 884 |
if (!sub) return NULL; |
| 885 |
envoy_config_rbac_v3_Principal_set_url_path(msg, sub); |
| 886 |
} |
| 887 |
return sub; |
| 888 |
} |
| 889 |
UPB_INLINE void envoy_config_rbac_v3_Principal_set_direct_remote_ip(envoy_config_rbac_v3_Principal *msg, struct envoy_config_core_v3_CidrRange* value) { |
| 890 |
UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_CidrRange*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 10); |
| 891 |
} |
| 892 |
UPB_INLINE struct envoy_config_core_v3_CidrRange* envoy_config_rbac_v3_Principal_mutable_direct_remote_ip(envoy_config_rbac_v3_Principal* msg, upb_Arena* arena) { |
| 893 |
struct envoy_config_core_v3_CidrRange* sub = (struct envoy_config_core_v3_CidrRange*)envoy_config_rbac_v3_Principal_direct_remote_ip(msg); |
| 894 |
if (sub == NULL) { |
| 895 |
sub = (struct envoy_config_core_v3_CidrRange*)_upb_Message_New(&envoy_config_core_v3_CidrRange_msginit, arena); |
| 896 |
if (!sub) return NULL; |
| 897 |
envoy_config_rbac_v3_Principal_set_direct_remote_ip(msg, sub); |
| 898 |
} |
| 899 |
return sub; |
| 900 |
} |
| 901 |
UPB_INLINE void envoy_config_rbac_v3_Principal_set_remote_ip(envoy_config_rbac_v3_Principal *msg, struct envoy_config_core_v3_CidrRange* value) { |
| 902 |
UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_CidrRange*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 11); |
| 903 |
} |
| 904 |
UPB_INLINE struct envoy_config_core_v3_CidrRange* envoy_config_rbac_v3_Principal_mutable_remote_ip(envoy_config_rbac_v3_Principal* msg, upb_Arena* arena) { |
| 905 |
struct envoy_config_core_v3_CidrRange* sub = (struct envoy_config_core_v3_CidrRange*)envoy_config_rbac_v3_Principal_remote_ip(msg); |
| 906 |
if (sub == NULL) { |
| 907 |
sub = (struct envoy_config_core_v3_CidrRange*)_upb_Message_New(&envoy_config_core_v3_CidrRange_msginit, arena); |
| 908 |
if (!sub) return NULL; |
| 909 |
envoy_config_rbac_v3_Principal_set_remote_ip(msg, sub); |
| 910 |
} |
| 911 |
return sub; |
| 912 |
} |
| 913 |
|
| 914 |
/* envoy.config.rbac.v3.Principal.Set */ |
| 915 |
|
| 916 |
UPB_INLINE envoy_config_rbac_v3_Principal_Set* envoy_config_rbac_v3_Principal_Set_new(upb_Arena* arena) { |
| 917 |
return (envoy_config_rbac_v3_Principal_Set*)_upb_Message_New(&envoy_config_rbac_v3_Principal_Set_msginit, arena); |
| 918 |
} |
| 919 |
UPB_INLINE envoy_config_rbac_v3_Principal_Set* envoy_config_rbac_v3_Principal_Set_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 920 |
envoy_config_rbac_v3_Principal_Set* ret = envoy_config_rbac_v3_Principal_Set_new(arena); |
| 921 |
if (!ret) return NULL; |
| 922 |
if (upb_Decode(buf, size, ret, &envoy_config_rbac_v3_Principal_Set_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 923 |
return NULL; |
| 924 |
} |
| 925 |
return ret; |
| 926 |
} |
| 927 |
UPB_INLINE envoy_config_rbac_v3_Principal_Set* envoy_config_rbac_v3_Principal_Set_parse_ex(const char* buf, size_t size, |
| 928 |
const upb_ExtensionRegistry* extreg, |
| 929 |
int options, upb_Arena* arena) { |
| 930 |
envoy_config_rbac_v3_Principal_Set* ret = envoy_config_rbac_v3_Principal_Set_new(arena); |
| 931 |
if (!ret) return NULL; |
| 932 |
if (upb_Decode(buf, size, ret, &envoy_config_rbac_v3_Principal_Set_msginit, extreg, options, arena) != |
| 933 |
kUpb_DecodeStatus_Ok) { |
| 934 |
return NULL; |
| 935 |
} |
| 936 |
return ret; |
| 937 |
} |
| 938 |
UPB_INLINE char* envoy_config_rbac_v3_Principal_Set_serialize(const envoy_config_rbac_v3_Principal_Set* msg, upb_Arena* arena, size_t* len) { |
| 939 |
char* ptr; |
| 940 |
(void)upb_Encode(msg, &envoy_config_rbac_v3_Principal_Set_msginit, 0, arena, &ptr, len); |
| 941 |
return ptr; |
| 942 |
} |
| 943 |
UPB_INLINE char* envoy_config_rbac_v3_Principal_Set_serialize_ex(const envoy_config_rbac_v3_Principal_Set* msg, int options, |
| 944 |
upb_Arena* arena, size_t* len) { |
| 945 |
char* ptr; |
| 946 |
(void)upb_Encode(msg, &envoy_config_rbac_v3_Principal_Set_msginit, options, arena, &ptr, len); |
| 947 |
return ptr; |
| 948 |
} |
| 949 |
UPB_INLINE bool envoy_config_rbac_v3_Principal_Set_has_ids(const envoy_config_rbac_v3_Principal_Set* msg) { |
| 950 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); |
| 951 |
} |
| 952 |
UPB_INLINE void envoy_config_rbac_v3_Principal_Set_clear_ids(const envoy_config_rbac_v3_Principal_Set* msg) { |
| 953 |
_upb_array_detach(msg, UPB_SIZE(0, 0)); |
| 954 |
} |
| 955 |
UPB_INLINE const envoy_config_rbac_v3_Principal* const* envoy_config_rbac_v3_Principal_Set_ids(const envoy_config_rbac_v3_Principal_Set* msg, size_t* len) { |
| 956 |
return (const envoy_config_rbac_v3_Principal* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); |
| 957 |
} |
| 958 |
|
| 959 |
UPB_INLINE envoy_config_rbac_v3_Principal** envoy_config_rbac_v3_Principal_Set_mutable_ids(envoy_config_rbac_v3_Principal_Set* msg, size_t* len) { |
| 960 |
return (envoy_config_rbac_v3_Principal**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); |
| 961 |
} |
| 962 |
UPB_INLINE envoy_config_rbac_v3_Principal** envoy_config_rbac_v3_Principal_Set_resize_ids(envoy_config_rbac_v3_Principal_Set* msg, size_t len, upb_Arena* arena) { |
| 963 |
return (envoy_config_rbac_v3_Principal**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena); |
| 964 |
} |
| 965 |
UPB_INLINE struct envoy_config_rbac_v3_Principal* envoy_config_rbac_v3_Principal_Set_add_ids(envoy_config_rbac_v3_Principal_Set* msg, upb_Arena* arena) { |
| 966 |
struct envoy_config_rbac_v3_Principal* sub = (struct envoy_config_rbac_v3_Principal*)_upb_Message_New(&envoy_config_rbac_v3_Principal_msginit, arena); |
| 967 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena); |
| 968 |
if (!ok) return NULL; |
| 969 |
return sub; |
| 970 |
} |
| 971 |
|
| 972 |
/* envoy.config.rbac.v3.Principal.Authenticated */ |
| 973 |
|
| 974 |
UPB_INLINE envoy_config_rbac_v3_Principal_Authenticated* envoy_config_rbac_v3_Principal_Authenticated_new(upb_Arena* arena) { |
| 975 |
return (envoy_config_rbac_v3_Principal_Authenticated*)_upb_Message_New(&envoy_config_rbac_v3_Principal_Authenticated_msginit, arena); |
| 976 |
} |
| 977 |
UPB_INLINE envoy_config_rbac_v3_Principal_Authenticated* envoy_config_rbac_v3_Principal_Authenticated_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 978 |
envoy_config_rbac_v3_Principal_Authenticated* ret = envoy_config_rbac_v3_Principal_Authenticated_new(arena); |
| 979 |
if (!ret) return NULL; |
| 980 |
if (upb_Decode(buf, size, ret, &envoy_config_rbac_v3_Principal_Authenticated_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 981 |
return NULL; |
| 982 |
} |
| 983 |
return ret; |
| 984 |
} |
| 985 |
UPB_INLINE envoy_config_rbac_v3_Principal_Authenticated* envoy_config_rbac_v3_Principal_Authenticated_parse_ex(const char* buf, size_t size, |
| 986 |
const upb_ExtensionRegistry* extreg, |
| 987 |
int options, upb_Arena* arena) { |
| 988 |
envoy_config_rbac_v3_Principal_Authenticated* ret = envoy_config_rbac_v3_Principal_Authenticated_new(arena); |
| 989 |
if (!ret) return NULL; |
| 990 |
if (upb_Decode(buf, size, ret, &envoy_config_rbac_v3_Principal_Authenticated_msginit, extreg, options, arena) != |
| 991 |
kUpb_DecodeStatus_Ok) { |
| 992 |
return NULL; |
| 993 |
} |
| 994 |
return ret; |
| 995 |
} |
| 996 |
UPB_INLINE char* envoy_config_rbac_v3_Principal_Authenticated_serialize(const envoy_config_rbac_v3_Principal_Authenticated* msg, upb_Arena* arena, size_t* len) { |
| 997 |
char* ptr; |
| 998 |
(void)upb_Encode(msg, &envoy_config_rbac_v3_Principal_Authenticated_msginit, 0, arena, &ptr, len); |
| 999 |
return ptr; |
| 1000 |
} |
| 1001 |
UPB_INLINE char* envoy_config_rbac_v3_Principal_Authenticated_serialize_ex(const envoy_config_rbac_v3_Principal_Authenticated* msg, int options, |
| 1002 |
upb_Arena* arena, size_t* len) { |
| 1003 |
char* ptr; |
| 1004 |
(void)upb_Encode(msg, &envoy_config_rbac_v3_Principal_Authenticated_msginit, options, arena, &ptr, len); |
| 1005 |
return ptr; |
| 1006 |
} |
| 1007 |
UPB_INLINE bool envoy_config_rbac_v3_Principal_Authenticated_has_principal_name(const envoy_config_rbac_v3_Principal_Authenticated* msg) { |
| 1008 |
return _upb_hasbit(msg, 1); |
| 1009 |
} |
| 1010 |
UPB_INLINE void envoy_config_rbac_v3_Principal_Authenticated_clear_principal_name(const envoy_config_rbac_v3_Principal_Authenticated* msg) { |
| 1011 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), const upb_Message*) = NULL; |
| 1012 |
} |
| 1013 |
UPB_INLINE const struct envoy_type_matcher_v3_StringMatcher* envoy_config_rbac_v3_Principal_Authenticated_principal_name(const envoy_config_rbac_v3_Principal_Authenticated* msg) { |
| 1014 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_type_matcher_v3_StringMatcher*); |
| 1015 |
} |
| 1016 |
|
| 1017 |
UPB_INLINE void envoy_config_rbac_v3_Principal_Authenticated_set_principal_name(envoy_config_rbac_v3_Principal_Authenticated *msg, struct envoy_type_matcher_v3_StringMatcher* value) { |
| 1018 |
_upb_sethas(msg, 1); |
| 1019 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_type_matcher_v3_StringMatcher*) = value; |
| 1020 |
} |
| 1021 |
UPB_INLINE struct envoy_type_matcher_v3_StringMatcher* envoy_config_rbac_v3_Principal_Authenticated_mutable_principal_name(envoy_config_rbac_v3_Principal_Authenticated* msg, upb_Arena* arena) { |
| 1022 |
struct envoy_type_matcher_v3_StringMatcher* sub = (struct envoy_type_matcher_v3_StringMatcher*)envoy_config_rbac_v3_Principal_Authenticated_principal_name(msg); |
| 1023 |
if (sub == NULL) { |
| 1024 |
sub = (struct envoy_type_matcher_v3_StringMatcher*)_upb_Message_New(&envoy_type_matcher_v3_StringMatcher_msginit, arena); |
| 1025 |
if (!sub) return NULL; |
| 1026 |
envoy_config_rbac_v3_Principal_Authenticated_set_principal_name(msg, sub); |
| 1027 |
} |
| 1028 |
return sub; |
| 1029 |
} |
| 1030 |
|
| 1031 |
/* envoy.config.rbac.v3.Action */ |
| 1032 |
|
| 1033 |
UPB_INLINE envoy_config_rbac_v3_Action* envoy_config_rbac_v3_Action_new(upb_Arena* arena) { |
| 1034 |
return (envoy_config_rbac_v3_Action*)_upb_Message_New(&envoy_config_rbac_v3_Action_msginit, arena); |
| 1035 |
} |
| 1036 |
UPB_INLINE envoy_config_rbac_v3_Action* envoy_config_rbac_v3_Action_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 1037 |
envoy_config_rbac_v3_Action* ret = envoy_config_rbac_v3_Action_new(arena); |
| 1038 |
if (!ret) return NULL; |
| 1039 |
if (upb_Decode(buf, size, ret, &envoy_config_rbac_v3_Action_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 1040 |
return NULL; |
| 1041 |
} |
| 1042 |
return ret; |
| 1043 |
} |
| 1044 |
UPB_INLINE envoy_config_rbac_v3_Action* envoy_config_rbac_v3_Action_parse_ex(const char* buf, size_t size, |
| 1045 |
const upb_ExtensionRegistry* extreg, |
| 1046 |
int options, upb_Arena* arena) { |
| 1047 |
envoy_config_rbac_v3_Action* ret = envoy_config_rbac_v3_Action_new(arena); |
| 1048 |
if (!ret) return NULL; |
| 1049 |
if (upb_Decode(buf, size, ret, &envoy_config_rbac_v3_Action_msginit, extreg, options, arena) != |
| 1050 |
kUpb_DecodeStatus_Ok) { |
| 1051 |
return NULL; |
| 1052 |
} |
| 1053 |
return ret; |
| 1054 |
} |
| 1055 |
UPB_INLINE char* envoy_config_rbac_v3_Action_serialize(const envoy_config_rbac_v3_Action* msg, upb_Arena* arena, size_t* len) { |
| 1056 |
char* ptr; |
| 1057 |
(void)upb_Encode(msg, &envoy_config_rbac_v3_Action_msginit, 0, arena, &ptr, len); |
| 1058 |
return ptr; |
| 1059 |
} |
| 1060 |
UPB_INLINE char* envoy_config_rbac_v3_Action_serialize_ex(const envoy_config_rbac_v3_Action* msg, int options, |
| 1061 |
upb_Arena* arena, size_t* len) { |
| 1062 |
char* ptr; |
| 1063 |
(void)upb_Encode(msg, &envoy_config_rbac_v3_Action_msginit, options, arena, &ptr, len); |
| 1064 |
return ptr; |
| 1065 |
} |
| 1066 |
UPB_INLINE void envoy_config_rbac_v3_Action_clear_name(const envoy_config_rbac_v3_Action* msg) { |
| 1067 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 1068 |
} |
| 1069 |
UPB_INLINE upb_StringView envoy_config_rbac_v3_Action_name(const envoy_config_rbac_v3_Action* msg) { |
| 1070 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView); |
| 1071 |
} |
| 1072 |
UPB_INLINE void envoy_config_rbac_v3_Action_clear_action(const envoy_config_rbac_v3_Action* msg) { |
| 1073 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = 0; |
| 1074 |
} |
| 1075 |
UPB_INLINE int32_t envoy_config_rbac_v3_Action_action(const envoy_config_rbac_v3_Action* msg) { |
| 1076 |
return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); |
| 1077 |
} |
| 1078 |
|
| 1079 |
UPB_INLINE void envoy_config_rbac_v3_Action_set_name(envoy_config_rbac_v3_Action *msg, upb_StringView value) { |
| 1080 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value; |
| 1081 |
} |
| 1082 |
UPB_INLINE void envoy_config_rbac_v3_Action_set_action(envoy_config_rbac_v3_Action *msg, int32_t value) { |
| 1083 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; |
| 1084 |
} |
| 1085 |
|
| 1086 |
extern const upb_MiniTable_File envoy_config_rbac_v3_rbac_proto_upb_file_layout; |
| 1087 |
|
| 1088 |
#ifdef __cplusplus |
| 1089 |
} /* extern "C" */ |
| 1090 |
#endif |
| 1091 |
|
| 1092 |
#include "upb/port_undef.inc" |
| 1093 |
|
| 1094 |
#endif /* ENVOY_CONFIG_RBAC_V3_RBAC_PROTO_UPB_H_ */ |