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.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 typedef struct envoy_config_rbac_v3_RBAC envoy_config_rbac_v3_RBAC;
32 typedef struct envoy_config_rbac_v3_RBAC_PoliciesEntry envoy_config_rbac_v3_RBAC_PoliciesEntry;
33 typedef struct envoy_config_rbac_v3_Policy envoy_config_rbac_v3_Policy;
34 typedef struct envoy_config_rbac_v3_Permission envoy_config_rbac_v3_Permission;
35 typedef struct envoy_config_rbac_v3_Permission_Set envoy_config_rbac_v3_Permission_Set;
36 typedef struct envoy_config_rbac_v3_Principal envoy_config_rbac_v3_Principal;
37 typedef struct envoy_config_rbac_v3_Principal_Set envoy_config_rbac_v3_Principal_Set;
38 typedef struct envoy_config_rbac_v3_Principal_Authenticated envoy_config_rbac_v3_Principal_Authenticated;
39 extern const upb_msglayout envoy_config_rbac_v3_RBAC_msginit;
40 extern const upb_msglayout envoy_config_rbac_v3_RBAC_PoliciesEntry_msginit;
41 extern const upb_msglayout envoy_config_rbac_v3_Policy_msginit;
42 extern const upb_msglayout envoy_config_rbac_v3_Permission_msginit;
43 extern const upb_msglayout envoy_config_rbac_v3_Permission_Set_msginit;
44 extern const upb_msglayout envoy_config_rbac_v3_Principal_msginit;
45 extern const upb_msglayout envoy_config_rbac_v3_Principal_Set_msginit;
46 extern const upb_msglayout envoy_config_rbac_v3_Principal_Authenticated_msginit;
47 struct envoy_config_core_v3_CidrRange;
48 struct envoy_config_route_v3_HeaderMatcher;
49 struct envoy_type_matcher_v3_MetadataMatcher;
50 struct envoy_type_matcher_v3_PathMatcher;
51 struct envoy_type_matcher_v3_StringMatcher;
52 struct google_api_expr_v1alpha1_CheckedExpr;
53 struct google_api_expr_v1alpha1_Expr;
54 extern const upb_msglayout envoy_config_core_v3_CidrRange_msginit;
55 extern const upb_msglayout envoy_config_route_v3_HeaderMatcher_msginit;
56 extern const upb_msglayout envoy_type_matcher_v3_MetadataMatcher_msginit;
57 extern const upb_msglayout envoy_type_matcher_v3_PathMatcher_msginit;
58 extern const upb_msglayout envoy_type_matcher_v3_StringMatcher_msginit;
59 extern const upb_msglayout google_api_expr_v1alpha1_CheckedExpr_msginit;
60 extern const upb_msglayout google_api_expr_v1alpha1_Expr_msginit;
61 
62 typedef enum {
63   envoy_config_rbac_v3_RBAC_ALLOW = 0,
64   envoy_config_rbac_v3_RBAC_DENY = 1,
65   envoy_config_rbac_v3_RBAC_LOG = 2
66 } envoy_config_rbac_v3_RBAC_Action;
67 
68 
69 /* envoy.config.rbac.v3.RBAC */
70 
envoy_config_rbac_v3_RBAC_new(upb_arena * arena)71 UPB_INLINE envoy_config_rbac_v3_RBAC *envoy_config_rbac_v3_RBAC_new(upb_arena *arena) {
72   return (envoy_config_rbac_v3_RBAC *)_upb_msg_new(&envoy_config_rbac_v3_RBAC_msginit, arena);
73 }
envoy_config_rbac_v3_RBAC_parse(const char * buf,size_t size,upb_arena * arena)74 UPB_INLINE envoy_config_rbac_v3_RBAC *envoy_config_rbac_v3_RBAC_parse(const char *buf, size_t size,
75                         upb_arena *arena) {
76   envoy_config_rbac_v3_RBAC *ret = envoy_config_rbac_v3_RBAC_new(arena);
77   return (ret && upb_decode(buf, size, ret, &envoy_config_rbac_v3_RBAC_msginit, arena)) ? ret : NULL;
78 }
envoy_config_rbac_v3_RBAC_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)79 UPB_INLINE envoy_config_rbac_v3_RBAC *envoy_config_rbac_v3_RBAC_parse_ex(const char *buf, size_t size,
80                            upb_arena *arena, int options) {
81   envoy_config_rbac_v3_RBAC *ret = envoy_config_rbac_v3_RBAC_new(arena);
82   return (ret && _upb_decode(buf, size, ret, &envoy_config_rbac_v3_RBAC_msginit, arena, options))
83       ? ret : NULL;
84 }
envoy_config_rbac_v3_RBAC_serialize(const envoy_config_rbac_v3_RBAC * msg,upb_arena * arena,size_t * len)85 UPB_INLINE char *envoy_config_rbac_v3_RBAC_serialize(const envoy_config_rbac_v3_RBAC *msg, upb_arena *arena, size_t *len) {
86   return upb_encode(msg, &envoy_config_rbac_v3_RBAC_msginit, arena, len);
87 }
88 
envoy_config_rbac_v3_RBAC_action(const envoy_config_rbac_v3_RBAC * msg)89 UPB_INLINE int32_t envoy_config_rbac_v3_RBAC_action(const envoy_config_rbac_v3_RBAC *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
envoy_config_rbac_v3_RBAC_has_policies(const envoy_config_rbac_v3_RBAC * msg)90 UPB_INLINE bool envoy_config_rbac_v3_RBAC_has_policies(const envoy_config_rbac_v3_RBAC *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
envoy_config_rbac_v3_RBAC_policies_size(const envoy_config_rbac_v3_RBAC * msg)91 UPB_INLINE size_t envoy_config_rbac_v3_RBAC_policies_size(const envoy_config_rbac_v3_RBAC *msg) {return _upb_msg_map_size(msg, UPB_SIZE(4, 8)); }
envoy_config_rbac_v3_RBAC_policies_get(const envoy_config_rbac_v3_RBAC * msg,upb_strview key,envoy_config_rbac_v3_Policy ** val)92 UPB_INLINE bool envoy_config_rbac_v3_RBAC_policies_get(const envoy_config_rbac_v3_RBAC *msg, upb_strview key, envoy_config_rbac_v3_Policy* *val) { return _upb_msg_map_get(msg, UPB_SIZE(4, 8), &key, 0, val, sizeof(*val)); }
envoy_config_rbac_v3_RBAC_policies_next(const envoy_config_rbac_v3_RBAC * msg,size_t * iter)93 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) { return (const envoy_config_rbac_v3_RBAC_PoliciesEntry*)_upb_msg_map_next(msg, UPB_SIZE(4, 8), iter); }
94 
envoy_config_rbac_v3_RBAC_set_action(envoy_config_rbac_v3_RBAC * msg,int32_t value)95 UPB_INLINE void envoy_config_rbac_v3_RBAC_set_action(envoy_config_rbac_v3_RBAC *msg, int32_t value) {
96   *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
97 }
envoy_config_rbac_v3_RBAC_policies_clear(envoy_config_rbac_v3_RBAC * msg)98 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)); }
envoy_config_rbac_v3_RBAC_policies_set(envoy_config_rbac_v3_RBAC * msg,upb_strview key,envoy_config_rbac_v3_Policy * val,upb_arena * a)99 UPB_INLINE bool envoy_config_rbac_v3_RBAC_policies_set(envoy_config_rbac_v3_RBAC *msg, upb_strview key, envoy_config_rbac_v3_Policy* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(4, 8), &key, 0, &val, sizeof(val), a); }
envoy_config_rbac_v3_RBAC_policies_delete(envoy_config_rbac_v3_RBAC * msg,upb_strview key)100 UPB_INLINE bool envoy_config_rbac_v3_RBAC_policies_delete(envoy_config_rbac_v3_RBAC *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(4, 8), &key, 0); }
envoy_config_rbac_v3_RBAC_policies_nextmutable(envoy_config_rbac_v3_RBAC * msg,size_t * iter)101 UPB_INLINE envoy_config_rbac_v3_RBAC_PoliciesEntry* envoy_config_rbac_v3_RBAC_policies_nextmutable(envoy_config_rbac_v3_RBAC *msg, size_t* iter) { return (envoy_config_rbac_v3_RBAC_PoliciesEntry*)_upb_msg_map_next(msg, UPB_SIZE(4, 8), iter); }
102 
103 /* envoy.config.rbac.v3.RBAC.PoliciesEntry */
104 
envoy_config_rbac_v3_RBAC_PoliciesEntry_key(const envoy_config_rbac_v3_RBAC_PoliciesEntry * msg)105 UPB_INLINE upb_strview envoy_config_rbac_v3_RBAC_PoliciesEntry_key(const envoy_config_rbac_v3_RBAC_PoliciesEntry *msg) {
106   upb_strview ret;
107   _upb_msg_map_key(msg, &ret, 0);
108   return ret;
109 }
envoy_config_rbac_v3_RBAC_PoliciesEntry_has_value(const envoy_config_rbac_v3_RBAC_PoliciesEntry * msg)110 UPB_INLINE bool envoy_config_rbac_v3_RBAC_PoliciesEntry_has_value(const envoy_config_rbac_v3_RBAC_PoliciesEntry *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
envoy_config_rbac_v3_RBAC_PoliciesEntry_value(const envoy_config_rbac_v3_RBAC_PoliciesEntry * msg)111 UPB_INLINE const envoy_config_rbac_v3_Policy* envoy_config_rbac_v3_RBAC_PoliciesEntry_value(const envoy_config_rbac_v3_RBAC_PoliciesEntry *msg) {
112   envoy_config_rbac_v3_Policy* ret;
113   _upb_msg_map_value(msg, &ret, sizeof(ret));
114   return ret;
115 }
116 
envoy_config_rbac_v3_RBAC_PoliciesEntry_set_value(envoy_config_rbac_v3_RBAC_PoliciesEntry * msg,envoy_config_rbac_v3_Policy * value)117 UPB_INLINE void envoy_config_rbac_v3_RBAC_PoliciesEntry_set_value(envoy_config_rbac_v3_RBAC_PoliciesEntry *msg, envoy_config_rbac_v3_Policy* value) {
118   _upb_msg_map_set_value(msg, &value, sizeof(envoy_config_rbac_v3_Policy*));
119 }
120 
121 /* envoy.config.rbac.v3.Policy */
122 
envoy_config_rbac_v3_Policy_new(upb_arena * arena)123 UPB_INLINE envoy_config_rbac_v3_Policy *envoy_config_rbac_v3_Policy_new(upb_arena *arena) {
124   return (envoy_config_rbac_v3_Policy *)_upb_msg_new(&envoy_config_rbac_v3_Policy_msginit, arena);
125 }
envoy_config_rbac_v3_Policy_parse(const char * buf,size_t size,upb_arena * arena)126 UPB_INLINE envoy_config_rbac_v3_Policy *envoy_config_rbac_v3_Policy_parse(const char *buf, size_t size,
127                         upb_arena *arena) {
128   envoy_config_rbac_v3_Policy *ret = envoy_config_rbac_v3_Policy_new(arena);
129   return (ret && upb_decode(buf, size, ret, &envoy_config_rbac_v3_Policy_msginit, arena)) ? ret : NULL;
130 }
envoy_config_rbac_v3_Policy_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)131 UPB_INLINE envoy_config_rbac_v3_Policy *envoy_config_rbac_v3_Policy_parse_ex(const char *buf, size_t size,
132                            upb_arena *arena, int options) {
133   envoy_config_rbac_v3_Policy *ret = envoy_config_rbac_v3_Policy_new(arena);
134   return (ret && _upb_decode(buf, size, ret, &envoy_config_rbac_v3_Policy_msginit, arena, options))
135       ? ret : NULL;
136 }
envoy_config_rbac_v3_Policy_serialize(const envoy_config_rbac_v3_Policy * msg,upb_arena * arena,size_t * len)137 UPB_INLINE char *envoy_config_rbac_v3_Policy_serialize(const envoy_config_rbac_v3_Policy *msg, upb_arena *arena, size_t *len) {
138   return upb_encode(msg, &envoy_config_rbac_v3_Policy_msginit, arena, len);
139 }
140 
envoy_config_rbac_v3_Policy_has_permissions(const envoy_config_rbac_v3_Policy * msg)141 UPB_INLINE bool envoy_config_rbac_v3_Policy_has_permissions(const envoy_config_rbac_v3_Policy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
envoy_config_rbac_v3_Policy_permissions(const envoy_config_rbac_v3_Policy * msg,size_t * len)142 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) { return (const envoy_config_rbac_v3_Permission* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); }
envoy_config_rbac_v3_Policy_has_principals(const envoy_config_rbac_v3_Policy * msg)143 UPB_INLINE bool envoy_config_rbac_v3_Policy_has_principals(const envoy_config_rbac_v3_Policy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
envoy_config_rbac_v3_Policy_principals(const envoy_config_rbac_v3_Policy * msg,size_t * len)144 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) { return (const envoy_config_rbac_v3_Principal* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
envoy_config_rbac_v3_Policy_has_condition(const envoy_config_rbac_v3_Policy * msg)145 UPB_INLINE bool envoy_config_rbac_v3_Policy_has_condition(const envoy_config_rbac_v3_Policy *msg) { return _upb_hasbit(msg, 1); }
envoy_config_rbac_v3_Policy_condition(const envoy_config_rbac_v3_Policy * msg)146 UPB_INLINE const struct google_api_expr_v1alpha1_Expr* envoy_config_rbac_v3_Policy_condition(const envoy_config_rbac_v3_Policy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_api_expr_v1alpha1_Expr*); }
envoy_config_rbac_v3_Policy_has_checked_condition(const envoy_config_rbac_v3_Policy * msg)147 UPB_INLINE bool envoy_config_rbac_v3_Policy_has_checked_condition(const envoy_config_rbac_v3_Policy *msg) { return _upb_hasbit(msg, 2); }
envoy_config_rbac_v3_Policy_checked_condition(const envoy_config_rbac_v3_Policy * msg)148 UPB_INLINE const struct google_api_expr_v1alpha1_CheckedExpr* envoy_config_rbac_v3_Policy_checked_condition(const envoy_config_rbac_v3_Policy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_api_expr_v1alpha1_CheckedExpr*); }
149 
envoy_config_rbac_v3_Policy_mutable_permissions(envoy_config_rbac_v3_Policy * msg,size_t * len)150 UPB_INLINE envoy_config_rbac_v3_Permission** envoy_config_rbac_v3_Policy_mutable_permissions(envoy_config_rbac_v3_Policy *msg, size_t *len) {
151   return (envoy_config_rbac_v3_Permission**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len);
152 }
envoy_config_rbac_v3_Policy_resize_permissions(envoy_config_rbac_v3_Policy * msg,size_t len,upb_arena * arena)153 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) {
154   return (envoy_config_rbac_v3_Permission**)_upb_array_resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(2, 3), arena);
155 }
envoy_config_rbac_v3_Policy_add_permissions(envoy_config_rbac_v3_Policy * msg,upb_arena * arena)156 UPB_INLINE struct envoy_config_rbac_v3_Permission* envoy_config_rbac_v3_Policy_add_permissions(envoy_config_rbac_v3_Policy *msg, upb_arena *arena) {
157   struct envoy_config_rbac_v3_Permission* sub = (struct envoy_config_rbac_v3_Permission*)_upb_msg_new(&envoy_config_rbac_v3_Permission_msginit, arena);
158   bool ok = _upb_array_append_accessor2(
159       msg, UPB_SIZE(12, 24), UPB_SIZE(2, 3), &sub, arena);
160   if (!ok) return NULL;
161   return sub;
162 }
envoy_config_rbac_v3_Policy_mutable_principals(envoy_config_rbac_v3_Policy * msg,size_t * len)163 UPB_INLINE envoy_config_rbac_v3_Principal** envoy_config_rbac_v3_Policy_mutable_principals(envoy_config_rbac_v3_Policy *msg, size_t *len) {
164   return (envoy_config_rbac_v3_Principal**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
165 }
envoy_config_rbac_v3_Policy_resize_principals(envoy_config_rbac_v3_Policy * msg,size_t len,upb_arena * arena)166 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) {
167   return (envoy_config_rbac_v3_Principal**)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena);
168 }
envoy_config_rbac_v3_Policy_add_principals(envoy_config_rbac_v3_Policy * msg,upb_arena * arena)169 UPB_INLINE struct envoy_config_rbac_v3_Principal* envoy_config_rbac_v3_Policy_add_principals(envoy_config_rbac_v3_Policy *msg, upb_arena *arena) {
170   struct envoy_config_rbac_v3_Principal* sub = (struct envoy_config_rbac_v3_Principal*)_upb_msg_new(&envoy_config_rbac_v3_Principal_msginit, arena);
171   bool ok = _upb_array_append_accessor2(
172       msg, UPB_SIZE(16, 32), UPB_SIZE(2, 3), &sub, arena);
173   if (!ok) return NULL;
174   return sub;
175 }
envoy_config_rbac_v3_Policy_set_condition(envoy_config_rbac_v3_Policy * msg,struct google_api_expr_v1alpha1_Expr * value)176 UPB_INLINE void envoy_config_rbac_v3_Policy_set_condition(envoy_config_rbac_v3_Policy *msg, struct google_api_expr_v1alpha1_Expr* value) {
177   _upb_sethas(msg, 1);
178   *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_api_expr_v1alpha1_Expr*) = value;
179 }
envoy_config_rbac_v3_Policy_mutable_condition(envoy_config_rbac_v3_Policy * msg,upb_arena * arena)180 UPB_INLINE struct google_api_expr_v1alpha1_Expr* envoy_config_rbac_v3_Policy_mutable_condition(envoy_config_rbac_v3_Policy *msg, upb_arena *arena) {
181   struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)envoy_config_rbac_v3_Policy_condition(msg);
182   if (sub == NULL) {
183     sub = (struct google_api_expr_v1alpha1_Expr*)_upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena);
184     if (!sub) return NULL;
185     envoy_config_rbac_v3_Policy_set_condition(msg, sub);
186   }
187   return sub;
188 }
envoy_config_rbac_v3_Policy_set_checked_condition(envoy_config_rbac_v3_Policy * msg,struct google_api_expr_v1alpha1_CheckedExpr * value)189 UPB_INLINE void envoy_config_rbac_v3_Policy_set_checked_condition(envoy_config_rbac_v3_Policy *msg, struct google_api_expr_v1alpha1_CheckedExpr* value) {
190   _upb_sethas(msg, 2);
191   *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_api_expr_v1alpha1_CheckedExpr*) = value;
192 }
envoy_config_rbac_v3_Policy_mutable_checked_condition(envoy_config_rbac_v3_Policy * msg,upb_arena * arena)193 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) {
194   struct google_api_expr_v1alpha1_CheckedExpr* sub = (struct google_api_expr_v1alpha1_CheckedExpr*)envoy_config_rbac_v3_Policy_checked_condition(msg);
195   if (sub == NULL) {
196     sub = (struct google_api_expr_v1alpha1_CheckedExpr*)_upb_msg_new(&google_api_expr_v1alpha1_CheckedExpr_msginit, arena);
197     if (!sub) return NULL;
198     envoy_config_rbac_v3_Policy_set_checked_condition(msg, sub);
199   }
200   return sub;
201 }
202 
203 /* envoy.config.rbac.v3.Permission */
204 
envoy_config_rbac_v3_Permission_new(upb_arena * arena)205 UPB_INLINE envoy_config_rbac_v3_Permission *envoy_config_rbac_v3_Permission_new(upb_arena *arena) {
206   return (envoy_config_rbac_v3_Permission *)_upb_msg_new(&envoy_config_rbac_v3_Permission_msginit, arena);
207 }
envoy_config_rbac_v3_Permission_parse(const char * buf,size_t size,upb_arena * arena)208 UPB_INLINE envoy_config_rbac_v3_Permission *envoy_config_rbac_v3_Permission_parse(const char *buf, size_t size,
209                         upb_arena *arena) {
210   envoy_config_rbac_v3_Permission *ret = envoy_config_rbac_v3_Permission_new(arena);
211   return (ret && upb_decode(buf, size, ret, &envoy_config_rbac_v3_Permission_msginit, arena)) ? ret : NULL;
212 }
envoy_config_rbac_v3_Permission_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)213 UPB_INLINE envoy_config_rbac_v3_Permission *envoy_config_rbac_v3_Permission_parse_ex(const char *buf, size_t size,
214                            upb_arena *arena, int options) {
215   envoy_config_rbac_v3_Permission *ret = envoy_config_rbac_v3_Permission_new(arena);
216   return (ret && _upb_decode(buf, size, ret, &envoy_config_rbac_v3_Permission_msginit, arena, options))
217       ? ret : NULL;
218 }
envoy_config_rbac_v3_Permission_serialize(const envoy_config_rbac_v3_Permission * msg,upb_arena * arena,size_t * len)219 UPB_INLINE char *envoy_config_rbac_v3_Permission_serialize(const envoy_config_rbac_v3_Permission *msg, upb_arena *arena, size_t *len) {
220   return upb_encode(msg, &envoy_config_rbac_v3_Permission_msginit, arena, len);
221 }
222 
223 typedef enum {
224   envoy_config_rbac_v3_Permission_rule_and_rules = 1,
225   envoy_config_rbac_v3_Permission_rule_or_rules = 2,
226   envoy_config_rbac_v3_Permission_rule_any = 3,
227   envoy_config_rbac_v3_Permission_rule_header = 4,
228   envoy_config_rbac_v3_Permission_rule_url_path = 10,
229   envoy_config_rbac_v3_Permission_rule_destination_ip = 5,
230   envoy_config_rbac_v3_Permission_rule_destination_port = 6,
231   envoy_config_rbac_v3_Permission_rule_metadata = 7,
232   envoy_config_rbac_v3_Permission_rule_not_rule = 8,
233   envoy_config_rbac_v3_Permission_rule_requested_server_name = 9,
234   envoy_config_rbac_v3_Permission_rule_NOT_SET = 0
235 } envoy_config_rbac_v3_Permission_rule_oneofcases;
envoy_config_rbac_v3_Permission_rule_case(const envoy_config_rbac_v3_Permission * msg)236 UPB_INLINE envoy_config_rbac_v3_Permission_rule_oneofcases envoy_config_rbac_v3_Permission_rule_case(const envoy_config_rbac_v3_Permission* msg) { return (envoy_config_rbac_v3_Permission_rule_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); }
237 
envoy_config_rbac_v3_Permission_has_and_rules(const envoy_config_rbac_v3_Permission * msg)238 UPB_INLINE bool envoy_config_rbac_v3_Permission_has_and_rules(const envoy_config_rbac_v3_Permission *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; }
envoy_config_rbac_v3_Permission_and_rules(const envoy_config_rbac_v3_Permission * msg)239 UPB_INLINE const envoy_config_rbac_v3_Permission_Set* envoy_config_rbac_v3_Permission_and_rules(const envoy_config_rbac_v3_Permission *msg) { return UPB_READ_ONEOF(msg, const envoy_config_rbac_v3_Permission_Set*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); }
envoy_config_rbac_v3_Permission_has_or_rules(const envoy_config_rbac_v3_Permission * msg)240 UPB_INLINE bool envoy_config_rbac_v3_Permission_has_or_rules(const envoy_config_rbac_v3_Permission *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 2; }
envoy_config_rbac_v3_Permission_or_rules(const envoy_config_rbac_v3_Permission * msg)241 UPB_INLINE const envoy_config_rbac_v3_Permission_Set* envoy_config_rbac_v3_Permission_or_rules(const envoy_config_rbac_v3_Permission *msg) { return UPB_READ_ONEOF(msg, const envoy_config_rbac_v3_Permission_Set*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); }
envoy_config_rbac_v3_Permission_has_any(const envoy_config_rbac_v3_Permission * msg)242 UPB_INLINE bool envoy_config_rbac_v3_Permission_has_any(const envoy_config_rbac_v3_Permission *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 3; }
envoy_config_rbac_v3_Permission_any(const envoy_config_rbac_v3_Permission * msg)243 UPB_INLINE bool envoy_config_rbac_v3_Permission_any(const envoy_config_rbac_v3_Permission *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 3, false); }
envoy_config_rbac_v3_Permission_has_header(const envoy_config_rbac_v3_Permission * msg)244 UPB_INLINE bool envoy_config_rbac_v3_Permission_has_header(const envoy_config_rbac_v3_Permission *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 4; }
envoy_config_rbac_v3_Permission_header(const envoy_config_rbac_v3_Permission * msg)245 UPB_INLINE const struct envoy_config_route_v3_HeaderMatcher* envoy_config_rbac_v3_Permission_header(const envoy_config_rbac_v3_Permission *msg) { return UPB_READ_ONEOF(msg, const struct envoy_config_route_v3_HeaderMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 4, NULL); }
envoy_config_rbac_v3_Permission_has_destination_ip(const envoy_config_rbac_v3_Permission * msg)246 UPB_INLINE bool envoy_config_rbac_v3_Permission_has_destination_ip(const envoy_config_rbac_v3_Permission *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 5; }
envoy_config_rbac_v3_Permission_destination_ip(const envoy_config_rbac_v3_Permission * msg)247 UPB_INLINE const struct envoy_config_core_v3_CidrRange* envoy_config_rbac_v3_Permission_destination_ip(const envoy_config_rbac_v3_Permission *msg) { return UPB_READ_ONEOF(msg, const struct envoy_config_core_v3_CidrRange*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 5, NULL); }
envoy_config_rbac_v3_Permission_has_destination_port(const envoy_config_rbac_v3_Permission * msg)248 UPB_INLINE bool envoy_config_rbac_v3_Permission_has_destination_port(const envoy_config_rbac_v3_Permission *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 6; }
envoy_config_rbac_v3_Permission_destination_port(const envoy_config_rbac_v3_Permission * msg)249 UPB_INLINE uint32_t envoy_config_rbac_v3_Permission_destination_port(const envoy_config_rbac_v3_Permission *msg) { return UPB_READ_ONEOF(msg, uint32_t, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 6, 0); }
envoy_config_rbac_v3_Permission_has_metadata(const envoy_config_rbac_v3_Permission * msg)250 UPB_INLINE bool envoy_config_rbac_v3_Permission_has_metadata(const envoy_config_rbac_v3_Permission *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 7; }
envoy_config_rbac_v3_Permission_metadata(const envoy_config_rbac_v3_Permission * msg)251 UPB_INLINE const struct envoy_type_matcher_v3_MetadataMatcher* envoy_config_rbac_v3_Permission_metadata(const envoy_config_rbac_v3_Permission *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_v3_MetadataMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 7, NULL); }
envoy_config_rbac_v3_Permission_has_not_rule(const envoy_config_rbac_v3_Permission * msg)252 UPB_INLINE bool envoy_config_rbac_v3_Permission_has_not_rule(const envoy_config_rbac_v3_Permission *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 8; }
envoy_config_rbac_v3_Permission_not_rule(const envoy_config_rbac_v3_Permission * msg)253 UPB_INLINE const envoy_config_rbac_v3_Permission* envoy_config_rbac_v3_Permission_not_rule(const envoy_config_rbac_v3_Permission *msg) { return UPB_READ_ONEOF(msg, const envoy_config_rbac_v3_Permission*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 8, NULL); }
envoy_config_rbac_v3_Permission_has_requested_server_name(const envoy_config_rbac_v3_Permission * msg)254 UPB_INLINE bool envoy_config_rbac_v3_Permission_has_requested_server_name(const envoy_config_rbac_v3_Permission *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 9; }
envoy_config_rbac_v3_Permission_requested_server_name(const envoy_config_rbac_v3_Permission * msg)255 UPB_INLINE const struct envoy_type_matcher_v3_StringMatcher* envoy_config_rbac_v3_Permission_requested_server_name(const envoy_config_rbac_v3_Permission *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_v3_StringMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 9, NULL); }
envoy_config_rbac_v3_Permission_has_url_path(const envoy_config_rbac_v3_Permission * msg)256 UPB_INLINE bool envoy_config_rbac_v3_Permission_has_url_path(const envoy_config_rbac_v3_Permission *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 10; }
envoy_config_rbac_v3_Permission_url_path(const envoy_config_rbac_v3_Permission * msg)257 UPB_INLINE const struct envoy_type_matcher_v3_PathMatcher* envoy_config_rbac_v3_Permission_url_path(const envoy_config_rbac_v3_Permission *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_v3_PathMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 10, NULL); }
258 
envoy_config_rbac_v3_Permission_set_and_rules(envoy_config_rbac_v3_Permission * msg,envoy_config_rbac_v3_Permission_Set * value)259 UPB_INLINE void envoy_config_rbac_v3_Permission_set_and_rules(envoy_config_rbac_v3_Permission *msg, envoy_config_rbac_v3_Permission_Set* value) {
260   UPB_WRITE_ONEOF(msg, envoy_config_rbac_v3_Permission_Set*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1);
261 }
envoy_config_rbac_v3_Permission_mutable_and_rules(envoy_config_rbac_v3_Permission * msg,upb_arena * arena)262 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) {
263   struct envoy_config_rbac_v3_Permission_Set* sub = (struct envoy_config_rbac_v3_Permission_Set*)envoy_config_rbac_v3_Permission_and_rules(msg);
264   if (sub == NULL) {
265     sub = (struct envoy_config_rbac_v3_Permission_Set*)_upb_msg_new(&envoy_config_rbac_v3_Permission_Set_msginit, arena);
266     if (!sub) return NULL;
267     envoy_config_rbac_v3_Permission_set_and_rules(msg, sub);
268   }
269   return sub;
270 }
envoy_config_rbac_v3_Permission_set_or_rules(envoy_config_rbac_v3_Permission * msg,envoy_config_rbac_v3_Permission_Set * value)271 UPB_INLINE void envoy_config_rbac_v3_Permission_set_or_rules(envoy_config_rbac_v3_Permission *msg, envoy_config_rbac_v3_Permission_Set* value) {
272   UPB_WRITE_ONEOF(msg, envoy_config_rbac_v3_Permission_Set*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2);
273 }
envoy_config_rbac_v3_Permission_mutable_or_rules(envoy_config_rbac_v3_Permission * msg,upb_arena * arena)274 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) {
275   struct envoy_config_rbac_v3_Permission_Set* sub = (struct envoy_config_rbac_v3_Permission_Set*)envoy_config_rbac_v3_Permission_or_rules(msg);
276   if (sub == NULL) {
277     sub = (struct envoy_config_rbac_v3_Permission_Set*)_upb_msg_new(&envoy_config_rbac_v3_Permission_Set_msginit, arena);
278     if (!sub) return NULL;
279     envoy_config_rbac_v3_Permission_set_or_rules(msg, sub);
280   }
281   return sub;
282 }
envoy_config_rbac_v3_Permission_set_any(envoy_config_rbac_v3_Permission * msg,bool value)283 UPB_INLINE void envoy_config_rbac_v3_Permission_set_any(envoy_config_rbac_v3_Permission *msg, bool value) {
284   UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 3);
285 }
envoy_config_rbac_v3_Permission_set_header(envoy_config_rbac_v3_Permission * msg,struct envoy_config_route_v3_HeaderMatcher * value)286 UPB_INLINE void envoy_config_rbac_v3_Permission_set_header(envoy_config_rbac_v3_Permission *msg, struct envoy_config_route_v3_HeaderMatcher* value) {
287   UPB_WRITE_ONEOF(msg, struct envoy_config_route_v3_HeaderMatcher*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 4);
288 }
envoy_config_rbac_v3_Permission_mutable_header(envoy_config_rbac_v3_Permission * msg,upb_arena * arena)289 UPB_INLINE struct envoy_config_route_v3_HeaderMatcher* envoy_config_rbac_v3_Permission_mutable_header(envoy_config_rbac_v3_Permission *msg, upb_arena *arena) {
290   struct envoy_config_route_v3_HeaderMatcher* sub = (struct envoy_config_route_v3_HeaderMatcher*)envoy_config_rbac_v3_Permission_header(msg);
291   if (sub == NULL) {
292     sub = (struct envoy_config_route_v3_HeaderMatcher*)_upb_msg_new(&envoy_config_route_v3_HeaderMatcher_msginit, arena);
293     if (!sub) return NULL;
294     envoy_config_rbac_v3_Permission_set_header(msg, sub);
295   }
296   return sub;
297 }
envoy_config_rbac_v3_Permission_set_destination_ip(envoy_config_rbac_v3_Permission * msg,struct envoy_config_core_v3_CidrRange * value)298 UPB_INLINE void envoy_config_rbac_v3_Permission_set_destination_ip(envoy_config_rbac_v3_Permission *msg, struct envoy_config_core_v3_CidrRange* value) {
299   UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_CidrRange*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 5);
300 }
envoy_config_rbac_v3_Permission_mutable_destination_ip(envoy_config_rbac_v3_Permission * msg,upb_arena * arena)301 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) {
302   struct envoy_config_core_v3_CidrRange* sub = (struct envoy_config_core_v3_CidrRange*)envoy_config_rbac_v3_Permission_destination_ip(msg);
303   if (sub == NULL) {
304     sub = (struct envoy_config_core_v3_CidrRange*)_upb_msg_new(&envoy_config_core_v3_CidrRange_msginit, arena);
305     if (!sub) return NULL;
306     envoy_config_rbac_v3_Permission_set_destination_ip(msg, sub);
307   }
308   return sub;
309 }
envoy_config_rbac_v3_Permission_set_destination_port(envoy_config_rbac_v3_Permission * msg,uint32_t value)310 UPB_INLINE void envoy_config_rbac_v3_Permission_set_destination_port(envoy_config_rbac_v3_Permission *msg, uint32_t value) {
311   UPB_WRITE_ONEOF(msg, uint32_t, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 6);
312 }
envoy_config_rbac_v3_Permission_set_metadata(envoy_config_rbac_v3_Permission * msg,struct envoy_type_matcher_v3_MetadataMatcher * value)313 UPB_INLINE void envoy_config_rbac_v3_Permission_set_metadata(envoy_config_rbac_v3_Permission *msg, struct envoy_type_matcher_v3_MetadataMatcher* value) {
314   UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_MetadataMatcher*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 7);
315 }
envoy_config_rbac_v3_Permission_mutable_metadata(envoy_config_rbac_v3_Permission * msg,upb_arena * arena)316 UPB_INLINE struct envoy_type_matcher_v3_MetadataMatcher* envoy_config_rbac_v3_Permission_mutable_metadata(envoy_config_rbac_v3_Permission *msg, upb_arena *arena) {
317   struct envoy_type_matcher_v3_MetadataMatcher* sub = (struct envoy_type_matcher_v3_MetadataMatcher*)envoy_config_rbac_v3_Permission_metadata(msg);
318   if (sub == NULL) {
319     sub = (struct envoy_type_matcher_v3_MetadataMatcher*)_upb_msg_new(&envoy_type_matcher_v3_MetadataMatcher_msginit, arena);
320     if (!sub) return NULL;
321     envoy_config_rbac_v3_Permission_set_metadata(msg, sub);
322   }
323   return sub;
324 }
envoy_config_rbac_v3_Permission_set_not_rule(envoy_config_rbac_v3_Permission * msg,envoy_config_rbac_v3_Permission * value)325 UPB_INLINE void envoy_config_rbac_v3_Permission_set_not_rule(envoy_config_rbac_v3_Permission *msg, envoy_config_rbac_v3_Permission* value) {
326   UPB_WRITE_ONEOF(msg, envoy_config_rbac_v3_Permission*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 8);
327 }
envoy_config_rbac_v3_Permission_mutable_not_rule(envoy_config_rbac_v3_Permission * msg,upb_arena * arena)328 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) {
329   struct envoy_config_rbac_v3_Permission* sub = (struct envoy_config_rbac_v3_Permission*)envoy_config_rbac_v3_Permission_not_rule(msg);
330   if (sub == NULL) {
331     sub = (struct envoy_config_rbac_v3_Permission*)_upb_msg_new(&envoy_config_rbac_v3_Permission_msginit, arena);
332     if (!sub) return NULL;
333     envoy_config_rbac_v3_Permission_set_not_rule(msg, sub);
334   }
335   return sub;
336 }
envoy_config_rbac_v3_Permission_set_requested_server_name(envoy_config_rbac_v3_Permission * msg,struct envoy_type_matcher_v3_StringMatcher * value)337 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) {
338   UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_StringMatcher*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 9);
339 }
envoy_config_rbac_v3_Permission_mutable_requested_server_name(envoy_config_rbac_v3_Permission * msg,upb_arena * arena)340 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) {
341   struct envoy_type_matcher_v3_StringMatcher* sub = (struct envoy_type_matcher_v3_StringMatcher*)envoy_config_rbac_v3_Permission_requested_server_name(msg);
342   if (sub == NULL) {
343     sub = (struct envoy_type_matcher_v3_StringMatcher*)_upb_msg_new(&envoy_type_matcher_v3_StringMatcher_msginit, arena);
344     if (!sub) return NULL;
345     envoy_config_rbac_v3_Permission_set_requested_server_name(msg, sub);
346   }
347   return sub;
348 }
envoy_config_rbac_v3_Permission_set_url_path(envoy_config_rbac_v3_Permission * msg,struct envoy_type_matcher_v3_PathMatcher * value)349 UPB_INLINE void envoy_config_rbac_v3_Permission_set_url_path(envoy_config_rbac_v3_Permission *msg, struct envoy_type_matcher_v3_PathMatcher* value) {
350   UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_PathMatcher*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 10);
351 }
envoy_config_rbac_v3_Permission_mutable_url_path(envoy_config_rbac_v3_Permission * msg,upb_arena * arena)352 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) {
353   struct envoy_type_matcher_v3_PathMatcher* sub = (struct envoy_type_matcher_v3_PathMatcher*)envoy_config_rbac_v3_Permission_url_path(msg);
354   if (sub == NULL) {
355     sub = (struct envoy_type_matcher_v3_PathMatcher*)_upb_msg_new(&envoy_type_matcher_v3_PathMatcher_msginit, arena);
356     if (!sub) return NULL;
357     envoy_config_rbac_v3_Permission_set_url_path(msg, sub);
358   }
359   return sub;
360 }
361 
362 /* envoy.config.rbac.v3.Permission.Set */
363 
envoy_config_rbac_v3_Permission_Set_new(upb_arena * arena)364 UPB_INLINE envoy_config_rbac_v3_Permission_Set *envoy_config_rbac_v3_Permission_Set_new(upb_arena *arena) {
365   return (envoy_config_rbac_v3_Permission_Set *)_upb_msg_new(&envoy_config_rbac_v3_Permission_Set_msginit, arena);
366 }
envoy_config_rbac_v3_Permission_Set_parse(const char * buf,size_t size,upb_arena * arena)367 UPB_INLINE envoy_config_rbac_v3_Permission_Set *envoy_config_rbac_v3_Permission_Set_parse(const char *buf, size_t size,
368                         upb_arena *arena) {
369   envoy_config_rbac_v3_Permission_Set *ret = envoy_config_rbac_v3_Permission_Set_new(arena);
370   return (ret && upb_decode(buf, size, ret, &envoy_config_rbac_v3_Permission_Set_msginit, arena)) ? ret : NULL;
371 }
envoy_config_rbac_v3_Permission_Set_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)372 UPB_INLINE envoy_config_rbac_v3_Permission_Set *envoy_config_rbac_v3_Permission_Set_parse_ex(const char *buf, size_t size,
373                            upb_arena *arena, int options) {
374   envoy_config_rbac_v3_Permission_Set *ret = envoy_config_rbac_v3_Permission_Set_new(arena);
375   return (ret && _upb_decode(buf, size, ret, &envoy_config_rbac_v3_Permission_Set_msginit, arena, options))
376       ? ret : NULL;
377 }
envoy_config_rbac_v3_Permission_Set_serialize(const envoy_config_rbac_v3_Permission_Set * msg,upb_arena * arena,size_t * len)378 UPB_INLINE char *envoy_config_rbac_v3_Permission_Set_serialize(const envoy_config_rbac_v3_Permission_Set *msg, upb_arena *arena, size_t *len) {
379   return upb_encode(msg, &envoy_config_rbac_v3_Permission_Set_msginit, arena, len);
380 }
381 
envoy_config_rbac_v3_Permission_Set_has_rules(const envoy_config_rbac_v3_Permission_Set * msg)382 UPB_INLINE bool envoy_config_rbac_v3_Permission_Set_has_rules(const envoy_config_rbac_v3_Permission_Set *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
envoy_config_rbac_v3_Permission_Set_rules(const envoy_config_rbac_v3_Permission_Set * msg,size_t * len)383 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) { return (const envoy_config_rbac_v3_Permission* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
384 
envoy_config_rbac_v3_Permission_Set_mutable_rules(envoy_config_rbac_v3_Permission_Set * msg,size_t * len)385 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) {
386   return (envoy_config_rbac_v3_Permission**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
387 }
envoy_config_rbac_v3_Permission_Set_resize_rules(envoy_config_rbac_v3_Permission_Set * msg,size_t len,upb_arena * arena)388 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) {
389   return (envoy_config_rbac_v3_Permission**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
390 }
envoy_config_rbac_v3_Permission_Set_add_rules(envoy_config_rbac_v3_Permission_Set * msg,upb_arena * arena)391 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) {
392   struct envoy_config_rbac_v3_Permission* sub = (struct envoy_config_rbac_v3_Permission*)_upb_msg_new(&envoy_config_rbac_v3_Permission_msginit, arena);
393   bool ok = _upb_array_append_accessor2(
394       msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
395   if (!ok) return NULL;
396   return sub;
397 }
398 
399 /* envoy.config.rbac.v3.Principal */
400 
envoy_config_rbac_v3_Principal_new(upb_arena * arena)401 UPB_INLINE envoy_config_rbac_v3_Principal *envoy_config_rbac_v3_Principal_new(upb_arena *arena) {
402   return (envoy_config_rbac_v3_Principal *)_upb_msg_new(&envoy_config_rbac_v3_Principal_msginit, arena);
403 }
envoy_config_rbac_v3_Principal_parse(const char * buf,size_t size,upb_arena * arena)404 UPB_INLINE envoy_config_rbac_v3_Principal *envoy_config_rbac_v3_Principal_parse(const char *buf, size_t size,
405                         upb_arena *arena) {
406   envoy_config_rbac_v3_Principal *ret = envoy_config_rbac_v3_Principal_new(arena);
407   return (ret && upb_decode(buf, size, ret, &envoy_config_rbac_v3_Principal_msginit, arena)) ? ret : NULL;
408 }
envoy_config_rbac_v3_Principal_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)409 UPB_INLINE envoy_config_rbac_v3_Principal *envoy_config_rbac_v3_Principal_parse_ex(const char *buf, size_t size,
410                            upb_arena *arena, int options) {
411   envoy_config_rbac_v3_Principal *ret = envoy_config_rbac_v3_Principal_new(arena);
412   return (ret && _upb_decode(buf, size, ret, &envoy_config_rbac_v3_Principal_msginit, arena, options))
413       ? ret : NULL;
414 }
envoy_config_rbac_v3_Principal_serialize(const envoy_config_rbac_v3_Principal * msg,upb_arena * arena,size_t * len)415 UPB_INLINE char *envoy_config_rbac_v3_Principal_serialize(const envoy_config_rbac_v3_Principal *msg, upb_arena *arena, size_t *len) {
416   return upb_encode(msg, &envoy_config_rbac_v3_Principal_msginit, arena, len);
417 }
418 
419 typedef enum {
420   envoy_config_rbac_v3_Principal_identifier_and_ids = 1,
421   envoy_config_rbac_v3_Principal_identifier_or_ids = 2,
422   envoy_config_rbac_v3_Principal_identifier_any = 3,
423   envoy_config_rbac_v3_Principal_identifier_authenticated = 4,
424   envoy_config_rbac_v3_Principal_identifier_source_ip = 5,
425   envoy_config_rbac_v3_Principal_identifier_direct_remote_ip = 10,
426   envoy_config_rbac_v3_Principal_identifier_remote_ip = 11,
427   envoy_config_rbac_v3_Principal_identifier_header = 6,
428   envoy_config_rbac_v3_Principal_identifier_url_path = 9,
429   envoy_config_rbac_v3_Principal_identifier_metadata = 7,
430   envoy_config_rbac_v3_Principal_identifier_not_id = 8,
431   envoy_config_rbac_v3_Principal_identifier_NOT_SET = 0
432 } envoy_config_rbac_v3_Principal_identifier_oneofcases;
envoy_config_rbac_v3_Principal_identifier_case(const envoy_config_rbac_v3_Principal * msg)433 UPB_INLINE envoy_config_rbac_v3_Principal_identifier_oneofcases envoy_config_rbac_v3_Principal_identifier_case(const envoy_config_rbac_v3_Principal* msg) { return (envoy_config_rbac_v3_Principal_identifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); }
434 
envoy_config_rbac_v3_Principal_has_and_ids(const envoy_config_rbac_v3_Principal * msg)435 UPB_INLINE bool envoy_config_rbac_v3_Principal_has_and_ids(const envoy_config_rbac_v3_Principal *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; }
envoy_config_rbac_v3_Principal_and_ids(const envoy_config_rbac_v3_Principal * msg)436 UPB_INLINE const envoy_config_rbac_v3_Principal_Set* envoy_config_rbac_v3_Principal_and_ids(const envoy_config_rbac_v3_Principal *msg) { return UPB_READ_ONEOF(msg, const envoy_config_rbac_v3_Principal_Set*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); }
envoy_config_rbac_v3_Principal_has_or_ids(const envoy_config_rbac_v3_Principal * msg)437 UPB_INLINE bool envoy_config_rbac_v3_Principal_has_or_ids(const envoy_config_rbac_v3_Principal *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 2; }
envoy_config_rbac_v3_Principal_or_ids(const envoy_config_rbac_v3_Principal * msg)438 UPB_INLINE const envoy_config_rbac_v3_Principal_Set* envoy_config_rbac_v3_Principal_or_ids(const envoy_config_rbac_v3_Principal *msg) { return UPB_READ_ONEOF(msg, const envoy_config_rbac_v3_Principal_Set*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); }
envoy_config_rbac_v3_Principal_has_any(const envoy_config_rbac_v3_Principal * msg)439 UPB_INLINE bool envoy_config_rbac_v3_Principal_has_any(const envoy_config_rbac_v3_Principal *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 3; }
envoy_config_rbac_v3_Principal_any(const envoy_config_rbac_v3_Principal * msg)440 UPB_INLINE bool envoy_config_rbac_v3_Principal_any(const envoy_config_rbac_v3_Principal *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 3, false); }
envoy_config_rbac_v3_Principal_has_authenticated(const envoy_config_rbac_v3_Principal * msg)441 UPB_INLINE bool envoy_config_rbac_v3_Principal_has_authenticated(const envoy_config_rbac_v3_Principal *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 4; }
envoy_config_rbac_v3_Principal_authenticated(const envoy_config_rbac_v3_Principal * msg)442 UPB_INLINE const envoy_config_rbac_v3_Principal_Authenticated* envoy_config_rbac_v3_Principal_authenticated(const envoy_config_rbac_v3_Principal *msg) { return UPB_READ_ONEOF(msg, const envoy_config_rbac_v3_Principal_Authenticated*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 4, NULL); }
envoy_config_rbac_v3_Principal_has_source_ip(const envoy_config_rbac_v3_Principal * msg)443 UPB_INLINE bool envoy_config_rbac_v3_Principal_has_source_ip(const envoy_config_rbac_v3_Principal *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 5; }
envoy_config_rbac_v3_Principal_source_ip(const envoy_config_rbac_v3_Principal * msg)444 UPB_INLINE const struct envoy_config_core_v3_CidrRange* envoy_config_rbac_v3_Principal_source_ip(const envoy_config_rbac_v3_Principal *msg) { return UPB_READ_ONEOF(msg, const struct envoy_config_core_v3_CidrRange*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 5, NULL); }
envoy_config_rbac_v3_Principal_has_header(const envoy_config_rbac_v3_Principal * msg)445 UPB_INLINE bool envoy_config_rbac_v3_Principal_has_header(const envoy_config_rbac_v3_Principal *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 6; }
envoy_config_rbac_v3_Principal_header(const envoy_config_rbac_v3_Principal * msg)446 UPB_INLINE const struct envoy_config_route_v3_HeaderMatcher* envoy_config_rbac_v3_Principal_header(const envoy_config_rbac_v3_Principal *msg) { return UPB_READ_ONEOF(msg, const struct envoy_config_route_v3_HeaderMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 6, NULL); }
envoy_config_rbac_v3_Principal_has_metadata(const envoy_config_rbac_v3_Principal * msg)447 UPB_INLINE bool envoy_config_rbac_v3_Principal_has_metadata(const envoy_config_rbac_v3_Principal *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 7; }
envoy_config_rbac_v3_Principal_metadata(const envoy_config_rbac_v3_Principal * msg)448 UPB_INLINE const struct envoy_type_matcher_v3_MetadataMatcher* envoy_config_rbac_v3_Principal_metadata(const envoy_config_rbac_v3_Principal *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_v3_MetadataMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 7, NULL); }
envoy_config_rbac_v3_Principal_has_not_id(const envoy_config_rbac_v3_Principal * msg)449 UPB_INLINE bool envoy_config_rbac_v3_Principal_has_not_id(const envoy_config_rbac_v3_Principal *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 8; }
envoy_config_rbac_v3_Principal_not_id(const envoy_config_rbac_v3_Principal * msg)450 UPB_INLINE const envoy_config_rbac_v3_Principal* envoy_config_rbac_v3_Principal_not_id(const envoy_config_rbac_v3_Principal *msg) { return UPB_READ_ONEOF(msg, const envoy_config_rbac_v3_Principal*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 8, NULL); }
envoy_config_rbac_v3_Principal_has_url_path(const envoy_config_rbac_v3_Principal * msg)451 UPB_INLINE bool envoy_config_rbac_v3_Principal_has_url_path(const envoy_config_rbac_v3_Principal *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 9; }
envoy_config_rbac_v3_Principal_url_path(const envoy_config_rbac_v3_Principal * msg)452 UPB_INLINE const struct envoy_type_matcher_v3_PathMatcher* envoy_config_rbac_v3_Principal_url_path(const envoy_config_rbac_v3_Principal *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_v3_PathMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 9, NULL); }
envoy_config_rbac_v3_Principal_has_direct_remote_ip(const envoy_config_rbac_v3_Principal * msg)453 UPB_INLINE bool envoy_config_rbac_v3_Principal_has_direct_remote_ip(const envoy_config_rbac_v3_Principal *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 10; }
envoy_config_rbac_v3_Principal_direct_remote_ip(const envoy_config_rbac_v3_Principal * msg)454 UPB_INLINE const struct envoy_config_core_v3_CidrRange* envoy_config_rbac_v3_Principal_direct_remote_ip(const envoy_config_rbac_v3_Principal *msg) { return UPB_READ_ONEOF(msg, const struct envoy_config_core_v3_CidrRange*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 10, NULL); }
envoy_config_rbac_v3_Principal_has_remote_ip(const envoy_config_rbac_v3_Principal * msg)455 UPB_INLINE bool envoy_config_rbac_v3_Principal_has_remote_ip(const envoy_config_rbac_v3_Principal *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 11; }
envoy_config_rbac_v3_Principal_remote_ip(const envoy_config_rbac_v3_Principal * msg)456 UPB_INLINE const struct envoy_config_core_v3_CidrRange* envoy_config_rbac_v3_Principal_remote_ip(const envoy_config_rbac_v3_Principal *msg) { return UPB_READ_ONEOF(msg, const struct envoy_config_core_v3_CidrRange*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 11, NULL); }
457 
envoy_config_rbac_v3_Principal_set_and_ids(envoy_config_rbac_v3_Principal * msg,envoy_config_rbac_v3_Principal_Set * value)458 UPB_INLINE void envoy_config_rbac_v3_Principal_set_and_ids(envoy_config_rbac_v3_Principal *msg, envoy_config_rbac_v3_Principal_Set* value) {
459   UPB_WRITE_ONEOF(msg, envoy_config_rbac_v3_Principal_Set*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1);
460 }
envoy_config_rbac_v3_Principal_mutable_and_ids(envoy_config_rbac_v3_Principal * msg,upb_arena * arena)461 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) {
462   struct envoy_config_rbac_v3_Principal_Set* sub = (struct envoy_config_rbac_v3_Principal_Set*)envoy_config_rbac_v3_Principal_and_ids(msg);
463   if (sub == NULL) {
464     sub = (struct envoy_config_rbac_v3_Principal_Set*)_upb_msg_new(&envoy_config_rbac_v3_Principal_Set_msginit, arena);
465     if (!sub) return NULL;
466     envoy_config_rbac_v3_Principal_set_and_ids(msg, sub);
467   }
468   return sub;
469 }
envoy_config_rbac_v3_Principal_set_or_ids(envoy_config_rbac_v3_Principal * msg,envoy_config_rbac_v3_Principal_Set * value)470 UPB_INLINE void envoy_config_rbac_v3_Principal_set_or_ids(envoy_config_rbac_v3_Principal *msg, envoy_config_rbac_v3_Principal_Set* value) {
471   UPB_WRITE_ONEOF(msg, envoy_config_rbac_v3_Principal_Set*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2);
472 }
envoy_config_rbac_v3_Principal_mutable_or_ids(envoy_config_rbac_v3_Principal * msg,upb_arena * arena)473 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) {
474   struct envoy_config_rbac_v3_Principal_Set* sub = (struct envoy_config_rbac_v3_Principal_Set*)envoy_config_rbac_v3_Principal_or_ids(msg);
475   if (sub == NULL) {
476     sub = (struct envoy_config_rbac_v3_Principal_Set*)_upb_msg_new(&envoy_config_rbac_v3_Principal_Set_msginit, arena);
477     if (!sub) return NULL;
478     envoy_config_rbac_v3_Principal_set_or_ids(msg, sub);
479   }
480   return sub;
481 }
envoy_config_rbac_v3_Principal_set_any(envoy_config_rbac_v3_Principal * msg,bool value)482 UPB_INLINE void envoy_config_rbac_v3_Principal_set_any(envoy_config_rbac_v3_Principal *msg, bool value) {
483   UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 3);
484 }
envoy_config_rbac_v3_Principal_set_authenticated(envoy_config_rbac_v3_Principal * msg,envoy_config_rbac_v3_Principal_Authenticated * value)485 UPB_INLINE void envoy_config_rbac_v3_Principal_set_authenticated(envoy_config_rbac_v3_Principal *msg, envoy_config_rbac_v3_Principal_Authenticated* value) {
486   UPB_WRITE_ONEOF(msg, envoy_config_rbac_v3_Principal_Authenticated*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 4);
487 }
envoy_config_rbac_v3_Principal_mutable_authenticated(envoy_config_rbac_v3_Principal * msg,upb_arena * arena)488 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) {
489   struct envoy_config_rbac_v3_Principal_Authenticated* sub = (struct envoy_config_rbac_v3_Principal_Authenticated*)envoy_config_rbac_v3_Principal_authenticated(msg);
490   if (sub == NULL) {
491     sub = (struct envoy_config_rbac_v3_Principal_Authenticated*)_upb_msg_new(&envoy_config_rbac_v3_Principal_Authenticated_msginit, arena);
492     if (!sub) return NULL;
493     envoy_config_rbac_v3_Principal_set_authenticated(msg, sub);
494   }
495   return sub;
496 }
envoy_config_rbac_v3_Principal_set_source_ip(envoy_config_rbac_v3_Principal * msg,struct envoy_config_core_v3_CidrRange * value)497 UPB_INLINE void envoy_config_rbac_v3_Principal_set_source_ip(envoy_config_rbac_v3_Principal *msg, struct envoy_config_core_v3_CidrRange* value) {
498   UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_CidrRange*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 5);
499 }
envoy_config_rbac_v3_Principal_mutable_source_ip(envoy_config_rbac_v3_Principal * msg,upb_arena * arena)500 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) {
501   struct envoy_config_core_v3_CidrRange* sub = (struct envoy_config_core_v3_CidrRange*)envoy_config_rbac_v3_Principal_source_ip(msg);
502   if (sub == NULL) {
503     sub = (struct envoy_config_core_v3_CidrRange*)_upb_msg_new(&envoy_config_core_v3_CidrRange_msginit, arena);
504     if (!sub) return NULL;
505     envoy_config_rbac_v3_Principal_set_source_ip(msg, sub);
506   }
507   return sub;
508 }
envoy_config_rbac_v3_Principal_set_header(envoy_config_rbac_v3_Principal * msg,struct envoy_config_route_v3_HeaderMatcher * value)509 UPB_INLINE void envoy_config_rbac_v3_Principal_set_header(envoy_config_rbac_v3_Principal *msg, struct envoy_config_route_v3_HeaderMatcher* value) {
510   UPB_WRITE_ONEOF(msg, struct envoy_config_route_v3_HeaderMatcher*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 6);
511 }
envoy_config_rbac_v3_Principal_mutable_header(envoy_config_rbac_v3_Principal * msg,upb_arena * arena)512 UPB_INLINE struct envoy_config_route_v3_HeaderMatcher* envoy_config_rbac_v3_Principal_mutable_header(envoy_config_rbac_v3_Principal *msg, upb_arena *arena) {
513   struct envoy_config_route_v3_HeaderMatcher* sub = (struct envoy_config_route_v3_HeaderMatcher*)envoy_config_rbac_v3_Principal_header(msg);
514   if (sub == NULL) {
515     sub = (struct envoy_config_route_v3_HeaderMatcher*)_upb_msg_new(&envoy_config_route_v3_HeaderMatcher_msginit, arena);
516     if (!sub) return NULL;
517     envoy_config_rbac_v3_Principal_set_header(msg, sub);
518   }
519   return sub;
520 }
envoy_config_rbac_v3_Principal_set_metadata(envoy_config_rbac_v3_Principal * msg,struct envoy_type_matcher_v3_MetadataMatcher * value)521 UPB_INLINE void envoy_config_rbac_v3_Principal_set_metadata(envoy_config_rbac_v3_Principal *msg, struct envoy_type_matcher_v3_MetadataMatcher* value) {
522   UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_MetadataMatcher*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 7);
523 }
envoy_config_rbac_v3_Principal_mutable_metadata(envoy_config_rbac_v3_Principal * msg,upb_arena * arena)524 UPB_INLINE struct envoy_type_matcher_v3_MetadataMatcher* envoy_config_rbac_v3_Principal_mutable_metadata(envoy_config_rbac_v3_Principal *msg, upb_arena *arena) {
525   struct envoy_type_matcher_v3_MetadataMatcher* sub = (struct envoy_type_matcher_v3_MetadataMatcher*)envoy_config_rbac_v3_Principal_metadata(msg);
526   if (sub == NULL) {
527     sub = (struct envoy_type_matcher_v3_MetadataMatcher*)_upb_msg_new(&envoy_type_matcher_v3_MetadataMatcher_msginit, arena);
528     if (!sub) return NULL;
529     envoy_config_rbac_v3_Principal_set_metadata(msg, sub);
530   }
531   return sub;
532 }
envoy_config_rbac_v3_Principal_set_not_id(envoy_config_rbac_v3_Principal * msg,envoy_config_rbac_v3_Principal * value)533 UPB_INLINE void envoy_config_rbac_v3_Principal_set_not_id(envoy_config_rbac_v3_Principal *msg, envoy_config_rbac_v3_Principal* value) {
534   UPB_WRITE_ONEOF(msg, envoy_config_rbac_v3_Principal*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 8);
535 }
envoy_config_rbac_v3_Principal_mutable_not_id(envoy_config_rbac_v3_Principal * msg,upb_arena * arena)536 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) {
537   struct envoy_config_rbac_v3_Principal* sub = (struct envoy_config_rbac_v3_Principal*)envoy_config_rbac_v3_Principal_not_id(msg);
538   if (sub == NULL) {
539     sub = (struct envoy_config_rbac_v3_Principal*)_upb_msg_new(&envoy_config_rbac_v3_Principal_msginit, arena);
540     if (!sub) return NULL;
541     envoy_config_rbac_v3_Principal_set_not_id(msg, sub);
542   }
543   return sub;
544 }
envoy_config_rbac_v3_Principal_set_url_path(envoy_config_rbac_v3_Principal * msg,struct envoy_type_matcher_v3_PathMatcher * value)545 UPB_INLINE void envoy_config_rbac_v3_Principal_set_url_path(envoy_config_rbac_v3_Principal *msg, struct envoy_type_matcher_v3_PathMatcher* value) {
546   UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_PathMatcher*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 9);
547 }
envoy_config_rbac_v3_Principal_mutable_url_path(envoy_config_rbac_v3_Principal * msg,upb_arena * arena)548 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) {
549   struct envoy_type_matcher_v3_PathMatcher* sub = (struct envoy_type_matcher_v3_PathMatcher*)envoy_config_rbac_v3_Principal_url_path(msg);
550   if (sub == NULL) {
551     sub = (struct envoy_type_matcher_v3_PathMatcher*)_upb_msg_new(&envoy_type_matcher_v3_PathMatcher_msginit, arena);
552     if (!sub) return NULL;
553     envoy_config_rbac_v3_Principal_set_url_path(msg, sub);
554   }
555   return sub;
556 }
envoy_config_rbac_v3_Principal_set_direct_remote_ip(envoy_config_rbac_v3_Principal * msg,struct envoy_config_core_v3_CidrRange * value)557 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) {
558   UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_CidrRange*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 10);
559 }
envoy_config_rbac_v3_Principal_mutable_direct_remote_ip(envoy_config_rbac_v3_Principal * msg,upb_arena * arena)560 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) {
561   struct envoy_config_core_v3_CidrRange* sub = (struct envoy_config_core_v3_CidrRange*)envoy_config_rbac_v3_Principal_direct_remote_ip(msg);
562   if (sub == NULL) {
563     sub = (struct envoy_config_core_v3_CidrRange*)_upb_msg_new(&envoy_config_core_v3_CidrRange_msginit, arena);
564     if (!sub) return NULL;
565     envoy_config_rbac_v3_Principal_set_direct_remote_ip(msg, sub);
566   }
567   return sub;
568 }
envoy_config_rbac_v3_Principal_set_remote_ip(envoy_config_rbac_v3_Principal * msg,struct envoy_config_core_v3_CidrRange * value)569 UPB_INLINE void envoy_config_rbac_v3_Principal_set_remote_ip(envoy_config_rbac_v3_Principal *msg, struct envoy_config_core_v3_CidrRange* value) {
570   UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_CidrRange*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 11);
571 }
envoy_config_rbac_v3_Principal_mutable_remote_ip(envoy_config_rbac_v3_Principal * msg,upb_arena * arena)572 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) {
573   struct envoy_config_core_v3_CidrRange* sub = (struct envoy_config_core_v3_CidrRange*)envoy_config_rbac_v3_Principal_remote_ip(msg);
574   if (sub == NULL) {
575     sub = (struct envoy_config_core_v3_CidrRange*)_upb_msg_new(&envoy_config_core_v3_CidrRange_msginit, arena);
576     if (!sub) return NULL;
577     envoy_config_rbac_v3_Principal_set_remote_ip(msg, sub);
578   }
579   return sub;
580 }
581 
582 /* envoy.config.rbac.v3.Principal.Set */
583 
envoy_config_rbac_v3_Principal_Set_new(upb_arena * arena)584 UPB_INLINE envoy_config_rbac_v3_Principal_Set *envoy_config_rbac_v3_Principal_Set_new(upb_arena *arena) {
585   return (envoy_config_rbac_v3_Principal_Set *)_upb_msg_new(&envoy_config_rbac_v3_Principal_Set_msginit, arena);
586 }
envoy_config_rbac_v3_Principal_Set_parse(const char * buf,size_t size,upb_arena * arena)587 UPB_INLINE envoy_config_rbac_v3_Principal_Set *envoy_config_rbac_v3_Principal_Set_parse(const char *buf, size_t size,
588                         upb_arena *arena) {
589   envoy_config_rbac_v3_Principal_Set *ret = envoy_config_rbac_v3_Principal_Set_new(arena);
590   return (ret && upb_decode(buf, size, ret, &envoy_config_rbac_v3_Principal_Set_msginit, arena)) ? ret : NULL;
591 }
envoy_config_rbac_v3_Principal_Set_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)592 UPB_INLINE envoy_config_rbac_v3_Principal_Set *envoy_config_rbac_v3_Principal_Set_parse_ex(const char *buf, size_t size,
593                            upb_arena *arena, int options) {
594   envoy_config_rbac_v3_Principal_Set *ret = envoy_config_rbac_v3_Principal_Set_new(arena);
595   return (ret && _upb_decode(buf, size, ret, &envoy_config_rbac_v3_Principal_Set_msginit, arena, options))
596       ? ret : NULL;
597 }
envoy_config_rbac_v3_Principal_Set_serialize(const envoy_config_rbac_v3_Principal_Set * msg,upb_arena * arena,size_t * len)598 UPB_INLINE char *envoy_config_rbac_v3_Principal_Set_serialize(const envoy_config_rbac_v3_Principal_Set *msg, upb_arena *arena, size_t *len) {
599   return upb_encode(msg, &envoy_config_rbac_v3_Principal_Set_msginit, arena, len);
600 }
601 
envoy_config_rbac_v3_Principal_Set_has_ids(const envoy_config_rbac_v3_Principal_Set * msg)602 UPB_INLINE bool envoy_config_rbac_v3_Principal_Set_has_ids(const envoy_config_rbac_v3_Principal_Set *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
envoy_config_rbac_v3_Principal_Set_ids(const envoy_config_rbac_v3_Principal_Set * msg,size_t * len)603 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) { return (const envoy_config_rbac_v3_Principal* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
604 
envoy_config_rbac_v3_Principal_Set_mutable_ids(envoy_config_rbac_v3_Principal_Set * msg,size_t * len)605 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) {
606   return (envoy_config_rbac_v3_Principal**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
607 }
envoy_config_rbac_v3_Principal_Set_resize_ids(envoy_config_rbac_v3_Principal_Set * msg,size_t len,upb_arena * arena)608 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) {
609   return (envoy_config_rbac_v3_Principal**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
610 }
envoy_config_rbac_v3_Principal_Set_add_ids(envoy_config_rbac_v3_Principal_Set * msg,upb_arena * arena)611 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) {
612   struct envoy_config_rbac_v3_Principal* sub = (struct envoy_config_rbac_v3_Principal*)_upb_msg_new(&envoy_config_rbac_v3_Principal_msginit, arena);
613   bool ok = _upb_array_append_accessor2(
614       msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
615   if (!ok) return NULL;
616   return sub;
617 }
618 
619 /* envoy.config.rbac.v3.Principal.Authenticated */
620 
envoy_config_rbac_v3_Principal_Authenticated_new(upb_arena * arena)621 UPB_INLINE envoy_config_rbac_v3_Principal_Authenticated *envoy_config_rbac_v3_Principal_Authenticated_new(upb_arena *arena) {
622   return (envoy_config_rbac_v3_Principal_Authenticated *)_upb_msg_new(&envoy_config_rbac_v3_Principal_Authenticated_msginit, arena);
623 }
envoy_config_rbac_v3_Principal_Authenticated_parse(const char * buf,size_t size,upb_arena * arena)624 UPB_INLINE envoy_config_rbac_v3_Principal_Authenticated *envoy_config_rbac_v3_Principal_Authenticated_parse(const char *buf, size_t size,
625                         upb_arena *arena) {
626   envoy_config_rbac_v3_Principal_Authenticated *ret = envoy_config_rbac_v3_Principal_Authenticated_new(arena);
627   return (ret && upb_decode(buf, size, ret, &envoy_config_rbac_v3_Principal_Authenticated_msginit, arena)) ? ret : NULL;
628 }
envoy_config_rbac_v3_Principal_Authenticated_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)629 UPB_INLINE envoy_config_rbac_v3_Principal_Authenticated *envoy_config_rbac_v3_Principal_Authenticated_parse_ex(const char *buf, size_t size,
630                            upb_arena *arena, int options) {
631   envoy_config_rbac_v3_Principal_Authenticated *ret = envoy_config_rbac_v3_Principal_Authenticated_new(arena);
632   return (ret && _upb_decode(buf, size, ret, &envoy_config_rbac_v3_Principal_Authenticated_msginit, arena, options))
633       ? ret : NULL;
634 }
envoy_config_rbac_v3_Principal_Authenticated_serialize(const envoy_config_rbac_v3_Principal_Authenticated * msg,upb_arena * arena,size_t * len)635 UPB_INLINE char *envoy_config_rbac_v3_Principal_Authenticated_serialize(const envoy_config_rbac_v3_Principal_Authenticated *msg, upb_arena *arena, size_t *len) {
636   return upb_encode(msg, &envoy_config_rbac_v3_Principal_Authenticated_msginit, arena, len);
637 }
638 
envoy_config_rbac_v3_Principal_Authenticated_has_principal_name(const envoy_config_rbac_v3_Principal_Authenticated * msg)639 UPB_INLINE bool envoy_config_rbac_v3_Principal_Authenticated_has_principal_name(const envoy_config_rbac_v3_Principal_Authenticated *msg) { return _upb_hasbit(msg, 1); }
envoy_config_rbac_v3_Principal_Authenticated_principal_name(const envoy_config_rbac_v3_Principal_Authenticated * msg)640 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) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_type_matcher_v3_StringMatcher*); }
641 
envoy_config_rbac_v3_Principal_Authenticated_set_principal_name(envoy_config_rbac_v3_Principal_Authenticated * msg,struct envoy_type_matcher_v3_StringMatcher * value)642 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) {
643   _upb_sethas(msg, 1);
644   *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_type_matcher_v3_StringMatcher*) = value;
645 }
envoy_config_rbac_v3_Principal_Authenticated_mutable_principal_name(envoy_config_rbac_v3_Principal_Authenticated * msg,upb_arena * arena)646 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) {
647   struct envoy_type_matcher_v3_StringMatcher* sub = (struct envoy_type_matcher_v3_StringMatcher*)envoy_config_rbac_v3_Principal_Authenticated_principal_name(msg);
648   if (sub == NULL) {
649     sub = (struct envoy_type_matcher_v3_StringMatcher*)_upb_msg_new(&envoy_type_matcher_v3_StringMatcher_msginit, arena);
650     if (!sub) return NULL;
651     envoy_config_rbac_v3_Principal_Authenticated_set_principal_name(msg, sub);
652   }
653   return sub;
654 }
655 
656 #ifdef __cplusplus
657 }  /* extern "C" */
658 #endif
659 
660 #include "upb/port_undef.inc"
661 
662 #endif  /* ENVOY_CONFIG_RBAC_V3_RBAC_PROTO_UPB_H_ */
663