1 /* This file was generated by upbc (the upb compiler) from the input
4 * google/api/expr/v1alpha1/checked.proto
6 * Do not edit -- your changes will be discarded when the file is
9 #ifndef GOOGLE_API_EXPR_V1ALPHA1_CHECKED_PROTO_UPB_H_
10 #define GOOGLE_API_EXPR_V1ALPHA1_CHECKED_PROTO_UPB_H_
12 #include "upb/msg_internal.h"
13 #include "upb/decode.h"
14 #include "upb/decode_fast.h"
15 #include "upb/encode.h"
17 #include "upb/port_def.inc"
23 struct google_api_expr_v1alpha1_CheckedExpr;
24 struct google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry;
25 struct google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry;
26 struct google_api_expr_v1alpha1_Type;
27 struct google_api_expr_v1alpha1_Type_ListType;
28 struct google_api_expr_v1alpha1_Type_MapType;
29 struct google_api_expr_v1alpha1_Type_FunctionType;
30 struct google_api_expr_v1alpha1_Type_AbstractType;
31 struct google_api_expr_v1alpha1_Decl;
32 struct google_api_expr_v1alpha1_Decl_IdentDecl;
33 struct google_api_expr_v1alpha1_Decl_FunctionDecl;
34 struct google_api_expr_v1alpha1_Decl_FunctionDecl_Overload;
35 struct google_api_expr_v1alpha1_Reference;
36 typedef struct google_api_expr_v1alpha1_CheckedExpr google_api_expr_v1alpha1_CheckedExpr;
37 typedef struct google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry;
38 typedef struct google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry;
39 typedef struct google_api_expr_v1alpha1_Type google_api_expr_v1alpha1_Type;
40 typedef struct google_api_expr_v1alpha1_Type_ListType google_api_expr_v1alpha1_Type_ListType;
41 typedef struct google_api_expr_v1alpha1_Type_MapType google_api_expr_v1alpha1_Type_MapType;
42 typedef struct google_api_expr_v1alpha1_Type_FunctionType google_api_expr_v1alpha1_Type_FunctionType;
43 typedef struct google_api_expr_v1alpha1_Type_AbstractType google_api_expr_v1alpha1_Type_AbstractType;
44 typedef struct google_api_expr_v1alpha1_Decl google_api_expr_v1alpha1_Decl;
45 typedef struct google_api_expr_v1alpha1_Decl_IdentDecl google_api_expr_v1alpha1_Decl_IdentDecl;
46 typedef struct google_api_expr_v1alpha1_Decl_FunctionDecl google_api_expr_v1alpha1_Decl_FunctionDecl;
47 typedef struct google_api_expr_v1alpha1_Decl_FunctionDecl_Overload google_api_expr_v1alpha1_Decl_FunctionDecl_Overload;
48 typedef struct google_api_expr_v1alpha1_Reference google_api_expr_v1alpha1_Reference;
49 extern const upb_msglayout google_api_expr_v1alpha1_CheckedExpr_msginit;
50 extern const upb_msglayout google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry_msginit;
51 extern const upb_msglayout google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry_msginit;
52 extern const upb_msglayout google_api_expr_v1alpha1_Type_msginit;
53 extern const upb_msglayout google_api_expr_v1alpha1_Type_ListType_msginit;
54 extern const upb_msglayout google_api_expr_v1alpha1_Type_MapType_msginit;
55 extern const upb_msglayout google_api_expr_v1alpha1_Type_FunctionType_msginit;
56 extern const upb_msglayout google_api_expr_v1alpha1_Type_AbstractType_msginit;
57 extern const upb_msglayout google_api_expr_v1alpha1_Decl_msginit;
58 extern const upb_msglayout google_api_expr_v1alpha1_Decl_IdentDecl_msginit;
59 extern const upb_msglayout google_api_expr_v1alpha1_Decl_FunctionDecl_msginit;
60 extern const upb_msglayout google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_msginit;
61 extern const upb_msglayout google_api_expr_v1alpha1_Reference_msginit;
62 struct google_api_expr_v1alpha1_Constant;
63 struct google_api_expr_v1alpha1_Expr;
64 struct google_api_expr_v1alpha1_SourceInfo;
65 struct google_protobuf_Empty;
66 extern const upb_msglayout google_api_expr_v1alpha1_Constant_msginit;
67 extern const upb_msglayout google_api_expr_v1alpha1_Expr_msginit;
68 extern const upb_msglayout google_api_expr_v1alpha1_SourceInfo_msginit;
69 extern const upb_msglayout google_protobuf_Empty_msginit;
72 google_api_expr_v1alpha1_Type_PRIMITIVE_TYPE_UNSPECIFIED = 0,
73 google_api_expr_v1alpha1_Type_BOOL = 1,
74 google_api_expr_v1alpha1_Type_INT64 = 2,
75 google_api_expr_v1alpha1_Type_UINT64 = 3,
76 google_api_expr_v1alpha1_Type_DOUBLE = 4,
77 google_api_expr_v1alpha1_Type_STRING = 5,
78 google_api_expr_v1alpha1_Type_BYTES = 6
79 } google_api_expr_v1alpha1_Type_PrimitiveType;
82 google_api_expr_v1alpha1_Type_WELL_KNOWN_TYPE_UNSPECIFIED = 0,
83 google_api_expr_v1alpha1_Type_ANY = 1,
84 google_api_expr_v1alpha1_Type_TIMESTAMP = 2,
85 google_api_expr_v1alpha1_Type_DURATION = 3
86 } google_api_expr_v1alpha1_Type_WellKnownType;
89 /* google.api.expr.v1alpha1.CheckedExpr */
91 UPB_INLINE google_api_expr_v1alpha1_CheckedExpr *google_api_expr_v1alpha1_CheckedExpr_new(upb_arena *arena) {
92 return (google_api_expr_v1alpha1_CheckedExpr *)_upb_msg_new(&google_api_expr_v1alpha1_CheckedExpr_msginit, arena);
94 UPB_INLINE google_api_expr_v1alpha1_CheckedExpr *google_api_expr_v1alpha1_CheckedExpr_parse(const char *buf, size_t size,
96 google_api_expr_v1alpha1_CheckedExpr *ret = google_api_expr_v1alpha1_CheckedExpr_new(arena);
97 if (!ret) return NULL;
98 if (!upb_decode(buf, size, ret, &google_api_expr_v1alpha1_CheckedExpr_msginit, arena)) return NULL;
101 UPB_INLINE google_api_expr_v1alpha1_CheckedExpr *google_api_expr_v1alpha1_CheckedExpr_parse_ex(const char *buf, size_t size,
102 const upb_extreg *extreg, int options,
104 google_api_expr_v1alpha1_CheckedExpr *ret = google_api_expr_v1alpha1_CheckedExpr_new(arena);
105 if (!ret) return NULL;
106 if (!_upb_decode(buf, size, ret, &google_api_expr_v1alpha1_CheckedExpr_msginit, extreg, options, arena)) {
111 UPB_INLINE char *google_api_expr_v1alpha1_CheckedExpr_serialize(const google_api_expr_v1alpha1_CheckedExpr *msg, upb_arena *arena, size_t *len) {
112 return upb_encode(msg, &google_api_expr_v1alpha1_CheckedExpr_msginit, arena, len);
115 UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_has_reference_map(const google_api_expr_v1alpha1_CheckedExpr *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
116 UPB_INLINE size_t google_api_expr_v1alpha1_CheckedExpr_reference_map_size(const google_api_expr_v1alpha1_CheckedExpr *msg) {return _upb_msg_map_size(msg, UPB_SIZE(12, 24)); }
117 UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_reference_map_get(const google_api_expr_v1alpha1_CheckedExpr *msg, int64_t key, google_api_expr_v1alpha1_Reference* *val) { return _upb_msg_map_get(msg, UPB_SIZE(12, 24), &key, sizeof(key), val, sizeof(*val)); }
118 UPB_INLINE const google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry* google_api_expr_v1alpha1_CheckedExpr_reference_map_next(const google_api_expr_v1alpha1_CheckedExpr *msg, size_t* iter) { return (const google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry*)_upb_msg_map_next(msg, UPB_SIZE(12, 24), iter); }
119 UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_has_type_map(const google_api_expr_v1alpha1_CheckedExpr *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
120 UPB_INLINE size_t google_api_expr_v1alpha1_CheckedExpr_type_map_size(const google_api_expr_v1alpha1_CheckedExpr *msg) {return _upb_msg_map_size(msg, UPB_SIZE(16, 32)); }
121 UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_type_map_get(const google_api_expr_v1alpha1_CheckedExpr *msg, int64_t key, google_api_expr_v1alpha1_Type* *val) { return _upb_msg_map_get(msg, UPB_SIZE(16, 32), &key, sizeof(key), val, sizeof(*val)); }
122 UPB_INLINE const google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry* google_api_expr_v1alpha1_CheckedExpr_type_map_next(const google_api_expr_v1alpha1_CheckedExpr *msg, size_t* iter) { return (const google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry*)_upb_msg_map_next(msg, UPB_SIZE(16, 32), iter); }
123 UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_has_expr(const google_api_expr_v1alpha1_CheckedExpr *msg) { return _upb_hasbit(msg, 1); }
124 UPB_INLINE const struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_CheckedExpr_expr(const google_api_expr_v1alpha1_CheckedExpr *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_api_expr_v1alpha1_Expr*); }
125 UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_has_source_info(const google_api_expr_v1alpha1_CheckedExpr *msg) { return _upb_hasbit(msg, 2); }
126 UPB_INLINE const struct google_api_expr_v1alpha1_SourceInfo* google_api_expr_v1alpha1_CheckedExpr_source_info(const google_api_expr_v1alpha1_CheckedExpr *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_api_expr_v1alpha1_SourceInfo*); }
128 UPB_INLINE void google_api_expr_v1alpha1_CheckedExpr_reference_map_clear(google_api_expr_v1alpha1_CheckedExpr *msg) { _upb_msg_map_clear(msg, UPB_SIZE(12, 24)); }
129 UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_reference_map_set(google_api_expr_v1alpha1_CheckedExpr *msg, int64_t key, google_api_expr_v1alpha1_Reference* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(12, 24), &key, sizeof(key), &val, sizeof(val), a); }
130 UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_reference_map_delete(google_api_expr_v1alpha1_CheckedExpr *msg, int64_t key) { return _upb_msg_map_delete(msg, UPB_SIZE(12, 24), &key, sizeof(key)); }
131 UPB_INLINE google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry* google_api_expr_v1alpha1_CheckedExpr_reference_map_nextmutable(google_api_expr_v1alpha1_CheckedExpr *msg, size_t* iter) { return (google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry*)_upb_msg_map_next(msg, UPB_SIZE(12, 24), iter); }
132 UPB_INLINE void google_api_expr_v1alpha1_CheckedExpr_type_map_clear(google_api_expr_v1alpha1_CheckedExpr *msg) { _upb_msg_map_clear(msg, UPB_SIZE(16, 32)); }
133 UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_type_map_set(google_api_expr_v1alpha1_CheckedExpr *msg, int64_t key, google_api_expr_v1alpha1_Type* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(16, 32), &key, sizeof(key), &val, sizeof(val), a); }
134 UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_type_map_delete(google_api_expr_v1alpha1_CheckedExpr *msg, int64_t key) { return _upb_msg_map_delete(msg, UPB_SIZE(16, 32), &key, sizeof(key)); }
135 UPB_INLINE google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry* google_api_expr_v1alpha1_CheckedExpr_type_map_nextmutable(google_api_expr_v1alpha1_CheckedExpr *msg, size_t* iter) { return (google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry*)_upb_msg_map_next(msg, UPB_SIZE(16, 32), iter); }
136 UPB_INLINE void google_api_expr_v1alpha1_CheckedExpr_set_expr(google_api_expr_v1alpha1_CheckedExpr *msg, struct google_api_expr_v1alpha1_Expr* value) {
138 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_api_expr_v1alpha1_Expr*) = value;
140 UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_CheckedExpr_mutable_expr(google_api_expr_v1alpha1_CheckedExpr *msg, upb_arena *arena) {
141 struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_CheckedExpr_expr(msg);
143 sub = (struct google_api_expr_v1alpha1_Expr*)_upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena);
144 if (!sub) return NULL;
145 google_api_expr_v1alpha1_CheckedExpr_set_expr(msg, sub);
149 UPB_INLINE void google_api_expr_v1alpha1_CheckedExpr_set_source_info(google_api_expr_v1alpha1_CheckedExpr *msg, struct google_api_expr_v1alpha1_SourceInfo* value) {
151 *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_api_expr_v1alpha1_SourceInfo*) = value;
153 UPB_INLINE struct google_api_expr_v1alpha1_SourceInfo* google_api_expr_v1alpha1_CheckedExpr_mutable_source_info(google_api_expr_v1alpha1_CheckedExpr *msg, upb_arena *arena) {
154 struct google_api_expr_v1alpha1_SourceInfo* sub = (struct google_api_expr_v1alpha1_SourceInfo*)google_api_expr_v1alpha1_CheckedExpr_source_info(msg);
156 sub = (struct google_api_expr_v1alpha1_SourceInfo*)_upb_msg_new(&google_api_expr_v1alpha1_SourceInfo_msginit, arena);
157 if (!sub) return NULL;
158 google_api_expr_v1alpha1_CheckedExpr_set_source_info(msg, sub);
163 /* google.api.expr.v1alpha1.CheckedExpr.ReferenceMapEntry */
165 UPB_INLINE int64_t google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry_key(const google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry *msg) {
167 _upb_msg_map_key(msg, &ret, sizeof(ret));
170 UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry_has_value(const google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
171 UPB_INLINE const google_api_expr_v1alpha1_Reference* google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry_value(const google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry *msg) {
172 google_api_expr_v1alpha1_Reference* ret;
173 _upb_msg_map_value(msg, &ret, sizeof(ret));
177 UPB_INLINE void google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry_set_value(google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry *msg, google_api_expr_v1alpha1_Reference* value) {
178 _upb_msg_map_set_value(msg, &value, sizeof(google_api_expr_v1alpha1_Reference*));
181 /* google.api.expr.v1alpha1.CheckedExpr.TypeMapEntry */
183 UPB_INLINE int64_t google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry_key(const google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry *msg) {
185 _upb_msg_map_key(msg, &ret, sizeof(ret));
188 UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry_has_value(const google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
189 UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry_value(const google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry *msg) {
190 google_api_expr_v1alpha1_Type* ret;
191 _upb_msg_map_value(msg, &ret, sizeof(ret));
195 UPB_INLINE void google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry_set_value(google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry *msg, google_api_expr_v1alpha1_Type* value) {
196 _upb_msg_map_set_value(msg, &value, sizeof(google_api_expr_v1alpha1_Type*));
199 /* google.api.expr.v1alpha1.Type */
201 UPB_INLINE google_api_expr_v1alpha1_Type *google_api_expr_v1alpha1_Type_new(upb_arena *arena) {
202 return (google_api_expr_v1alpha1_Type *)_upb_msg_new(&google_api_expr_v1alpha1_Type_msginit, arena);
204 UPB_INLINE google_api_expr_v1alpha1_Type *google_api_expr_v1alpha1_Type_parse(const char *buf, size_t size,
206 google_api_expr_v1alpha1_Type *ret = google_api_expr_v1alpha1_Type_new(arena);
207 if (!ret) return NULL;
208 if (!upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Type_msginit, arena)) return NULL;
211 UPB_INLINE google_api_expr_v1alpha1_Type *google_api_expr_v1alpha1_Type_parse_ex(const char *buf, size_t size,
212 const upb_extreg *extreg, int options,
214 google_api_expr_v1alpha1_Type *ret = google_api_expr_v1alpha1_Type_new(arena);
215 if (!ret) return NULL;
216 if (!_upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Type_msginit, extreg, options, arena)) {
221 UPB_INLINE char *google_api_expr_v1alpha1_Type_serialize(const google_api_expr_v1alpha1_Type *msg, upb_arena *arena, size_t *len) {
222 return upb_encode(msg, &google_api_expr_v1alpha1_Type_msginit, arena, len);
226 google_api_expr_v1alpha1_Type_type_kind_dyn = 1,
227 google_api_expr_v1alpha1_Type_type_kind_null = 2,
228 google_api_expr_v1alpha1_Type_type_kind_primitive = 3,
229 google_api_expr_v1alpha1_Type_type_kind_wrapper = 4,
230 google_api_expr_v1alpha1_Type_type_kind_well_known = 5,
231 google_api_expr_v1alpha1_Type_type_kind_list_type = 6,
232 google_api_expr_v1alpha1_Type_type_kind_map_type = 7,
233 google_api_expr_v1alpha1_Type_type_kind_function = 8,
234 google_api_expr_v1alpha1_Type_type_kind_message_type = 9,
235 google_api_expr_v1alpha1_Type_type_kind_type_param = 10,
236 google_api_expr_v1alpha1_Type_type_kind_type = 11,
237 google_api_expr_v1alpha1_Type_type_kind_error = 12,
238 google_api_expr_v1alpha1_Type_type_kind_abstract_type = 14,
239 google_api_expr_v1alpha1_Type_type_kind_NOT_SET = 0
240 } google_api_expr_v1alpha1_Type_type_kind_oneofcases;
241 UPB_INLINE google_api_expr_v1alpha1_Type_type_kind_oneofcases google_api_expr_v1alpha1_Type_type_kind_case(const google_api_expr_v1alpha1_Type* msg) { return (google_api_expr_v1alpha1_Type_type_kind_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(8, 16), int32_t); }
243 UPB_INLINE bool google_api_expr_v1alpha1_Type_has_dyn(const google_api_expr_v1alpha1_Type *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 1; }
244 UPB_INLINE const struct google_protobuf_Empty* google_api_expr_v1alpha1_Type_dyn(const google_api_expr_v1alpha1_Type *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Empty*, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 1, NULL); }
245 UPB_INLINE bool google_api_expr_v1alpha1_Type_has_null(const google_api_expr_v1alpha1_Type *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 2; }
246 UPB_INLINE int32_t google_api_expr_v1alpha1_Type_null(const google_api_expr_v1alpha1_Type *msg) { return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 2, 0); }
247 UPB_INLINE bool google_api_expr_v1alpha1_Type_has_primitive(const google_api_expr_v1alpha1_Type *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 3; }
248 UPB_INLINE int32_t google_api_expr_v1alpha1_Type_primitive(const google_api_expr_v1alpha1_Type *msg) { return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 3, 0); }
249 UPB_INLINE bool google_api_expr_v1alpha1_Type_has_wrapper(const google_api_expr_v1alpha1_Type *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 4; }
250 UPB_INLINE int32_t google_api_expr_v1alpha1_Type_wrapper(const google_api_expr_v1alpha1_Type *msg) { return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 4, 0); }
251 UPB_INLINE bool google_api_expr_v1alpha1_Type_has_well_known(const google_api_expr_v1alpha1_Type *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 5; }
252 UPB_INLINE int32_t google_api_expr_v1alpha1_Type_well_known(const google_api_expr_v1alpha1_Type *msg) { return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 5, 0); }
253 UPB_INLINE bool google_api_expr_v1alpha1_Type_has_list_type(const google_api_expr_v1alpha1_Type *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 6; }
254 UPB_INLINE const google_api_expr_v1alpha1_Type_ListType* google_api_expr_v1alpha1_Type_list_type(const google_api_expr_v1alpha1_Type *msg) { return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Type_ListType*, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 6, NULL); }
255 UPB_INLINE bool google_api_expr_v1alpha1_Type_has_map_type(const google_api_expr_v1alpha1_Type *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 7; }
256 UPB_INLINE const google_api_expr_v1alpha1_Type_MapType* google_api_expr_v1alpha1_Type_map_type(const google_api_expr_v1alpha1_Type *msg) { return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Type_MapType*, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 7, NULL); }
257 UPB_INLINE bool google_api_expr_v1alpha1_Type_has_function(const google_api_expr_v1alpha1_Type *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 8; }
258 UPB_INLINE const google_api_expr_v1alpha1_Type_FunctionType* google_api_expr_v1alpha1_Type_function(const google_api_expr_v1alpha1_Type *msg) { return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Type_FunctionType*, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 8, NULL); }
259 UPB_INLINE bool google_api_expr_v1alpha1_Type_has_message_type(const google_api_expr_v1alpha1_Type *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 9; }
260 UPB_INLINE upb_strview google_api_expr_v1alpha1_Type_message_type(const google_api_expr_v1alpha1_Type *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 9, upb_strview_make("", strlen(""))); }
261 UPB_INLINE bool google_api_expr_v1alpha1_Type_has_type_param(const google_api_expr_v1alpha1_Type *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 10; }
262 UPB_INLINE upb_strview google_api_expr_v1alpha1_Type_type_param(const google_api_expr_v1alpha1_Type *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 10, upb_strview_make("", strlen(""))); }
263 UPB_INLINE bool google_api_expr_v1alpha1_Type_has_type(const google_api_expr_v1alpha1_Type *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 11; }
264 UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_type(const google_api_expr_v1alpha1_Type *msg) { return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Type*, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 11, NULL); }
265 UPB_INLINE bool google_api_expr_v1alpha1_Type_has_error(const google_api_expr_v1alpha1_Type *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 12; }
266 UPB_INLINE const struct google_protobuf_Empty* google_api_expr_v1alpha1_Type_error(const google_api_expr_v1alpha1_Type *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Empty*, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 12, NULL); }
267 UPB_INLINE bool google_api_expr_v1alpha1_Type_has_abstract_type(const google_api_expr_v1alpha1_Type *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 14; }
268 UPB_INLINE const google_api_expr_v1alpha1_Type_AbstractType* google_api_expr_v1alpha1_Type_abstract_type(const google_api_expr_v1alpha1_Type *msg) { return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Type_AbstractType*, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 14, NULL); }
270 UPB_INLINE void google_api_expr_v1alpha1_Type_set_dyn(google_api_expr_v1alpha1_Type *msg, struct google_protobuf_Empty* value) {
271 UPB_WRITE_ONEOF(msg, struct google_protobuf_Empty*, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 1);
273 UPB_INLINE struct google_protobuf_Empty* google_api_expr_v1alpha1_Type_mutable_dyn(google_api_expr_v1alpha1_Type *msg, upb_arena *arena) {
274 struct google_protobuf_Empty* sub = (struct google_protobuf_Empty*)google_api_expr_v1alpha1_Type_dyn(msg);
276 sub = (struct google_protobuf_Empty*)_upb_msg_new(&google_protobuf_Empty_msginit, arena);
277 if (!sub) return NULL;
278 google_api_expr_v1alpha1_Type_set_dyn(msg, sub);
282 UPB_INLINE void google_api_expr_v1alpha1_Type_set_null(google_api_expr_v1alpha1_Type *msg, int32_t value) {
283 UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 2);
285 UPB_INLINE void google_api_expr_v1alpha1_Type_set_primitive(google_api_expr_v1alpha1_Type *msg, int32_t value) {
286 UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 3);
288 UPB_INLINE void google_api_expr_v1alpha1_Type_set_wrapper(google_api_expr_v1alpha1_Type *msg, int32_t value) {
289 UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 4);
291 UPB_INLINE void google_api_expr_v1alpha1_Type_set_well_known(google_api_expr_v1alpha1_Type *msg, int32_t value) {
292 UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 5);
294 UPB_INLINE void google_api_expr_v1alpha1_Type_set_list_type(google_api_expr_v1alpha1_Type *msg, google_api_expr_v1alpha1_Type_ListType* value) {
295 UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Type_ListType*, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 6);
297 UPB_INLINE struct google_api_expr_v1alpha1_Type_ListType* google_api_expr_v1alpha1_Type_mutable_list_type(google_api_expr_v1alpha1_Type *msg, upb_arena *arena) {
298 struct google_api_expr_v1alpha1_Type_ListType* sub = (struct google_api_expr_v1alpha1_Type_ListType*)google_api_expr_v1alpha1_Type_list_type(msg);
300 sub = (struct google_api_expr_v1alpha1_Type_ListType*)_upb_msg_new(&google_api_expr_v1alpha1_Type_ListType_msginit, arena);
301 if (!sub) return NULL;
302 google_api_expr_v1alpha1_Type_set_list_type(msg, sub);
306 UPB_INLINE void google_api_expr_v1alpha1_Type_set_map_type(google_api_expr_v1alpha1_Type *msg, google_api_expr_v1alpha1_Type_MapType* value) {
307 UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Type_MapType*, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 7);
309 UPB_INLINE struct google_api_expr_v1alpha1_Type_MapType* google_api_expr_v1alpha1_Type_mutable_map_type(google_api_expr_v1alpha1_Type *msg, upb_arena *arena) {
310 struct google_api_expr_v1alpha1_Type_MapType* sub = (struct google_api_expr_v1alpha1_Type_MapType*)google_api_expr_v1alpha1_Type_map_type(msg);
312 sub = (struct google_api_expr_v1alpha1_Type_MapType*)_upb_msg_new(&google_api_expr_v1alpha1_Type_MapType_msginit, arena);
313 if (!sub) return NULL;
314 google_api_expr_v1alpha1_Type_set_map_type(msg, sub);
318 UPB_INLINE void google_api_expr_v1alpha1_Type_set_function(google_api_expr_v1alpha1_Type *msg, google_api_expr_v1alpha1_Type_FunctionType* value) {
319 UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Type_FunctionType*, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 8);
321 UPB_INLINE struct google_api_expr_v1alpha1_Type_FunctionType* google_api_expr_v1alpha1_Type_mutable_function(google_api_expr_v1alpha1_Type *msg, upb_arena *arena) {
322 struct google_api_expr_v1alpha1_Type_FunctionType* sub = (struct google_api_expr_v1alpha1_Type_FunctionType*)google_api_expr_v1alpha1_Type_function(msg);
324 sub = (struct google_api_expr_v1alpha1_Type_FunctionType*)_upb_msg_new(&google_api_expr_v1alpha1_Type_FunctionType_msginit, arena);
325 if (!sub) return NULL;
326 google_api_expr_v1alpha1_Type_set_function(msg, sub);
330 UPB_INLINE void google_api_expr_v1alpha1_Type_set_message_type(google_api_expr_v1alpha1_Type *msg, upb_strview value) {
331 UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 9);
333 UPB_INLINE void google_api_expr_v1alpha1_Type_set_type_param(google_api_expr_v1alpha1_Type *msg, upb_strview value) {
334 UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 10);
336 UPB_INLINE void google_api_expr_v1alpha1_Type_set_type(google_api_expr_v1alpha1_Type *msg, google_api_expr_v1alpha1_Type* value) {
337 UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Type*, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 11);
339 UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_mutable_type(google_api_expr_v1alpha1_Type *msg, upb_arena *arena) {
340 struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)google_api_expr_v1alpha1_Type_type(msg);
342 sub = (struct google_api_expr_v1alpha1_Type*)_upb_msg_new(&google_api_expr_v1alpha1_Type_msginit, arena);
343 if (!sub) return NULL;
344 google_api_expr_v1alpha1_Type_set_type(msg, sub);
348 UPB_INLINE void google_api_expr_v1alpha1_Type_set_error(google_api_expr_v1alpha1_Type *msg, struct google_protobuf_Empty* value) {
349 UPB_WRITE_ONEOF(msg, struct google_protobuf_Empty*, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 12);
351 UPB_INLINE struct google_protobuf_Empty* google_api_expr_v1alpha1_Type_mutable_error(google_api_expr_v1alpha1_Type *msg, upb_arena *arena) {
352 struct google_protobuf_Empty* sub = (struct google_protobuf_Empty*)google_api_expr_v1alpha1_Type_error(msg);
354 sub = (struct google_protobuf_Empty*)_upb_msg_new(&google_protobuf_Empty_msginit, arena);
355 if (!sub) return NULL;
356 google_api_expr_v1alpha1_Type_set_error(msg, sub);
360 UPB_INLINE void google_api_expr_v1alpha1_Type_set_abstract_type(google_api_expr_v1alpha1_Type *msg, google_api_expr_v1alpha1_Type_AbstractType* value) {
361 UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Type_AbstractType*, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 14);
363 UPB_INLINE struct google_api_expr_v1alpha1_Type_AbstractType* google_api_expr_v1alpha1_Type_mutable_abstract_type(google_api_expr_v1alpha1_Type *msg, upb_arena *arena) {
364 struct google_api_expr_v1alpha1_Type_AbstractType* sub = (struct google_api_expr_v1alpha1_Type_AbstractType*)google_api_expr_v1alpha1_Type_abstract_type(msg);
366 sub = (struct google_api_expr_v1alpha1_Type_AbstractType*)_upb_msg_new(&google_api_expr_v1alpha1_Type_AbstractType_msginit, arena);
367 if (!sub) return NULL;
368 google_api_expr_v1alpha1_Type_set_abstract_type(msg, sub);
373 /* google.api.expr.v1alpha1.Type.ListType */
375 UPB_INLINE google_api_expr_v1alpha1_Type_ListType *google_api_expr_v1alpha1_Type_ListType_new(upb_arena *arena) {
376 return (google_api_expr_v1alpha1_Type_ListType *)_upb_msg_new(&google_api_expr_v1alpha1_Type_ListType_msginit, arena);
378 UPB_INLINE google_api_expr_v1alpha1_Type_ListType *google_api_expr_v1alpha1_Type_ListType_parse(const char *buf, size_t size,
380 google_api_expr_v1alpha1_Type_ListType *ret = google_api_expr_v1alpha1_Type_ListType_new(arena);
381 if (!ret) return NULL;
382 if (!upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Type_ListType_msginit, arena)) return NULL;
385 UPB_INLINE google_api_expr_v1alpha1_Type_ListType *google_api_expr_v1alpha1_Type_ListType_parse_ex(const char *buf, size_t size,
386 const upb_extreg *extreg, int options,
388 google_api_expr_v1alpha1_Type_ListType *ret = google_api_expr_v1alpha1_Type_ListType_new(arena);
389 if (!ret) return NULL;
390 if (!_upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Type_ListType_msginit, extreg, options, arena)) {
395 UPB_INLINE char *google_api_expr_v1alpha1_Type_ListType_serialize(const google_api_expr_v1alpha1_Type_ListType *msg, upb_arena *arena, size_t *len) {
396 return upb_encode(msg, &google_api_expr_v1alpha1_Type_ListType_msginit, arena, len);
399 UPB_INLINE bool google_api_expr_v1alpha1_Type_ListType_has_elem_type(const google_api_expr_v1alpha1_Type_ListType *msg) { return _upb_hasbit(msg, 1); }
400 UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_ListType_elem_type(const google_api_expr_v1alpha1_Type_ListType *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const google_api_expr_v1alpha1_Type*); }
402 UPB_INLINE void google_api_expr_v1alpha1_Type_ListType_set_elem_type(google_api_expr_v1alpha1_Type_ListType *msg, google_api_expr_v1alpha1_Type* value) {
404 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), google_api_expr_v1alpha1_Type*) = value;
406 UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_ListType_mutable_elem_type(google_api_expr_v1alpha1_Type_ListType *msg, upb_arena *arena) {
407 struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)google_api_expr_v1alpha1_Type_ListType_elem_type(msg);
409 sub = (struct google_api_expr_v1alpha1_Type*)_upb_msg_new(&google_api_expr_v1alpha1_Type_msginit, arena);
410 if (!sub) return NULL;
411 google_api_expr_v1alpha1_Type_ListType_set_elem_type(msg, sub);
416 /* google.api.expr.v1alpha1.Type.MapType */
418 UPB_INLINE google_api_expr_v1alpha1_Type_MapType *google_api_expr_v1alpha1_Type_MapType_new(upb_arena *arena) {
419 return (google_api_expr_v1alpha1_Type_MapType *)_upb_msg_new(&google_api_expr_v1alpha1_Type_MapType_msginit, arena);
421 UPB_INLINE google_api_expr_v1alpha1_Type_MapType *google_api_expr_v1alpha1_Type_MapType_parse(const char *buf, size_t size,
423 google_api_expr_v1alpha1_Type_MapType *ret = google_api_expr_v1alpha1_Type_MapType_new(arena);
424 if (!ret) return NULL;
425 if (!upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Type_MapType_msginit, arena)) return NULL;
428 UPB_INLINE google_api_expr_v1alpha1_Type_MapType *google_api_expr_v1alpha1_Type_MapType_parse_ex(const char *buf, size_t size,
429 const upb_extreg *extreg, int options,
431 google_api_expr_v1alpha1_Type_MapType *ret = google_api_expr_v1alpha1_Type_MapType_new(arena);
432 if (!ret) return NULL;
433 if (!_upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Type_MapType_msginit, extreg, options, arena)) {
438 UPB_INLINE char *google_api_expr_v1alpha1_Type_MapType_serialize(const google_api_expr_v1alpha1_Type_MapType *msg, upb_arena *arena, size_t *len) {
439 return upb_encode(msg, &google_api_expr_v1alpha1_Type_MapType_msginit, arena, len);
442 UPB_INLINE bool google_api_expr_v1alpha1_Type_MapType_has_key_type(const google_api_expr_v1alpha1_Type_MapType *msg) { return _upb_hasbit(msg, 1); }
443 UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_MapType_key_type(const google_api_expr_v1alpha1_Type_MapType *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const google_api_expr_v1alpha1_Type*); }
444 UPB_INLINE bool google_api_expr_v1alpha1_Type_MapType_has_value_type(const google_api_expr_v1alpha1_Type_MapType *msg) { return _upb_hasbit(msg, 2); }
445 UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_MapType_value_type(const google_api_expr_v1alpha1_Type_MapType *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const google_api_expr_v1alpha1_Type*); }
447 UPB_INLINE void google_api_expr_v1alpha1_Type_MapType_set_key_type(google_api_expr_v1alpha1_Type_MapType *msg, google_api_expr_v1alpha1_Type* value) {
449 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), google_api_expr_v1alpha1_Type*) = value;
451 UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_MapType_mutable_key_type(google_api_expr_v1alpha1_Type_MapType *msg, upb_arena *arena) {
452 struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)google_api_expr_v1alpha1_Type_MapType_key_type(msg);
454 sub = (struct google_api_expr_v1alpha1_Type*)_upb_msg_new(&google_api_expr_v1alpha1_Type_msginit, arena);
455 if (!sub) return NULL;
456 google_api_expr_v1alpha1_Type_MapType_set_key_type(msg, sub);
460 UPB_INLINE void google_api_expr_v1alpha1_Type_MapType_set_value_type(google_api_expr_v1alpha1_Type_MapType *msg, google_api_expr_v1alpha1_Type* value) {
462 *UPB_PTR_AT(msg, UPB_SIZE(8, 16), google_api_expr_v1alpha1_Type*) = value;
464 UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_MapType_mutable_value_type(google_api_expr_v1alpha1_Type_MapType *msg, upb_arena *arena) {
465 struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)google_api_expr_v1alpha1_Type_MapType_value_type(msg);
467 sub = (struct google_api_expr_v1alpha1_Type*)_upb_msg_new(&google_api_expr_v1alpha1_Type_msginit, arena);
468 if (!sub) return NULL;
469 google_api_expr_v1alpha1_Type_MapType_set_value_type(msg, sub);
474 /* google.api.expr.v1alpha1.Type.FunctionType */
476 UPB_INLINE google_api_expr_v1alpha1_Type_FunctionType *google_api_expr_v1alpha1_Type_FunctionType_new(upb_arena *arena) {
477 return (google_api_expr_v1alpha1_Type_FunctionType *)_upb_msg_new(&google_api_expr_v1alpha1_Type_FunctionType_msginit, arena);
479 UPB_INLINE google_api_expr_v1alpha1_Type_FunctionType *google_api_expr_v1alpha1_Type_FunctionType_parse(const char *buf, size_t size,
481 google_api_expr_v1alpha1_Type_FunctionType *ret = google_api_expr_v1alpha1_Type_FunctionType_new(arena);
482 if (!ret) return NULL;
483 if (!upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Type_FunctionType_msginit, arena)) return NULL;
486 UPB_INLINE google_api_expr_v1alpha1_Type_FunctionType *google_api_expr_v1alpha1_Type_FunctionType_parse_ex(const char *buf, size_t size,
487 const upb_extreg *extreg, int options,
489 google_api_expr_v1alpha1_Type_FunctionType *ret = google_api_expr_v1alpha1_Type_FunctionType_new(arena);
490 if (!ret) return NULL;
491 if (!_upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Type_FunctionType_msginit, extreg, options, arena)) {
496 UPB_INLINE char *google_api_expr_v1alpha1_Type_FunctionType_serialize(const google_api_expr_v1alpha1_Type_FunctionType *msg, upb_arena *arena, size_t *len) {
497 return upb_encode(msg, &google_api_expr_v1alpha1_Type_FunctionType_msginit, arena, len);
500 UPB_INLINE bool google_api_expr_v1alpha1_Type_FunctionType_has_result_type(const google_api_expr_v1alpha1_Type_FunctionType *msg) { return _upb_hasbit(msg, 1); }
501 UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_FunctionType_result_type(const google_api_expr_v1alpha1_Type_FunctionType *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const google_api_expr_v1alpha1_Type*); }
502 UPB_INLINE bool google_api_expr_v1alpha1_Type_FunctionType_has_arg_types(const google_api_expr_v1alpha1_Type_FunctionType *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
503 UPB_INLINE const google_api_expr_v1alpha1_Type* const* google_api_expr_v1alpha1_Type_FunctionType_arg_types(const google_api_expr_v1alpha1_Type_FunctionType *msg, size_t *len) { return (const google_api_expr_v1alpha1_Type* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
505 UPB_INLINE void google_api_expr_v1alpha1_Type_FunctionType_set_result_type(google_api_expr_v1alpha1_Type_FunctionType *msg, google_api_expr_v1alpha1_Type* value) {
507 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), google_api_expr_v1alpha1_Type*) = value;
509 UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_FunctionType_mutable_result_type(google_api_expr_v1alpha1_Type_FunctionType *msg, upb_arena *arena) {
510 struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)google_api_expr_v1alpha1_Type_FunctionType_result_type(msg);
512 sub = (struct google_api_expr_v1alpha1_Type*)_upb_msg_new(&google_api_expr_v1alpha1_Type_msginit, arena);
513 if (!sub) return NULL;
514 google_api_expr_v1alpha1_Type_FunctionType_set_result_type(msg, sub);
518 UPB_INLINE google_api_expr_v1alpha1_Type** google_api_expr_v1alpha1_Type_FunctionType_mutable_arg_types(google_api_expr_v1alpha1_Type_FunctionType *msg, size_t *len) {
519 return (google_api_expr_v1alpha1_Type**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
521 UPB_INLINE google_api_expr_v1alpha1_Type** google_api_expr_v1alpha1_Type_FunctionType_resize_arg_types(google_api_expr_v1alpha1_Type_FunctionType *msg, size_t len, upb_arena *arena) {
522 return (google_api_expr_v1alpha1_Type**)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena);
524 UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_FunctionType_add_arg_types(google_api_expr_v1alpha1_Type_FunctionType *msg, upb_arena *arena) {
525 struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)_upb_msg_new(&google_api_expr_v1alpha1_Type_msginit, arena);
526 bool ok = _upb_array_append_accessor2(
527 msg, UPB_SIZE(8, 16), UPB_SIZE(2, 3), &sub, arena);
528 if (!ok) return NULL;
532 /* google.api.expr.v1alpha1.Type.AbstractType */
534 UPB_INLINE google_api_expr_v1alpha1_Type_AbstractType *google_api_expr_v1alpha1_Type_AbstractType_new(upb_arena *arena) {
535 return (google_api_expr_v1alpha1_Type_AbstractType *)_upb_msg_new(&google_api_expr_v1alpha1_Type_AbstractType_msginit, arena);
537 UPB_INLINE google_api_expr_v1alpha1_Type_AbstractType *google_api_expr_v1alpha1_Type_AbstractType_parse(const char *buf, size_t size,
539 google_api_expr_v1alpha1_Type_AbstractType *ret = google_api_expr_v1alpha1_Type_AbstractType_new(arena);
540 if (!ret) return NULL;
541 if (!upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Type_AbstractType_msginit, arena)) return NULL;
544 UPB_INLINE google_api_expr_v1alpha1_Type_AbstractType *google_api_expr_v1alpha1_Type_AbstractType_parse_ex(const char *buf, size_t size,
545 const upb_extreg *extreg, int options,
547 google_api_expr_v1alpha1_Type_AbstractType *ret = google_api_expr_v1alpha1_Type_AbstractType_new(arena);
548 if (!ret) return NULL;
549 if (!_upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Type_AbstractType_msginit, extreg, options, arena)) {
554 UPB_INLINE char *google_api_expr_v1alpha1_Type_AbstractType_serialize(const google_api_expr_v1alpha1_Type_AbstractType *msg, upb_arena *arena, size_t *len) {
555 return upb_encode(msg, &google_api_expr_v1alpha1_Type_AbstractType_msginit, arena, len);
558 UPB_INLINE upb_strview google_api_expr_v1alpha1_Type_AbstractType_name(const google_api_expr_v1alpha1_Type_AbstractType *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
559 UPB_INLINE bool google_api_expr_v1alpha1_Type_AbstractType_has_parameter_types(const google_api_expr_v1alpha1_Type_AbstractType *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
560 UPB_INLINE const google_api_expr_v1alpha1_Type* const* google_api_expr_v1alpha1_Type_AbstractType_parameter_types(const google_api_expr_v1alpha1_Type_AbstractType *msg, size_t *len) { return (const google_api_expr_v1alpha1_Type* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
562 UPB_INLINE void google_api_expr_v1alpha1_Type_AbstractType_set_name(google_api_expr_v1alpha1_Type_AbstractType *msg, upb_strview value) {
563 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
565 UPB_INLINE google_api_expr_v1alpha1_Type** google_api_expr_v1alpha1_Type_AbstractType_mutable_parameter_types(google_api_expr_v1alpha1_Type_AbstractType *msg, size_t *len) {
566 return (google_api_expr_v1alpha1_Type**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
568 UPB_INLINE google_api_expr_v1alpha1_Type** google_api_expr_v1alpha1_Type_AbstractType_resize_parameter_types(google_api_expr_v1alpha1_Type_AbstractType *msg, size_t len, upb_arena *arena) {
569 return (google_api_expr_v1alpha1_Type**)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena);
571 UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_AbstractType_add_parameter_types(google_api_expr_v1alpha1_Type_AbstractType *msg, upb_arena *arena) {
572 struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)_upb_msg_new(&google_api_expr_v1alpha1_Type_msginit, arena);
573 bool ok = _upb_array_append_accessor2(
574 msg, UPB_SIZE(8, 16), UPB_SIZE(2, 3), &sub, arena);
575 if (!ok) return NULL;
579 /* google.api.expr.v1alpha1.Decl */
581 UPB_INLINE google_api_expr_v1alpha1_Decl *google_api_expr_v1alpha1_Decl_new(upb_arena *arena) {
582 return (google_api_expr_v1alpha1_Decl *)_upb_msg_new(&google_api_expr_v1alpha1_Decl_msginit, arena);
584 UPB_INLINE google_api_expr_v1alpha1_Decl *google_api_expr_v1alpha1_Decl_parse(const char *buf, size_t size,
586 google_api_expr_v1alpha1_Decl *ret = google_api_expr_v1alpha1_Decl_new(arena);
587 if (!ret) return NULL;
588 if (!upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Decl_msginit, arena)) return NULL;
591 UPB_INLINE google_api_expr_v1alpha1_Decl *google_api_expr_v1alpha1_Decl_parse_ex(const char *buf, size_t size,
592 const upb_extreg *extreg, int options,
594 google_api_expr_v1alpha1_Decl *ret = google_api_expr_v1alpha1_Decl_new(arena);
595 if (!ret) return NULL;
596 if (!_upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Decl_msginit, extreg, options, arena)) {
601 UPB_INLINE char *google_api_expr_v1alpha1_Decl_serialize(const google_api_expr_v1alpha1_Decl *msg, upb_arena *arena, size_t *len) {
602 return upb_encode(msg, &google_api_expr_v1alpha1_Decl_msginit, arena, len);
606 google_api_expr_v1alpha1_Decl_decl_kind_ident = 2,
607 google_api_expr_v1alpha1_Decl_decl_kind_function = 3,
608 google_api_expr_v1alpha1_Decl_decl_kind_NOT_SET = 0
609 } google_api_expr_v1alpha1_Decl_decl_kind_oneofcases;
610 UPB_INLINE google_api_expr_v1alpha1_Decl_decl_kind_oneofcases google_api_expr_v1alpha1_Decl_decl_kind_case(const google_api_expr_v1alpha1_Decl* msg) { return (google_api_expr_v1alpha1_Decl_decl_kind_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); }
612 UPB_INLINE upb_strview google_api_expr_v1alpha1_Decl_name(const google_api_expr_v1alpha1_Decl *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
613 UPB_INLINE bool google_api_expr_v1alpha1_Decl_has_ident(const google_api_expr_v1alpha1_Decl *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 2; }
614 UPB_INLINE const google_api_expr_v1alpha1_Decl_IdentDecl* google_api_expr_v1alpha1_Decl_ident(const google_api_expr_v1alpha1_Decl *msg) { return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Decl_IdentDecl*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); }
615 UPB_INLINE bool google_api_expr_v1alpha1_Decl_has_function(const google_api_expr_v1alpha1_Decl *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 3; }
616 UPB_INLINE const google_api_expr_v1alpha1_Decl_FunctionDecl* google_api_expr_v1alpha1_Decl_function(const google_api_expr_v1alpha1_Decl *msg) { return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Decl_FunctionDecl*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); }
618 UPB_INLINE void google_api_expr_v1alpha1_Decl_set_name(google_api_expr_v1alpha1_Decl *msg, upb_strview value) {
619 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
621 UPB_INLINE void google_api_expr_v1alpha1_Decl_set_ident(google_api_expr_v1alpha1_Decl *msg, google_api_expr_v1alpha1_Decl_IdentDecl* value) {
622 UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Decl_IdentDecl*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2);
624 UPB_INLINE struct google_api_expr_v1alpha1_Decl_IdentDecl* google_api_expr_v1alpha1_Decl_mutable_ident(google_api_expr_v1alpha1_Decl *msg, upb_arena *arena) {
625 struct google_api_expr_v1alpha1_Decl_IdentDecl* sub = (struct google_api_expr_v1alpha1_Decl_IdentDecl*)google_api_expr_v1alpha1_Decl_ident(msg);
627 sub = (struct google_api_expr_v1alpha1_Decl_IdentDecl*)_upb_msg_new(&google_api_expr_v1alpha1_Decl_IdentDecl_msginit, arena);
628 if (!sub) return NULL;
629 google_api_expr_v1alpha1_Decl_set_ident(msg, sub);
633 UPB_INLINE void google_api_expr_v1alpha1_Decl_set_function(google_api_expr_v1alpha1_Decl *msg, google_api_expr_v1alpha1_Decl_FunctionDecl* value) {
634 UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Decl_FunctionDecl*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 3);
636 UPB_INLINE struct google_api_expr_v1alpha1_Decl_FunctionDecl* google_api_expr_v1alpha1_Decl_mutable_function(google_api_expr_v1alpha1_Decl *msg, upb_arena *arena) {
637 struct google_api_expr_v1alpha1_Decl_FunctionDecl* sub = (struct google_api_expr_v1alpha1_Decl_FunctionDecl*)google_api_expr_v1alpha1_Decl_function(msg);
639 sub = (struct google_api_expr_v1alpha1_Decl_FunctionDecl*)_upb_msg_new(&google_api_expr_v1alpha1_Decl_FunctionDecl_msginit, arena);
640 if (!sub) return NULL;
641 google_api_expr_v1alpha1_Decl_set_function(msg, sub);
646 /* google.api.expr.v1alpha1.Decl.IdentDecl */
648 UPB_INLINE google_api_expr_v1alpha1_Decl_IdentDecl *google_api_expr_v1alpha1_Decl_IdentDecl_new(upb_arena *arena) {
649 return (google_api_expr_v1alpha1_Decl_IdentDecl *)_upb_msg_new(&google_api_expr_v1alpha1_Decl_IdentDecl_msginit, arena);
651 UPB_INLINE google_api_expr_v1alpha1_Decl_IdentDecl *google_api_expr_v1alpha1_Decl_IdentDecl_parse(const char *buf, size_t size,
653 google_api_expr_v1alpha1_Decl_IdentDecl *ret = google_api_expr_v1alpha1_Decl_IdentDecl_new(arena);
654 if (!ret) return NULL;
655 if (!upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Decl_IdentDecl_msginit, arena)) return NULL;
658 UPB_INLINE google_api_expr_v1alpha1_Decl_IdentDecl *google_api_expr_v1alpha1_Decl_IdentDecl_parse_ex(const char *buf, size_t size,
659 const upb_extreg *extreg, int options,
661 google_api_expr_v1alpha1_Decl_IdentDecl *ret = google_api_expr_v1alpha1_Decl_IdentDecl_new(arena);
662 if (!ret) return NULL;
663 if (!_upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Decl_IdentDecl_msginit, extreg, options, arena)) {
668 UPB_INLINE char *google_api_expr_v1alpha1_Decl_IdentDecl_serialize(const google_api_expr_v1alpha1_Decl_IdentDecl *msg, upb_arena *arena, size_t *len) {
669 return upb_encode(msg, &google_api_expr_v1alpha1_Decl_IdentDecl_msginit, arena, len);
672 UPB_INLINE bool google_api_expr_v1alpha1_Decl_IdentDecl_has_type(const google_api_expr_v1alpha1_Decl_IdentDecl *msg) { return _upb_hasbit(msg, 1); }
673 UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Decl_IdentDecl_type(const google_api_expr_v1alpha1_Decl_IdentDecl *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_api_expr_v1alpha1_Type*); }
674 UPB_INLINE bool google_api_expr_v1alpha1_Decl_IdentDecl_has_value(const google_api_expr_v1alpha1_Decl_IdentDecl *msg) { return _upb_hasbit(msg, 2); }
675 UPB_INLINE const struct google_api_expr_v1alpha1_Constant* google_api_expr_v1alpha1_Decl_IdentDecl_value(const google_api_expr_v1alpha1_Decl_IdentDecl *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_api_expr_v1alpha1_Constant*); }
676 UPB_INLINE upb_strview google_api_expr_v1alpha1_Decl_IdentDecl_doc(const google_api_expr_v1alpha1_Decl_IdentDecl *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
678 UPB_INLINE void google_api_expr_v1alpha1_Decl_IdentDecl_set_type(google_api_expr_v1alpha1_Decl_IdentDecl *msg, google_api_expr_v1alpha1_Type* value) {
680 *UPB_PTR_AT(msg, UPB_SIZE(12, 24), google_api_expr_v1alpha1_Type*) = value;
682 UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Decl_IdentDecl_mutable_type(google_api_expr_v1alpha1_Decl_IdentDecl *msg, upb_arena *arena) {
683 struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)google_api_expr_v1alpha1_Decl_IdentDecl_type(msg);
685 sub = (struct google_api_expr_v1alpha1_Type*)_upb_msg_new(&google_api_expr_v1alpha1_Type_msginit, arena);
686 if (!sub) return NULL;
687 google_api_expr_v1alpha1_Decl_IdentDecl_set_type(msg, sub);
691 UPB_INLINE void google_api_expr_v1alpha1_Decl_IdentDecl_set_value(google_api_expr_v1alpha1_Decl_IdentDecl *msg, struct google_api_expr_v1alpha1_Constant* value) {
693 *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_api_expr_v1alpha1_Constant*) = value;
695 UPB_INLINE struct google_api_expr_v1alpha1_Constant* google_api_expr_v1alpha1_Decl_IdentDecl_mutable_value(google_api_expr_v1alpha1_Decl_IdentDecl *msg, upb_arena *arena) {
696 struct google_api_expr_v1alpha1_Constant* sub = (struct google_api_expr_v1alpha1_Constant*)google_api_expr_v1alpha1_Decl_IdentDecl_value(msg);
698 sub = (struct google_api_expr_v1alpha1_Constant*)_upb_msg_new(&google_api_expr_v1alpha1_Constant_msginit, arena);
699 if (!sub) return NULL;
700 google_api_expr_v1alpha1_Decl_IdentDecl_set_value(msg, sub);
704 UPB_INLINE void google_api_expr_v1alpha1_Decl_IdentDecl_set_doc(google_api_expr_v1alpha1_Decl_IdentDecl *msg, upb_strview value) {
705 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
708 /* google.api.expr.v1alpha1.Decl.FunctionDecl */
710 UPB_INLINE google_api_expr_v1alpha1_Decl_FunctionDecl *google_api_expr_v1alpha1_Decl_FunctionDecl_new(upb_arena *arena) {
711 return (google_api_expr_v1alpha1_Decl_FunctionDecl *)_upb_msg_new(&google_api_expr_v1alpha1_Decl_FunctionDecl_msginit, arena);
713 UPB_INLINE google_api_expr_v1alpha1_Decl_FunctionDecl *google_api_expr_v1alpha1_Decl_FunctionDecl_parse(const char *buf, size_t size,
715 google_api_expr_v1alpha1_Decl_FunctionDecl *ret = google_api_expr_v1alpha1_Decl_FunctionDecl_new(arena);
716 if (!ret) return NULL;
717 if (!upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Decl_FunctionDecl_msginit, arena)) return NULL;
720 UPB_INLINE google_api_expr_v1alpha1_Decl_FunctionDecl *google_api_expr_v1alpha1_Decl_FunctionDecl_parse_ex(const char *buf, size_t size,
721 const upb_extreg *extreg, int options,
723 google_api_expr_v1alpha1_Decl_FunctionDecl *ret = google_api_expr_v1alpha1_Decl_FunctionDecl_new(arena);
724 if (!ret) return NULL;
725 if (!_upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Decl_FunctionDecl_msginit, extreg, options, arena)) {
730 UPB_INLINE char *google_api_expr_v1alpha1_Decl_FunctionDecl_serialize(const google_api_expr_v1alpha1_Decl_FunctionDecl *msg, upb_arena *arena, size_t *len) {
731 return upb_encode(msg, &google_api_expr_v1alpha1_Decl_FunctionDecl_msginit, arena, len);
734 UPB_INLINE bool google_api_expr_v1alpha1_Decl_FunctionDecl_has_overloads(const google_api_expr_v1alpha1_Decl_FunctionDecl *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
735 UPB_INLINE const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* const* google_api_expr_v1alpha1_Decl_FunctionDecl_overloads(const google_api_expr_v1alpha1_Decl_FunctionDecl *msg, size_t *len) { return (const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
737 UPB_INLINE google_api_expr_v1alpha1_Decl_FunctionDecl_Overload** google_api_expr_v1alpha1_Decl_FunctionDecl_mutable_overloads(google_api_expr_v1alpha1_Decl_FunctionDecl *msg, size_t *len) {
738 return (google_api_expr_v1alpha1_Decl_FunctionDecl_Overload**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
740 UPB_INLINE google_api_expr_v1alpha1_Decl_FunctionDecl_Overload** google_api_expr_v1alpha1_Decl_FunctionDecl_resize_overloads(google_api_expr_v1alpha1_Decl_FunctionDecl *msg, size_t len, upb_arena *arena) {
741 return (google_api_expr_v1alpha1_Decl_FunctionDecl_Overload**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
743 UPB_INLINE struct google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* google_api_expr_v1alpha1_Decl_FunctionDecl_add_overloads(google_api_expr_v1alpha1_Decl_FunctionDecl *msg, upb_arena *arena) {
744 struct google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* sub = (struct google_api_expr_v1alpha1_Decl_FunctionDecl_Overload*)_upb_msg_new(&google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_msginit, arena);
745 bool ok = _upb_array_append_accessor2(
746 msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
747 if (!ok) return NULL;
751 /* google.api.expr.v1alpha1.Decl.FunctionDecl.Overload */
753 UPB_INLINE google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_new(upb_arena *arena) {
754 return (google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *)_upb_msg_new(&google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_msginit, arena);
756 UPB_INLINE google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_parse(const char *buf, size_t size,
758 google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *ret = google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_new(arena);
759 if (!ret) return NULL;
760 if (!upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_msginit, arena)) return NULL;
763 UPB_INLINE google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_parse_ex(const char *buf, size_t size,
764 const upb_extreg *extreg, int options,
766 google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *ret = google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_new(arena);
767 if (!ret) return NULL;
768 if (!_upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_msginit, extreg, options, arena)) {
773 UPB_INLINE char *google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_serialize(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, upb_arena *arena, size_t *len) {
774 return upb_encode(msg, &google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_msginit, arena, len);
777 UPB_INLINE upb_strview google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_overload_id(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
778 UPB_INLINE bool google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_has_params(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); }
779 UPB_INLINE const google_api_expr_v1alpha1_Type* const* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_params(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, size_t *len) { return (const google_api_expr_v1alpha1_Type* const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); }
780 UPB_INLINE upb_strview const* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_type_params(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); }
781 UPB_INLINE bool google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_has_result_type(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg) { return _upb_hasbit(msg, 1); }
782 UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_result_type(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const google_api_expr_v1alpha1_Type*); }
783 UPB_INLINE bool google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_is_instance_function(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
784 UPB_INLINE upb_strview google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_doc(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
786 UPB_INLINE void google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_set_overload_id(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, upb_strview value) {
787 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
789 UPB_INLINE google_api_expr_v1alpha1_Type** google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_mutable_params(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, size_t *len) {
790 return (google_api_expr_v1alpha1_Type**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
792 UPB_INLINE google_api_expr_v1alpha1_Type** google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_resize_params(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, size_t len, upb_arena *arena) {
793 return (google_api_expr_v1alpha1_Type**)_upb_array_resize_accessor2(msg, UPB_SIZE(24, 48), len, UPB_SIZE(2, 3), arena);
795 UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_add_params(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, upb_arena *arena) {
796 struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)_upb_msg_new(&google_api_expr_v1alpha1_Type_msginit, arena);
797 bool ok = _upb_array_append_accessor2(
798 msg, UPB_SIZE(24, 48), UPB_SIZE(2, 3), &sub, arena);
799 if (!ok) return NULL;
802 UPB_INLINE upb_strview* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_mutable_type_params(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, size_t *len) {
803 return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
805 UPB_INLINE upb_strview* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_resize_type_params(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, size_t len, upb_arena *arena) {
806 return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 56), len, UPB_SIZE(3, 4), arena);
808 UPB_INLINE bool google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_add_type_params(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, upb_strview val, upb_arena *arena) {
809 return _upb_array_append_accessor2(msg, UPB_SIZE(28, 56), UPB_SIZE(3, 4), &val,
812 UPB_INLINE void google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_set_result_type(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, google_api_expr_v1alpha1_Type* value) {
814 *UPB_PTR_AT(msg, UPB_SIZE(20, 40), google_api_expr_v1alpha1_Type*) = value;
816 UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_mutable_result_type(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, upb_arena *arena) {
817 struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_result_type(msg);
819 sub = (struct google_api_expr_v1alpha1_Type*)_upb_msg_new(&google_api_expr_v1alpha1_Type_msginit, arena);
820 if (!sub) return NULL;
821 google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_set_result_type(msg, sub);
825 UPB_INLINE void google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_set_is_instance_function(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, bool value) {
826 *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
828 UPB_INLINE void google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_set_doc(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, upb_strview value) {
829 *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
832 /* google.api.expr.v1alpha1.Reference */
834 UPB_INLINE google_api_expr_v1alpha1_Reference *google_api_expr_v1alpha1_Reference_new(upb_arena *arena) {
835 return (google_api_expr_v1alpha1_Reference *)_upb_msg_new(&google_api_expr_v1alpha1_Reference_msginit, arena);
837 UPB_INLINE google_api_expr_v1alpha1_Reference *google_api_expr_v1alpha1_Reference_parse(const char *buf, size_t size,
839 google_api_expr_v1alpha1_Reference *ret = google_api_expr_v1alpha1_Reference_new(arena);
840 if (!ret) return NULL;
841 if (!upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Reference_msginit, arena)) return NULL;
844 UPB_INLINE google_api_expr_v1alpha1_Reference *google_api_expr_v1alpha1_Reference_parse_ex(const char *buf, size_t size,
845 const upb_extreg *extreg, int options,
847 google_api_expr_v1alpha1_Reference *ret = google_api_expr_v1alpha1_Reference_new(arena);
848 if (!ret) return NULL;
849 if (!_upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Reference_msginit, extreg, options, arena)) {
854 UPB_INLINE char *google_api_expr_v1alpha1_Reference_serialize(const google_api_expr_v1alpha1_Reference *msg, upb_arena *arena, size_t *len) {
855 return upb_encode(msg, &google_api_expr_v1alpha1_Reference_msginit, arena, len);
858 UPB_INLINE upb_strview google_api_expr_v1alpha1_Reference_name(const google_api_expr_v1alpha1_Reference *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
859 UPB_INLINE upb_strview const* google_api_expr_v1alpha1_Reference_overload_id(const google_api_expr_v1alpha1_Reference *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
860 UPB_INLINE bool google_api_expr_v1alpha1_Reference_has_value(const google_api_expr_v1alpha1_Reference *msg) { return _upb_hasbit(msg, 1); }
861 UPB_INLINE const struct google_api_expr_v1alpha1_Constant* google_api_expr_v1alpha1_Reference_value(const google_api_expr_v1alpha1_Reference *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_api_expr_v1alpha1_Constant*); }
863 UPB_INLINE void google_api_expr_v1alpha1_Reference_set_name(google_api_expr_v1alpha1_Reference *msg, upb_strview value) {
864 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
866 UPB_INLINE upb_strview* google_api_expr_v1alpha1_Reference_mutable_overload_id(google_api_expr_v1alpha1_Reference *msg, size_t *len) {
867 return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
869 UPB_INLINE upb_strview* google_api_expr_v1alpha1_Reference_resize_overload_id(google_api_expr_v1alpha1_Reference *msg, size_t len, upb_arena *arena) {
870 return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(3, 4), arena);
872 UPB_INLINE bool google_api_expr_v1alpha1_Reference_add_overload_id(google_api_expr_v1alpha1_Reference *msg, upb_strview val, upb_arena *arena) {
873 return _upb_array_append_accessor2(msg, UPB_SIZE(16, 32), UPB_SIZE(3, 4), &val,
876 UPB_INLINE void google_api_expr_v1alpha1_Reference_set_value(google_api_expr_v1alpha1_Reference *msg, struct google_api_expr_v1alpha1_Constant* value) {
878 *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_api_expr_v1alpha1_Constant*) = value;
880 UPB_INLINE struct google_api_expr_v1alpha1_Constant* google_api_expr_v1alpha1_Reference_mutable_value(google_api_expr_v1alpha1_Reference *msg, upb_arena *arena) {
881 struct google_api_expr_v1alpha1_Constant* sub = (struct google_api_expr_v1alpha1_Constant*)google_api_expr_v1alpha1_Reference_value(msg);
883 sub = (struct google_api_expr_v1alpha1_Constant*)_upb_msg_new(&google_api_expr_v1alpha1_Constant_msginit, arena);
884 if (!sub) return NULL;
885 google_api_expr_v1alpha1_Reference_set_value(msg, sub);
894 #include "upb/port_undef.inc"
896 #endif /* GOOGLE_API_EXPR_V1ALPHA1_CHECKED_PROTO_UPB_H_ */