Debian Codegraph @

src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.h

raw
1 /* This file was generated by upbc (the upb compiler) from the input
2 * file:
3 *
4 * google/api/expr/v1alpha1/syntax.proto
5 *
6 * Do not edit -- your changes will be discarded when the file is
7 * regenerated. */
8
9 #ifndef GOOGLE_API_EXPR_V1ALPHA1_SYNTAX_PROTO_UPB_H_
10 #define GOOGLE_API_EXPR_V1ALPHA1_SYNTAX_PROTO_UPB_H_
11
12 #include "upb/msg_internal.h"
13 #include "upb/decode.h"
14 #include "upb/decode_fast.h"
15 #include "upb/encode.h"
16
17 #include "upb/port_def.inc"
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23 struct google_api_expr_v1alpha1_ParsedExpr;
24 struct google_api_expr_v1alpha1_Expr;
25 struct google_api_expr_v1alpha1_Expr_Ident;
26 struct google_api_expr_v1alpha1_Expr_Select;
27 struct google_api_expr_v1alpha1_Expr_Call;
28 struct google_api_expr_v1alpha1_Expr_CreateList;
29 struct google_api_expr_v1alpha1_Expr_CreateStruct;
30 struct google_api_expr_v1alpha1_Expr_CreateStruct_Entry;
31 struct google_api_expr_v1alpha1_Expr_Comprehension;
32 struct google_api_expr_v1alpha1_Constant;
33 struct google_api_expr_v1alpha1_SourceInfo;
34 struct google_api_expr_v1alpha1_SourceInfo_PositionsEntry;
35 struct google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry;
36 struct google_api_expr_v1alpha1_SourcePosition;
37 typedef struct google_api_expr_v1alpha1_ParsedExpr google_api_expr_v1alpha1_ParsedExpr;
38 typedef struct google_api_expr_v1alpha1_Expr google_api_expr_v1alpha1_Expr;
39 typedef struct google_api_expr_v1alpha1_Expr_Ident google_api_expr_v1alpha1_Expr_Ident;
40 typedef struct google_api_expr_v1alpha1_Expr_Select google_api_expr_v1alpha1_Expr_Select;
41 typedef struct google_api_expr_v1alpha1_Expr_Call google_api_expr_v1alpha1_Expr_Call;
42 typedef struct google_api_expr_v1alpha1_Expr_CreateList google_api_expr_v1alpha1_Expr_CreateList;
43 typedef struct google_api_expr_v1alpha1_Expr_CreateStruct google_api_expr_v1alpha1_Expr_CreateStruct;
44 typedef struct google_api_expr_v1alpha1_Expr_CreateStruct_Entry google_api_expr_v1alpha1_Expr_CreateStruct_Entry;
45 typedef struct google_api_expr_v1alpha1_Expr_Comprehension google_api_expr_v1alpha1_Expr_Comprehension;
46 typedef struct google_api_expr_v1alpha1_Constant google_api_expr_v1alpha1_Constant;
47 typedef struct google_api_expr_v1alpha1_SourceInfo google_api_expr_v1alpha1_SourceInfo;
48 typedef struct google_api_expr_v1alpha1_SourceInfo_PositionsEntry google_api_expr_v1alpha1_SourceInfo_PositionsEntry;
49 typedef struct google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry;
50 typedef struct google_api_expr_v1alpha1_SourcePosition google_api_expr_v1alpha1_SourcePosition;
51 extern const upb_MiniTable google_api_expr_v1alpha1_ParsedExpr_msginit;
52 extern const upb_MiniTable google_api_expr_v1alpha1_Expr_msginit;
53 extern const upb_MiniTable google_api_expr_v1alpha1_Expr_Ident_msginit;
54 extern const upb_MiniTable google_api_expr_v1alpha1_Expr_Select_msginit;
55 extern const upb_MiniTable google_api_expr_v1alpha1_Expr_Call_msginit;
56 extern const upb_MiniTable google_api_expr_v1alpha1_Expr_CreateList_msginit;
57 extern const upb_MiniTable google_api_expr_v1alpha1_Expr_CreateStruct_msginit;
58 extern const upb_MiniTable google_api_expr_v1alpha1_Expr_CreateStruct_Entry_msginit;
59 extern const upb_MiniTable google_api_expr_v1alpha1_Expr_Comprehension_msginit;
60 extern const upb_MiniTable google_api_expr_v1alpha1_Constant_msginit;
61 extern const upb_MiniTable google_api_expr_v1alpha1_SourceInfo_msginit;
62 extern const upb_MiniTable google_api_expr_v1alpha1_SourceInfo_PositionsEntry_msginit;
63 extern const upb_MiniTable google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry_msginit;
64 extern const upb_MiniTable google_api_expr_v1alpha1_SourcePosition_msginit;
65 struct google_protobuf_Duration;
66 struct google_protobuf_Timestamp;
67 extern const upb_MiniTable google_protobuf_Duration_msginit;
68 extern const upb_MiniTable google_protobuf_Timestamp_msginit;
69
70
71
72 /* google.api.expr.v1alpha1.ParsedExpr */
73
74 UPB_INLINE google_api_expr_v1alpha1_ParsedExpr* google_api_expr_v1alpha1_ParsedExpr_new(upb_Arena* arena) {
75 return (google_api_expr_v1alpha1_ParsedExpr*)_upb_Message_New(&google_api_expr_v1alpha1_ParsedExpr_msginit, arena);
76 }
77 UPB_INLINE google_api_expr_v1alpha1_ParsedExpr* google_api_expr_v1alpha1_ParsedExpr_parse(const char* buf, size_t size, upb_Arena* arena) {
78 google_api_expr_v1alpha1_ParsedExpr* ret = google_api_expr_v1alpha1_ParsedExpr_new(arena);
79 if (!ret) return NULL;
80 if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_ParsedExpr_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
81 return NULL;
82 }
83 return ret;
84 }
85 UPB_INLINE google_api_expr_v1alpha1_ParsedExpr* google_api_expr_v1alpha1_ParsedExpr_parse_ex(const char* buf, size_t size,
86 const upb_ExtensionRegistry* extreg,
87 int options, upb_Arena* arena) {
88 google_api_expr_v1alpha1_ParsedExpr* ret = google_api_expr_v1alpha1_ParsedExpr_new(arena);
89 if (!ret) return NULL;
90 if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_ParsedExpr_msginit, extreg, options, arena) !=
91 kUpb_DecodeStatus_Ok) {
92 return NULL;
93 }
94 return ret;
95 }
96 UPB_INLINE char* google_api_expr_v1alpha1_ParsedExpr_serialize(const google_api_expr_v1alpha1_ParsedExpr* msg, upb_Arena* arena, size_t* len) {
97 char* ptr;
98 (void)upb_Encode(msg, &google_api_expr_v1alpha1_ParsedExpr_msginit, 0, arena, &ptr, len);
99 return ptr;
100 }
101 UPB_INLINE char* google_api_expr_v1alpha1_ParsedExpr_serialize_ex(const google_api_expr_v1alpha1_ParsedExpr* msg, int options,
102 upb_Arena* arena, size_t* len) {
103 char* ptr;
104 (void)upb_Encode(msg, &google_api_expr_v1alpha1_ParsedExpr_msginit, options, arena, &ptr, len);
105 return ptr;
106 }
107 UPB_INLINE bool google_api_expr_v1alpha1_ParsedExpr_has_expr(const google_api_expr_v1alpha1_ParsedExpr* msg) {
108 return _upb_hasbit(msg, 1);
109 }
110 UPB_INLINE void google_api_expr_v1alpha1_ParsedExpr_clear_expr(const google_api_expr_v1alpha1_ParsedExpr* msg) {
111 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const upb_Message*) = NULL;
112 }
113 UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_ParsedExpr_expr(const google_api_expr_v1alpha1_ParsedExpr* msg) {
114 return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const google_api_expr_v1alpha1_Expr*);
115 }
116 UPB_INLINE bool google_api_expr_v1alpha1_ParsedExpr_has_source_info(const google_api_expr_v1alpha1_ParsedExpr* msg) {
117 return _upb_hasbit(msg, 2);
118 }
119 UPB_INLINE void google_api_expr_v1alpha1_ParsedExpr_clear_source_info(const google_api_expr_v1alpha1_ParsedExpr* msg) {
120 *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const upb_Message*) = NULL;
121 }
122 UPB_INLINE const google_api_expr_v1alpha1_SourceInfo* google_api_expr_v1alpha1_ParsedExpr_source_info(const google_api_expr_v1alpha1_ParsedExpr* msg) {
123 return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const google_api_expr_v1alpha1_SourceInfo*);
124 }
125
126 UPB_INLINE void google_api_expr_v1alpha1_ParsedExpr_set_expr(google_api_expr_v1alpha1_ParsedExpr *msg, google_api_expr_v1alpha1_Expr* value) {
127 _upb_sethas(msg, 1);
128 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), google_api_expr_v1alpha1_Expr*) = value;
129 }
130 UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_ParsedExpr_mutable_expr(google_api_expr_v1alpha1_ParsedExpr* msg, upb_Arena* arena) {
131 struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_ParsedExpr_expr(msg);
132 if (sub == NULL) {
133 sub = (struct google_api_expr_v1alpha1_Expr*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_msginit, arena);
134 if (!sub) return NULL;
135 google_api_expr_v1alpha1_ParsedExpr_set_expr(msg, sub);
136 }
137 return sub;
138 }
139 UPB_INLINE void google_api_expr_v1alpha1_ParsedExpr_set_source_info(google_api_expr_v1alpha1_ParsedExpr *msg, google_api_expr_v1alpha1_SourceInfo* value) {
140 _upb_sethas(msg, 2);
141 *UPB_PTR_AT(msg, UPB_SIZE(8, 16), google_api_expr_v1alpha1_SourceInfo*) = value;
142 }
143 UPB_INLINE struct google_api_expr_v1alpha1_SourceInfo* google_api_expr_v1alpha1_ParsedExpr_mutable_source_info(google_api_expr_v1alpha1_ParsedExpr* msg, upb_Arena* arena) {
144 struct google_api_expr_v1alpha1_SourceInfo* sub = (struct google_api_expr_v1alpha1_SourceInfo*)google_api_expr_v1alpha1_ParsedExpr_source_info(msg);
145 if (sub == NULL) {
146 sub = (struct google_api_expr_v1alpha1_SourceInfo*)_upb_Message_New(&google_api_expr_v1alpha1_SourceInfo_msginit, arena);
147 if (!sub) return NULL;
148 google_api_expr_v1alpha1_ParsedExpr_set_source_info(msg, sub);
149 }
150 return sub;
151 }
152
153 /* google.api.expr.v1alpha1.Expr */
154
155 UPB_INLINE google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_new(upb_Arena* arena) {
156 return (google_api_expr_v1alpha1_Expr*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_msginit, arena);
157 }
158 UPB_INLINE google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_parse(const char* buf, size_t size, upb_Arena* arena) {
159 google_api_expr_v1alpha1_Expr* ret = google_api_expr_v1alpha1_Expr_new(arena);
160 if (!ret) return NULL;
161 if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
162 return NULL;
163 }
164 return ret;
165 }
166 UPB_INLINE google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_parse_ex(const char* buf, size_t size,
167 const upb_ExtensionRegistry* extreg,
168 int options, upb_Arena* arena) {
169 google_api_expr_v1alpha1_Expr* ret = google_api_expr_v1alpha1_Expr_new(arena);
170 if (!ret) return NULL;
171 if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_msginit, extreg, options, arena) !=
172 kUpb_DecodeStatus_Ok) {
173 return NULL;
174 }
175 return ret;
176 }
177 UPB_INLINE char* google_api_expr_v1alpha1_Expr_serialize(const google_api_expr_v1alpha1_Expr* msg, upb_Arena* arena, size_t* len) {
178 char* ptr;
179 (void)upb_Encode(msg, &google_api_expr_v1alpha1_Expr_msginit, 0, arena, &ptr, len);
180 return ptr;
181 }
182 UPB_INLINE char* google_api_expr_v1alpha1_Expr_serialize_ex(const google_api_expr_v1alpha1_Expr* msg, int options,
183 upb_Arena* arena, size_t* len) {
184 char* ptr;
185 (void)upb_Encode(msg, &google_api_expr_v1alpha1_Expr_msginit, options, arena, &ptr, len);
186 return ptr;
187 }
188 typedef enum {
189 google_api_expr_v1alpha1_Expr_expr_kind_const_expr = 3,
190 google_api_expr_v1alpha1_Expr_expr_kind_ident_expr = 4,
191 google_api_expr_v1alpha1_Expr_expr_kind_select_expr = 5,
192 google_api_expr_v1alpha1_Expr_expr_kind_call_expr = 6,
193 google_api_expr_v1alpha1_Expr_expr_kind_list_expr = 7,
194 google_api_expr_v1alpha1_Expr_expr_kind_struct_expr = 8,
195 google_api_expr_v1alpha1_Expr_expr_kind_comprehension_expr = 9,
196 google_api_expr_v1alpha1_Expr_expr_kind_NOT_SET = 0
197 } google_api_expr_v1alpha1_Expr_expr_kind_oneofcases;
198 UPB_INLINE google_api_expr_v1alpha1_Expr_expr_kind_oneofcases google_api_expr_v1alpha1_Expr_expr_kind_case(const google_api_expr_v1alpha1_Expr* msg) {
199 return (google_api_expr_v1alpha1_Expr_expr_kind_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t);
200 }
201 UPB_INLINE void google_api_expr_v1alpha1_Expr_clear_id(const google_api_expr_v1alpha1_Expr* msg) {
202 *UPB_PTR_AT(msg, UPB_SIZE(8, 16), int64_t) = 0;
203 }
204 UPB_INLINE int64_t google_api_expr_v1alpha1_Expr_id(const google_api_expr_v1alpha1_Expr* msg) {
205 return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), int64_t);
206 }
207 UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_const_expr(const google_api_expr_v1alpha1_Expr* msg) {
208 return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 3;
209 }
210 UPB_INLINE void google_api_expr_v1alpha1_Expr_clear_const_expr(const google_api_expr_v1alpha1_Expr* msg) {
211 UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Constant*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Expr_expr_kind_NOT_SET);
212 }
213 UPB_INLINE const google_api_expr_v1alpha1_Constant* google_api_expr_v1alpha1_Expr_const_expr(const google_api_expr_v1alpha1_Expr* msg) {
214 return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Constant*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 3, NULL);
215 }
216 UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_ident_expr(const google_api_expr_v1alpha1_Expr* msg) {
217 return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 4;
218 }
219 UPB_INLINE void google_api_expr_v1alpha1_Expr_clear_ident_expr(const google_api_expr_v1alpha1_Expr* msg) {
220 UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Expr_Ident*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Expr_expr_kind_NOT_SET);
221 }
222 UPB_INLINE const google_api_expr_v1alpha1_Expr_Ident* google_api_expr_v1alpha1_Expr_ident_expr(const google_api_expr_v1alpha1_Expr* msg) {
223 return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Expr_Ident*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 4, NULL);
224 }
225 UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_select_expr(const google_api_expr_v1alpha1_Expr* msg) {
226 return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 5;
227 }
228 UPB_INLINE void google_api_expr_v1alpha1_Expr_clear_select_expr(const google_api_expr_v1alpha1_Expr* msg) {
229 UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Expr_Select*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Expr_expr_kind_NOT_SET);
230 }
231 UPB_INLINE const google_api_expr_v1alpha1_Expr_Select* google_api_expr_v1alpha1_Expr_select_expr(const google_api_expr_v1alpha1_Expr* msg) {
232 return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Expr_Select*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 5, NULL);
233 }
234 UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_call_expr(const google_api_expr_v1alpha1_Expr* msg) {
235 return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 6;
236 }
237 UPB_INLINE void google_api_expr_v1alpha1_Expr_clear_call_expr(const google_api_expr_v1alpha1_Expr* msg) {
238 UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Expr_Call*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Expr_expr_kind_NOT_SET);
239 }
240 UPB_INLINE const google_api_expr_v1alpha1_Expr_Call* google_api_expr_v1alpha1_Expr_call_expr(const google_api_expr_v1alpha1_Expr* msg) {
241 return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Expr_Call*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 6, NULL);
242 }
243 UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_list_expr(const google_api_expr_v1alpha1_Expr* msg) {
244 return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 7;
245 }
246 UPB_INLINE void google_api_expr_v1alpha1_Expr_clear_list_expr(const google_api_expr_v1alpha1_Expr* msg) {
247 UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Expr_CreateList*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Expr_expr_kind_NOT_SET);
248 }
249 UPB_INLINE const google_api_expr_v1alpha1_Expr_CreateList* google_api_expr_v1alpha1_Expr_list_expr(const google_api_expr_v1alpha1_Expr* msg) {
250 return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Expr_CreateList*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 7, NULL);
251 }
252 UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_struct_expr(const google_api_expr_v1alpha1_Expr* msg) {
253 return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 8;
254 }
255 UPB_INLINE void google_api_expr_v1alpha1_Expr_clear_struct_expr(const google_api_expr_v1alpha1_Expr* msg) {
256 UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Expr_CreateStruct*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Expr_expr_kind_NOT_SET);
257 }
258 UPB_INLINE const google_api_expr_v1alpha1_Expr_CreateStruct* google_api_expr_v1alpha1_Expr_struct_expr(const google_api_expr_v1alpha1_Expr* msg) {
259 return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Expr_CreateStruct*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 8, NULL);
260 }
261 UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_comprehension_expr(const google_api_expr_v1alpha1_Expr* msg) {
262 return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 9;
263 }
264 UPB_INLINE void google_api_expr_v1alpha1_Expr_clear_comprehension_expr(const google_api_expr_v1alpha1_Expr* msg) {
265 UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Expr_Comprehension*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Expr_expr_kind_NOT_SET);
266 }
267 UPB_INLINE const google_api_expr_v1alpha1_Expr_Comprehension* google_api_expr_v1alpha1_Expr_comprehension_expr(const google_api_expr_v1alpha1_Expr* msg) {
268 return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Expr_Comprehension*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 9, NULL);
269 }
270
271 UPB_INLINE void google_api_expr_v1alpha1_Expr_set_id(google_api_expr_v1alpha1_Expr *msg, int64_t value) {
272 *UPB_PTR_AT(msg, UPB_SIZE(8, 16), int64_t) = value;
273 }
274 UPB_INLINE void google_api_expr_v1alpha1_Expr_set_const_expr(google_api_expr_v1alpha1_Expr *msg, google_api_expr_v1alpha1_Constant* value) {
275 UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Constant*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 3);
276 }
277 UPB_INLINE struct google_api_expr_v1alpha1_Constant* google_api_expr_v1alpha1_Expr_mutable_const_expr(google_api_expr_v1alpha1_Expr* msg, upb_Arena* arena) {
278 struct google_api_expr_v1alpha1_Constant* sub = (struct google_api_expr_v1alpha1_Constant*)google_api_expr_v1alpha1_Expr_const_expr(msg);
279 if (sub == NULL) {
280 sub = (struct google_api_expr_v1alpha1_Constant*)_upb_Message_New(&google_api_expr_v1alpha1_Constant_msginit, arena);
281 if (!sub) return NULL;
282 google_api_expr_v1alpha1_Expr_set_const_expr(msg, sub);
283 }
284 return sub;
285 }
286 UPB_INLINE void google_api_expr_v1alpha1_Expr_set_ident_expr(google_api_expr_v1alpha1_Expr *msg, google_api_expr_v1alpha1_Expr_Ident* value) {
287 UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Expr_Ident*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 4);
288 }
289 UPB_INLINE struct google_api_expr_v1alpha1_Expr_Ident* google_api_expr_v1alpha1_Expr_mutable_ident_expr(google_api_expr_v1alpha1_Expr* msg, upb_Arena* arena) {
290 struct google_api_expr_v1alpha1_Expr_Ident* sub = (struct google_api_expr_v1alpha1_Expr_Ident*)google_api_expr_v1alpha1_Expr_ident_expr(msg);
291 if (sub == NULL) {
292 sub = (struct google_api_expr_v1alpha1_Expr_Ident*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_Ident_msginit, arena);
293 if (!sub) return NULL;
294 google_api_expr_v1alpha1_Expr_set_ident_expr(msg, sub);
295 }
296 return sub;
297 }
298 UPB_INLINE void google_api_expr_v1alpha1_Expr_set_select_expr(google_api_expr_v1alpha1_Expr *msg, google_api_expr_v1alpha1_Expr_Select* value) {
299 UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Expr_Select*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 5);
300 }
301 UPB_INLINE struct google_api_expr_v1alpha1_Expr_Select* google_api_expr_v1alpha1_Expr_mutable_select_expr(google_api_expr_v1alpha1_Expr* msg, upb_Arena* arena) {
302 struct google_api_expr_v1alpha1_Expr_Select* sub = (struct google_api_expr_v1alpha1_Expr_Select*)google_api_expr_v1alpha1_Expr_select_expr(msg);
303 if (sub == NULL) {
304 sub = (struct google_api_expr_v1alpha1_Expr_Select*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_Select_msginit, arena);
305 if (!sub) return NULL;
306 google_api_expr_v1alpha1_Expr_set_select_expr(msg, sub);
307 }
308 return sub;
309 }
310 UPB_INLINE void google_api_expr_v1alpha1_Expr_set_call_expr(google_api_expr_v1alpha1_Expr *msg, google_api_expr_v1alpha1_Expr_Call* value) {
311 UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Expr_Call*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 6);
312 }
313 UPB_INLINE struct google_api_expr_v1alpha1_Expr_Call* google_api_expr_v1alpha1_Expr_mutable_call_expr(google_api_expr_v1alpha1_Expr* msg, upb_Arena* arena) {
314 struct google_api_expr_v1alpha1_Expr_Call* sub = (struct google_api_expr_v1alpha1_Expr_Call*)google_api_expr_v1alpha1_Expr_call_expr(msg);
315 if (sub == NULL) {
316 sub = (struct google_api_expr_v1alpha1_Expr_Call*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_Call_msginit, arena);
317 if (!sub) return NULL;
318 google_api_expr_v1alpha1_Expr_set_call_expr(msg, sub);
319 }
320 return sub;
321 }
322 UPB_INLINE void google_api_expr_v1alpha1_Expr_set_list_expr(google_api_expr_v1alpha1_Expr *msg, google_api_expr_v1alpha1_Expr_CreateList* value) {
323 UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Expr_CreateList*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 7);
324 }
325 UPB_INLINE struct google_api_expr_v1alpha1_Expr_CreateList* google_api_expr_v1alpha1_Expr_mutable_list_expr(google_api_expr_v1alpha1_Expr* msg, upb_Arena* arena) {
326 struct google_api_expr_v1alpha1_Expr_CreateList* sub = (struct google_api_expr_v1alpha1_Expr_CreateList*)google_api_expr_v1alpha1_Expr_list_expr(msg);
327 if (sub == NULL) {
328 sub = (struct google_api_expr_v1alpha1_Expr_CreateList*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_CreateList_msginit, arena);
329 if (!sub) return NULL;
330 google_api_expr_v1alpha1_Expr_set_list_expr(msg, sub);
331 }
332 return sub;
333 }
334 UPB_INLINE void google_api_expr_v1alpha1_Expr_set_struct_expr(google_api_expr_v1alpha1_Expr *msg, google_api_expr_v1alpha1_Expr_CreateStruct* value) {
335 UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Expr_CreateStruct*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 8);
336 }
337 UPB_INLINE struct google_api_expr_v1alpha1_Expr_CreateStruct* google_api_expr_v1alpha1_Expr_mutable_struct_expr(google_api_expr_v1alpha1_Expr* msg, upb_Arena* arena) {
338 struct google_api_expr_v1alpha1_Expr_CreateStruct* sub = (struct google_api_expr_v1alpha1_Expr_CreateStruct*)google_api_expr_v1alpha1_Expr_struct_expr(msg);
339 if (sub == NULL) {
340 sub = (struct google_api_expr_v1alpha1_Expr_CreateStruct*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_CreateStruct_msginit, arena);
341 if (!sub) return NULL;
342 google_api_expr_v1alpha1_Expr_set_struct_expr(msg, sub);
343 }
344 return sub;
345 }
346 UPB_INLINE void google_api_expr_v1alpha1_Expr_set_comprehension_expr(google_api_expr_v1alpha1_Expr *msg, google_api_expr_v1alpha1_Expr_Comprehension* value) {
347 UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Expr_Comprehension*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 9);
348 }
349 UPB_INLINE struct google_api_expr_v1alpha1_Expr_Comprehension* google_api_expr_v1alpha1_Expr_mutable_comprehension_expr(google_api_expr_v1alpha1_Expr* msg, upb_Arena* arena) {
350 struct google_api_expr_v1alpha1_Expr_Comprehension* sub = (struct google_api_expr_v1alpha1_Expr_Comprehension*)google_api_expr_v1alpha1_Expr_comprehension_expr(msg);
351 if (sub == NULL) {
352 sub = (struct google_api_expr_v1alpha1_Expr_Comprehension*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_Comprehension_msginit, arena);
353 if (!sub) return NULL;
354 google_api_expr_v1alpha1_Expr_set_comprehension_expr(msg, sub);
355 }
356 return sub;
357 }
358
359 /* google.api.expr.v1alpha1.Expr.Ident */
360
361 UPB_INLINE google_api_expr_v1alpha1_Expr_Ident* google_api_expr_v1alpha1_Expr_Ident_new(upb_Arena* arena) {
362 return (google_api_expr_v1alpha1_Expr_Ident*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_Ident_msginit, arena);
363 }
364 UPB_INLINE google_api_expr_v1alpha1_Expr_Ident* google_api_expr_v1alpha1_Expr_Ident_parse(const char* buf, size_t size, upb_Arena* arena) {
365 google_api_expr_v1alpha1_Expr_Ident* ret = google_api_expr_v1alpha1_Expr_Ident_new(arena);
366 if (!ret) return NULL;
367 if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_Ident_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
368 return NULL;
369 }
370 return ret;
371 }
372 UPB_INLINE google_api_expr_v1alpha1_Expr_Ident* google_api_expr_v1alpha1_Expr_Ident_parse_ex(const char* buf, size_t size,
373 const upb_ExtensionRegistry* extreg,
374 int options, upb_Arena* arena) {
375 google_api_expr_v1alpha1_Expr_Ident* ret = google_api_expr_v1alpha1_Expr_Ident_new(arena);
376 if (!ret) return NULL;
377 if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_Ident_msginit, extreg, options, arena) !=
378 kUpb_DecodeStatus_Ok) {
379 return NULL;
380 }
381 return ret;
382 }
383 UPB_INLINE char* google_api_expr_v1alpha1_Expr_Ident_serialize(const google_api_expr_v1alpha1_Expr_Ident* msg, upb_Arena* arena, size_t* len) {
384 char* ptr;
385 (void)upb_Encode(msg, &google_api_expr_v1alpha1_Expr_Ident_msginit, 0, arena, &ptr, len);
386 return ptr;
387 }
388 UPB_INLINE char* google_api_expr_v1alpha1_Expr_Ident_serialize_ex(const google_api_expr_v1alpha1_Expr_Ident* msg, int options,
389 upb_Arena* arena, size_t* len) {
390 char* ptr;
391 (void)upb_Encode(msg, &google_api_expr_v1alpha1_Expr_Ident_msginit, options, arena, &ptr, len);
392 return ptr;
393 }
394 UPB_INLINE void google_api_expr_v1alpha1_Expr_Ident_clear_name(const google_api_expr_v1alpha1_Expr_Ident* msg) {
395 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
396 }
397 UPB_INLINE upb_StringView google_api_expr_v1alpha1_Expr_Ident_name(const google_api_expr_v1alpha1_Expr_Ident* msg) {
398 return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView);
399 }
400
401 UPB_INLINE void google_api_expr_v1alpha1_Expr_Ident_set_name(google_api_expr_v1alpha1_Expr_Ident *msg, upb_StringView value) {
402 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = value;
403 }
404
405 /* google.api.expr.v1alpha1.Expr.Select */
406
407 UPB_INLINE google_api_expr_v1alpha1_Expr_Select* google_api_expr_v1alpha1_Expr_Select_new(upb_Arena* arena) {
408 return (google_api_expr_v1alpha1_Expr_Select*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_Select_msginit, arena);
409 }
410 UPB_INLINE google_api_expr_v1alpha1_Expr_Select* google_api_expr_v1alpha1_Expr_Select_parse(const char* buf, size_t size, upb_Arena* arena) {
411 google_api_expr_v1alpha1_Expr_Select* ret = google_api_expr_v1alpha1_Expr_Select_new(arena);
412 if (!ret) return NULL;
413 if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_Select_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
414 return NULL;
415 }
416 return ret;
417 }
418 UPB_INLINE google_api_expr_v1alpha1_Expr_Select* google_api_expr_v1alpha1_Expr_Select_parse_ex(const char* buf, size_t size,
419 const upb_ExtensionRegistry* extreg,
420 int options, upb_Arena* arena) {
421 google_api_expr_v1alpha1_Expr_Select* ret = google_api_expr_v1alpha1_Expr_Select_new(arena);
422 if (!ret) return NULL;
423 if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_Select_msginit, extreg, options, arena) !=
424 kUpb_DecodeStatus_Ok) {
425 return NULL;
426 }
427 return ret;
428 }
429 UPB_INLINE char* google_api_expr_v1alpha1_Expr_Select_serialize(const google_api_expr_v1alpha1_Expr_Select* msg, upb_Arena* arena, size_t* len) {
430 char* ptr;
431 (void)upb_Encode(msg, &google_api_expr_v1alpha1_Expr_Select_msginit, 0, arena, &ptr, len);
432 return ptr;
433 }
434 UPB_INLINE char* google_api_expr_v1alpha1_Expr_Select_serialize_ex(const google_api_expr_v1alpha1_Expr_Select* msg, int options,
435 upb_Arena* arena, size_t* len) {
436 char* ptr;
437 (void)upb_Encode(msg, &google_api_expr_v1alpha1_Expr_Select_msginit, options, arena, &ptr, len);
438 return ptr;
439 }
440 UPB_INLINE bool google_api_expr_v1alpha1_Expr_Select_has_operand(const google_api_expr_v1alpha1_Expr_Select* msg) {
441 return _upb_hasbit(msg, 1);
442 }
443 UPB_INLINE void google_api_expr_v1alpha1_Expr_Select_clear_operand(const google_api_expr_v1alpha1_Expr_Select* msg) {
444 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const upb_Message*) = NULL;
445 }
446 UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Select_operand(const google_api_expr_v1alpha1_Expr_Select* msg) {
447 return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const google_api_expr_v1alpha1_Expr*);
448 }
449 UPB_INLINE void google_api_expr_v1alpha1_Expr_Select_clear_field(const google_api_expr_v1alpha1_Expr_Select* msg) {
450 *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
451 }
452 UPB_INLINE upb_StringView google_api_expr_v1alpha1_Expr_Select_field(const google_api_expr_v1alpha1_Expr_Select* msg) {
453 return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView);
454 }
455 UPB_INLINE void google_api_expr_v1alpha1_Expr_Select_clear_test_only(const google_api_expr_v1alpha1_Expr_Select* msg) {
456 *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = 0;
457 }
458 UPB_INLINE bool google_api_expr_v1alpha1_Expr_Select_test_only(const google_api_expr_v1alpha1_Expr_Select* msg) {
459 return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool);
460 }
461
462 UPB_INLINE void google_api_expr_v1alpha1_Expr_Select_set_operand(google_api_expr_v1alpha1_Expr_Select *msg, google_api_expr_v1alpha1_Expr* value) {
463 _upb_sethas(msg, 1);
464 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), google_api_expr_v1alpha1_Expr*) = value;
465 }
466 UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Select_mutable_operand(google_api_expr_v1alpha1_Expr_Select* msg, upb_Arena* arena) {
467 struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Select_operand(msg);
468 if (sub == NULL) {
469 sub = (struct google_api_expr_v1alpha1_Expr*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_msginit, arena);
470 if (!sub) return NULL;
471 google_api_expr_v1alpha1_Expr_Select_set_operand(msg, sub);
472 }
473 return sub;
474 }
475 UPB_INLINE void google_api_expr_v1alpha1_Expr_Select_set_field(google_api_expr_v1alpha1_Expr_Select *msg, upb_StringView value) {
476 *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView) = value;
477 }
478 UPB_INLINE void google_api_expr_v1alpha1_Expr_Select_set_test_only(google_api_expr_v1alpha1_Expr_Select *msg, bool value) {
479 *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
480 }
481
482 /* google.api.expr.v1alpha1.Expr.Call */
483
484 UPB_INLINE google_api_expr_v1alpha1_Expr_Call* google_api_expr_v1alpha1_Expr_Call_new(upb_Arena* arena) {
485 return (google_api_expr_v1alpha1_Expr_Call*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_Call_msginit, arena);
486 }
487 UPB_INLINE google_api_expr_v1alpha1_Expr_Call* google_api_expr_v1alpha1_Expr_Call_parse(const char* buf, size_t size, upb_Arena* arena) {
488 google_api_expr_v1alpha1_Expr_Call* ret = google_api_expr_v1alpha1_Expr_Call_new(arena);
489 if (!ret) return NULL;
490 if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_Call_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
491 return NULL;
492 }
493 return ret;
494 }
495 UPB_INLINE google_api_expr_v1alpha1_Expr_Call* google_api_expr_v1alpha1_Expr_Call_parse_ex(const char* buf, size_t size,
496 const upb_ExtensionRegistry* extreg,
497 int options, upb_Arena* arena) {
498 google_api_expr_v1alpha1_Expr_Call* ret = google_api_expr_v1alpha1_Expr_Call_new(arena);
499 if (!ret) return NULL;
500 if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_Call_msginit, extreg, options, arena) !=
501 kUpb_DecodeStatus_Ok) {
502 return NULL;
503 }
504 return ret;
505 }
506 UPB_INLINE char* google_api_expr_v1alpha1_Expr_Call_serialize(const google_api_expr_v1alpha1_Expr_Call* msg, upb_Arena* arena, size_t* len) {
507 char* ptr;
508 (void)upb_Encode(msg, &google_api_expr_v1alpha1_Expr_Call_msginit, 0, arena, &ptr, len);
509 return ptr;
510 }
511 UPB_INLINE char* google_api_expr_v1alpha1_Expr_Call_serialize_ex(const google_api_expr_v1alpha1_Expr_Call* msg, int options,
512 upb_Arena* arena, size_t* len) {
513 char* ptr;
514 (void)upb_Encode(msg, &google_api_expr_v1alpha1_Expr_Call_msginit, options, arena, &ptr, len);
515 return ptr;
516 }
517 UPB_INLINE bool google_api_expr_v1alpha1_Expr_Call_has_target(const google_api_expr_v1alpha1_Expr_Call* msg) {
518 return _upb_hasbit(msg, 1);
519 }
520 UPB_INLINE void google_api_expr_v1alpha1_Expr_Call_clear_target(const google_api_expr_v1alpha1_Expr_Call* msg) {
521 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const upb_Message*) = NULL;
522 }
523 UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Call_target(const google_api_expr_v1alpha1_Expr_Call* msg) {
524 return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const google_api_expr_v1alpha1_Expr*);
525 }
526 UPB_INLINE void google_api_expr_v1alpha1_Expr_Call_clear_function(const google_api_expr_v1alpha1_Expr_Call* msg) {
527 *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
528 }
529 UPB_INLINE upb_StringView google_api_expr_v1alpha1_Expr_Call_function(const google_api_expr_v1alpha1_Expr_Call* msg) {
530 return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView);
531 }
532 UPB_INLINE bool google_api_expr_v1alpha1_Expr_Call_has_args(const google_api_expr_v1alpha1_Expr_Call* msg) {
533 return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32));
534 }
535 UPB_INLINE void google_api_expr_v1alpha1_Expr_Call_clear_args(const google_api_expr_v1alpha1_Expr_Call* msg) {
536 _upb_array_detach(msg, UPB_SIZE(16, 32));
537 }
538 UPB_INLINE const google_api_expr_v1alpha1_Expr* const* google_api_expr_v1alpha1_Expr_Call_args(const google_api_expr_v1alpha1_Expr_Call* msg, size_t* len) {
539 return (const google_api_expr_v1alpha1_Expr* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len);
540 }
541
542 UPB_INLINE void google_api_expr_v1alpha1_Expr_Call_set_target(google_api_expr_v1alpha1_Expr_Call *msg, google_api_expr_v1alpha1_Expr* value) {
543 _upb_sethas(msg, 1);
544 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), google_api_expr_v1alpha1_Expr*) = value;
545 }
546 UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Call_mutable_target(google_api_expr_v1alpha1_Expr_Call* msg, upb_Arena* arena) {
547 struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Call_target(msg);
548 if (sub == NULL) {
549 sub = (struct google_api_expr_v1alpha1_Expr*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_msginit, arena);
550 if (!sub) return NULL;
551 google_api_expr_v1alpha1_Expr_Call_set_target(msg, sub);
552 }
553 return sub;
554 }
555 UPB_INLINE void google_api_expr_v1alpha1_Expr_Call_set_function(google_api_expr_v1alpha1_Expr_Call *msg, upb_StringView value) {
556 *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView) = value;
557 }
558 UPB_INLINE google_api_expr_v1alpha1_Expr** google_api_expr_v1alpha1_Expr_Call_mutable_args(google_api_expr_v1alpha1_Expr_Call* msg, size_t* len) {
559 return (google_api_expr_v1alpha1_Expr**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
560 }
561 UPB_INLINE google_api_expr_v1alpha1_Expr** google_api_expr_v1alpha1_Expr_Call_resize_args(google_api_expr_v1alpha1_Expr_Call* msg, size_t len, upb_Arena* arena) {
562 return (google_api_expr_v1alpha1_Expr**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena);
563 }
564 UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Call_add_args(google_api_expr_v1alpha1_Expr_Call* msg, upb_Arena* arena) {
565 struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_msginit, arena);
566 bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(16, 32), UPB_SIZE(2, 3), &sub, arena);
567 if (!ok) return NULL;
568 return sub;
569 }
570
571 /* google.api.expr.v1alpha1.Expr.CreateList */
572
573 UPB_INLINE google_api_expr_v1alpha1_Expr_CreateList* google_api_expr_v1alpha1_Expr_CreateList_new(upb_Arena* arena) {
574 return (google_api_expr_v1alpha1_Expr_CreateList*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_CreateList_msginit, arena);
575 }
576 UPB_INLINE google_api_expr_v1alpha1_Expr_CreateList* google_api_expr_v1alpha1_Expr_CreateList_parse(const char* buf, size_t size, upb_Arena* arena) {
577 google_api_expr_v1alpha1_Expr_CreateList* ret = google_api_expr_v1alpha1_Expr_CreateList_new(arena);
578 if (!ret) return NULL;
579 if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_CreateList_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
580 return NULL;
581 }
582 return ret;
583 }
584 UPB_INLINE google_api_expr_v1alpha1_Expr_CreateList* google_api_expr_v1alpha1_Expr_CreateList_parse_ex(const char* buf, size_t size,
585 const upb_ExtensionRegistry* extreg,
586 int options, upb_Arena* arena) {
587 google_api_expr_v1alpha1_Expr_CreateList* ret = google_api_expr_v1alpha1_Expr_CreateList_new(arena);
588 if (!ret) return NULL;
589 if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_CreateList_msginit, extreg, options, arena) !=
590 kUpb_DecodeStatus_Ok) {
591 return NULL;
592 }
593 return ret;
594 }
595 UPB_INLINE char* google_api_expr_v1alpha1_Expr_CreateList_serialize(const google_api_expr_v1alpha1_Expr_CreateList* msg, upb_Arena* arena, size_t* len) {
596 char* ptr;
597 (void)upb_Encode(msg, &google_api_expr_v1alpha1_Expr_CreateList_msginit, 0, arena, &ptr, len);
598 return ptr;
599 }
600 UPB_INLINE char* google_api_expr_v1alpha1_Expr_CreateList_serialize_ex(const google_api_expr_v1alpha1_Expr_CreateList* msg, int options,
601 upb_Arena* arena, size_t* len) {
602 char* ptr;
603 (void)upb_Encode(msg, &google_api_expr_v1alpha1_Expr_CreateList_msginit, options, arena, &ptr, len);
604 return ptr;
605 }
606 UPB_INLINE bool google_api_expr_v1alpha1_Expr_CreateList_has_elements(const google_api_expr_v1alpha1_Expr_CreateList* msg) {
607 return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0));
608 }
609 UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateList_clear_elements(const google_api_expr_v1alpha1_Expr_CreateList* msg) {
610 _upb_array_detach(msg, UPB_SIZE(0, 0));
611 }
612 UPB_INLINE const google_api_expr_v1alpha1_Expr* const* google_api_expr_v1alpha1_Expr_CreateList_elements(const google_api_expr_v1alpha1_Expr_CreateList* msg, size_t* len) {
613 return (const google_api_expr_v1alpha1_Expr* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len);
614 }
615
616 UPB_INLINE google_api_expr_v1alpha1_Expr** google_api_expr_v1alpha1_Expr_CreateList_mutable_elements(google_api_expr_v1alpha1_Expr_CreateList* msg, size_t* len) {
617 return (google_api_expr_v1alpha1_Expr**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
618 }
619 UPB_INLINE google_api_expr_v1alpha1_Expr** google_api_expr_v1alpha1_Expr_CreateList_resize_elements(google_api_expr_v1alpha1_Expr_CreateList* msg, size_t len, upb_Arena* arena) {
620 return (google_api_expr_v1alpha1_Expr**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
621 }
622 UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_CreateList_add_elements(google_api_expr_v1alpha1_Expr_CreateList* msg, upb_Arena* arena) {
623 struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_msginit, arena);
624 bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
625 if (!ok) return NULL;
626 return sub;
627 }
628
629 /* google.api.expr.v1alpha1.Expr.CreateStruct */
630
631 UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct* google_api_expr_v1alpha1_Expr_CreateStruct_new(upb_Arena* arena) {
632 return (google_api_expr_v1alpha1_Expr_CreateStruct*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_CreateStruct_msginit, arena);
633 }
634 UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct* google_api_expr_v1alpha1_Expr_CreateStruct_parse(const char* buf, size_t size, upb_Arena* arena) {
635 google_api_expr_v1alpha1_Expr_CreateStruct* ret = google_api_expr_v1alpha1_Expr_CreateStruct_new(arena);
636 if (!ret) return NULL;
637 if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_CreateStruct_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
638 return NULL;
639 }
640 return ret;
641 }
642 UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct* google_api_expr_v1alpha1_Expr_CreateStruct_parse_ex(const char* buf, size_t size,
643 const upb_ExtensionRegistry* extreg,
644 int options, upb_Arena* arena) {
645 google_api_expr_v1alpha1_Expr_CreateStruct* ret = google_api_expr_v1alpha1_Expr_CreateStruct_new(arena);
646 if (!ret) return NULL;
647 if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_CreateStruct_msginit, extreg, options, arena) !=
648 kUpb_DecodeStatus_Ok) {
649 return NULL;
650 }
651 return ret;
652 }
653 UPB_INLINE char* google_api_expr_v1alpha1_Expr_CreateStruct_serialize(const google_api_expr_v1alpha1_Expr_CreateStruct* msg, upb_Arena* arena, size_t* len) {
654 char* ptr;
655 (void)upb_Encode(msg, &google_api_expr_v1alpha1_Expr_CreateStruct_msginit, 0, arena, &ptr, len);
656 return ptr;
657 }
658 UPB_INLINE char* google_api_expr_v1alpha1_Expr_CreateStruct_serialize_ex(const google_api_expr_v1alpha1_Expr_CreateStruct* msg, int options,
659 upb_Arena* arena, size_t* len) {
660 char* ptr;
661 (void)upb_Encode(msg, &google_api_expr_v1alpha1_Expr_CreateStruct_msginit, options, arena, &ptr, len);
662 return ptr;
663 }
664 UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateStruct_clear_message_name(const google_api_expr_v1alpha1_Expr_CreateStruct* msg) {
665 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
666 }
667 UPB_INLINE upb_StringView google_api_expr_v1alpha1_Expr_CreateStruct_message_name(const google_api_expr_v1alpha1_Expr_CreateStruct* msg) {
668 return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView);
669 }
670 UPB_INLINE bool google_api_expr_v1alpha1_Expr_CreateStruct_has_entries(const google_api_expr_v1alpha1_Expr_CreateStruct* msg) {
671 return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16));
672 }
673 UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateStruct_clear_entries(const google_api_expr_v1alpha1_Expr_CreateStruct* msg) {
674 _upb_array_detach(msg, UPB_SIZE(8, 16));
675 }
676 UPB_INLINE const google_api_expr_v1alpha1_Expr_CreateStruct_Entry* const* google_api_expr_v1alpha1_Expr_CreateStruct_entries(const google_api_expr_v1alpha1_Expr_CreateStruct* msg, size_t* len) {
677 return (const google_api_expr_v1alpha1_Expr_CreateStruct_Entry* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len);
678 }
679
680 UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateStruct_set_message_name(google_api_expr_v1alpha1_Expr_CreateStruct *msg, upb_StringView value) {
681 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = value;
682 }
683 UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct_Entry** google_api_expr_v1alpha1_Expr_CreateStruct_mutable_entries(google_api_expr_v1alpha1_Expr_CreateStruct* msg, size_t* len) {
684 return (google_api_expr_v1alpha1_Expr_CreateStruct_Entry**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
685 }
686 UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct_Entry** google_api_expr_v1alpha1_Expr_CreateStruct_resize_entries(google_api_expr_v1alpha1_Expr_CreateStruct* msg, size_t len, upb_Arena* arena) {
687 return (google_api_expr_v1alpha1_Expr_CreateStruct_Entry**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena);
688 }
689 UPB_INLINE struct google_api_expr_v1alpha1_Expr_CreateStruct_Entry* google_api_expr_v1alpha1_Expr_CreateStruct_add_entries(google_api_expr_v1alpha1_Expr_CreateStruct* msg, upb_Arena* arena) {
690 struct google_api_expr_v1alpha1_Expr_CreateStruct_Entry* sub = (struct google_api_expr_v1alpha1_Expr_CreateStruct_Entry*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_CreateStruct_Entry_msginit, arena);
691 bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(8, 16), UPB_SIZE(2, 3), &sub, arena);
692 if (!ok) return NULL;
693 return sub;
694 }
695
696 /* google.api.expr.v1alpha1.Expr.CreateStruct.Entry */
697
698 UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct_Entry* google_api_expr_v1alpha1_Expr_CreateStruct_Entry_new(upb_Arena* arena) {
699 return (google_api_expr_v1alpha1_Expr_CreateStruct_Entry*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_CreateStruct_Entry_msginit, arena);
700 }
701 UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct_Entry* google_api_expr_v1alpha1_Expr_CreateStruct_Entry_parse(const char* buf, size_t size, upb_Arena* arena) {
702 google_api_expr_v1alpha1_Expr_CreateStruct_Entry* ret = google_api_expr_v1alpha1_Expr_CreateStruct_Entry_new(arena);
703 if (!ret) return NULL;
704 if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_CreateStruct_Entry_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
705 return NULL;
706 }
707 return ret;
708 }
709 UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct_Entry* google_api_expr_v1alpha1_Expr_CreateStruct_Entry_parse_ex(const char* buf, size_t size,
710 const upb_ExtensionRegistry* extreg,
711 int options, upb_Arena* arena) {
712 google_api_expr_v1alpha1_Expr_CreateStruct_Entry* ret = google_api_expr_v1alpha1_Expr_CreateStruct_Entry_new(arena);
713 if (!ret) return NULL;
714 if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_CreateStruct_Entry_msginit, extreg, options, arena) !=
715 kUpb_DecodeStatus_Ok) {
716 return NULL;
717 }
718 return ret;
719 }
720 UPB_INLINE char* google_api_expr_v1alpha1_Expr_CreateStruct_Entry_serialize(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry* msg, upb_Arena* arena, size_t* len) {
721 char* ptr;
722 (void)upb_Encode(msg, &google_api_expr_v1alpha1_Expr_CreateStruct_Entry_msginit, 0, arena, &ptr, len);
723 return ptr;
724 }
725 UPB_INLINE char* google_api_expr_v1alpha1_Expr_CreateStruct_Entry_serialize_ex(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry* msg, int options,
726 upb_Arena* arena, size_t* len) {
727 char* ptr;
728 (void)upb_Encode(msg, &google_api_expr_v1alpha1_Expr_CreateStruct_Entry_msginit, options, arena, &ptr, len);
729 return ptr;
730 }
731 typedef enum {
732 google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_field_key = 2,
733 google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_map_key = 3,
734 google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_NOT_SET = 0
735 } google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_oneofcases;
736 UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_oneofcases google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_case(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry* msg) {
737 return (google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t);
738 }
739 UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateStruct_Entry_clear_id(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry* msg) {
740 *UPB_PTR_AT(msg, UPB_SIZE(24, 32), int64_t) = 0;
741 }
742 UPB_INLINE int64_t google_api_expr_v1alpha1_Expr_CreateStruct_Entry_id(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry* msg) {
743 return *UPB_PTR_AT(msg, UPB_SIZE(24, 32), int64_t);
744 }
745 UPB_INLINE bool google_api_expr_v1alpha1_Expr_CreateStruct_Entry_has_field_key(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry* msg) {
746 return _upb_getoneofcase(msg, UPB_SIZE(4, 4)) == 2;
747 }
748 UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateStruct_Entry_clear_field_key(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry* msg) {
749 UPB_WRITE_ONEOF(msg, upb_StringView, UPB_SIZE(8, 8), upb_StringView_FromDataAndSize(NULL, 0), UPB_SIZE(4, 4), google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_NOT_SET);
750 }
751 UPB_INLINE upb_StringView google_api_expr_v1alpha1_Expr_CreateStruct_Entry_field_key(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry* msg) {
752 return UPB_READ_ONEOF(msg, upb_StringView, UPB_SIZE(8, 8), UPB_SIZE(4, 4), 2, upb_StringView_FromString(""));
753 }
754 UPB_INLINE bool google_api_expr_v1alpha1_Expr_CreateStruct_Entry_has_map_key(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry* msg) {
755 return _upb_getoneofcase(msg, UPB_SIZE(4, 4)) == 3;
756 }
757 UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateStruct_Entry_clear_map_key(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry* msg) {
758 UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Expr*, UPB_SIZE(8, 8), 0, UPB_SIZE(4, 4), google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_NOT_SET);
759 }
760 UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_CreateStruct_Entry_map_key(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry* msg) {
761 return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Expr*, UPB_SIZE(8, 8), UPB_SIZE(4, 4), 3, NULL);
762 }
763 UPB_INLINE bool google_api_expr_v1alpha1_Expr_CreateStruct_Entry_has_value(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry* msg) {
764 return _upb_hasbit(msg, 1);
765 }
766 UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateStruct_Entry_clear_value(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry* msg) {
767 *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const upb_Message*) = NULL;
768 }
769 UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_CreateStruct_Entry_value(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry* msg) {
770 return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const google_api_expr_v1alpha1_Expr*);
771 }
772
773 UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateStruct_Entry_set_id(google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg, int64_t value) {
774 *UPB_PTR_AT(msg, UPB_SIZE(24, 32), int64_t) = value;
775 }
776 UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateStruct_Entry_set_field_key(google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg, upb_StringView value) {
777 UPB_WRITE_ONEOF(msg, upb_StringView, UPB_SIZE(8, 8), value, UPB_SIZE(4, 4), 2);
778 }
779 UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateStruct_Entry_set_map_key(google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg, google_api_expr_v1alpha1_Expr* value) {
780 UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Expr*, UPB_SIZE(8, 8), value, UPB_SIZE(4, 4), 3);
781 }
782 UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_CreateStruct_Entry_mutable_map_key(google_api_expr_v1alpha1_Expr_CreateStruct_Entry* msg, upb_Arena* arena) {
783 struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_CreateStruct_Entry_map_key(msg);
784 if (sub == NULL) {
785 sub = (struct google_api_expr_v1alpha1_Expr*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_msginit, arena);
786 if (!sub) return NULL;
787 google_api_expr_v1alpha1_Expr_CreateStruct_Entry_set_map_key(msg, sub);
788 }
789 return sub;
790 }
791 UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateStruct_Entry_set_value(google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg, google_api_expr_v1alpha1_Expr* value) {
792 _upb_sethas(msg, 1);
793 *UPB_PTR_AT(msg, UPB_SIZE(16, 24), google_api_expr_v1alpha1_Expr*) = value;
794 }
795 UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_CreateStruct_Entry_mutable_value(google_api_expr_v1alpha1_Expr_CreateStruct_Entry* msg, upb_Arena* arena) {
796 struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_CreateStruct_Entry_value(msg);
797 if (sub == NULL) {
798 sub = (struct google_api_expr_v1alpha1_Expr*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_msginit, arena);
799 if (!sub) return NULL;
800 google_api_expr_v1alpha1_Expr_CreateStruct_Entry_set_value(msg, sub);
801 }
802 return sub;
803 }
804
805 /* google.api.expr.v1alpha1.Expr.Comprehension */
806
807 UPB_INLINE google_api_expr_v1alpha1_Expr_Comprehension* google_api_expr_v1alpha1_Expr_Comprehension_new(upb_Arena* arena) {
808 return (google_api_expr_v1alpha1_Expr_Comprehension*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_Comprehension_msginit, arena);
809 }
810 UPB_INLINE google_api_expr_v1alpha1_Expr_Comprehension* google_api_expr_v1alpha1_Expr_Comprehension_parse(const char* buf, size_t size, upb_Arena* arena) {
811 google_api_expr_v1alpha1_Expr_Comprehension* ret = google_api_expr_v1alpha1_Expr_Comprehension_new(arena);
812 if (!ret) return NULL;
813 if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_Comprehension_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
814 return NULL;
815 }
816 return ret;
817 }
818 UPB_INLINE google_api_expr_v1alpha1_Expr_Comprehension* google_api_expr_v1alpha1_Expr_Comprehension_parse_ex(const char* buf, size_t size,
819 const upb_ExtensionRegistry* extreg,
820 int options, upb_Arena* arena) {
821 google_api_expr_v1alpha1_Expr_Comprehension* ret = google_api_expr_v1alpha1_Expr_Comprehension_new(arena);
822 if (!ret) return NULL;
823 if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_Comprehension_msginit, extreg, options, arena) !=
824 kUpb_DecodeStatus_Ok) {
825 return NULL;
826 }
827 return ret;
828 }
829 UPB_INLINE char* google_api_expr_v1alpha1_Expr_Comprehension_serialize(const google_api_expr_v1alpha1_Expr_Comprehension* msg, upb_Arena* arena, size_t* len) {
830 char* ptr;
831 (void)upb_Encode(msg, &google_api_expr_v1alpha1_Expr_Comprehension_msginit, 0, arena, &ptr, len);
832 return ptr;
833 }
834 UPB_INLINE char* google_api_expr_v1alpha1_Expr_Comprehension_serialize_ex(const google_api_expr_v1alpha1_Expr_Comprehension* msg, int options,
835 upb_Arena* arena, size_t* len) {
836 char* ptr;
837 (void)upb_Encode(msg, &google_api_expr_v1alpha1_Expr_Comprehension_msginit, options, arena, &ptr, len);
838 return ptr;
839 }
840 UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_clear_iter_var(const google_api_expr_v1alpha1_Expr_Comprehension* msg) {
841 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
842 }
843 UPB_INLINE upb_StringView google_api_expr_v1alpha1_Expr_Comprehension_iter_var(const google_api_expr_v1alpha1_Expr_Comprehension* msg) {
844 return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView);
845 }
846 UPB_INLINE bool google_api_expr_v1alpha1_Expr_Comprehension_has_iter_range(const google_api_expr_v1alpha1_Expr_Comprehension* msg) {
847 return _upb_hasbit(msg, 1);
848 }
849 UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_clear_iter_range(const google_api_expr_v1alpha1_Expr_Comprehension* msg) {
850 *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const upb_Message*) = NULL;
851 }
852 UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_iter_range(const google_api_expr_v1alpha1_Expr_Comprehension* msg) {
853 return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_api_expr_v1alpha1_Expr*);
854 }
855 UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_clear_accu_var(const google_api_expr_v1alpha1_Expr_Comprehension* msg) {
856 *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
857 }
858 UPB_INLINE upb_StringView google_api_expr_v1alpha1_Expr_Comprehension_accu_var(const google_api_expr_v1alpha1_Expr_Comprehension* msg) {
859 return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_StringView);
860 }
861 UPB_INLINE bool google_api_expr_v1alpha1_Expr_Comprehension_has_accu_init(const google_api_expr_v1alpha1_Expr_Comprehension* msg) {
862 return _upb_hasbit(msg, 2);
863 }
864 UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_clear_accu_init(const google_api_expr_v1alpha1_Expr_Comprehension* msg) {
865 *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const upb_Message*) = NULL;
866 }
867 UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_accu_init(const google_api_expr_v1alpha1_Expr_Comprehension* msg) {
868 return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const google_api_expr_v1alpha1_Expr*);
869 }
870 UPB_INLINE bool google_api_expr_v1alpha1_Expr_Comprehension_has_loop_condition(const google_api_expr_v1alpha1_Expr_Comprehension* msg) {
871 return _upb_hasbit(msg, 3);
872 }
873 UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_clear_loop_condition(const google_api_expr_v1alpha1_Expr_Comprehension* msg) {
874 *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const upb_Message*) = NULL;
875 }
876 UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_loop_condition(const google_api_expr_v1alpha1_Expr_Comprehension* msg) {
877 return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const google_api_expr_v1alpha1_Expr*);
878 }
879 UPB_INLINE bool google_api_expr_v1alpha1_Expr_Comprehension_has_loop_step(const google_api_expr_v1alpha1_Expr_Comprehension* msg) {
880 return _upb_hasbit(msg, 4);
881 }
882 UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_clear_loop_step(const google_api_expr_v1alpha1_Expr_Comprehension* msg) {
883 *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const upb_Message*) = NULL;
884 }
885 UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_loop_step(const google_api_expr_v1alpha1_Expr_Comprehension* msg) {
886 return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const google_api_expr_v1alpha1_Expr*);
887 }
888 UPB_INLINE bool google_api_expr_v1alpha1_Expr_Comprehension_has_result(const google_api_expr_v1alpha1_Expr_Comprehension* msg) {
889 return _upb_hasbit(msg, 5);
890 }
891 UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_clear_result(const google_api_expr_v1alpha1_Expr_Comprehension* msg) {
892 *UPB_PTR_AT(msg, UPB_SIZE(36, 72), const upb_Message*) = NULL;
893 }
894 UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_result(const google_api_expr_v1alpha1_Expr_Comprehension* msg) {
895 return *UPB_PTR_AT(msg, UPB_SIZE(36, 72), const google_api_expr_v1alpha1_Expr*);
896 }
897
898 UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_iter_var(google_api_expr_v1alpha1_Expr_Comprehension *msg, upb_StringView value) {
899 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value;
900 }
901 UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_iter_range(google_api_expr_v1alpha1_Expr_Comprehension *msg, google_api_expr_v1alpha1_Expr* value) {
902 _upb_sethas(msg, 1);
903 *UPB_PTR_AT(msg, UPB_SIZE(12, 24), google_api_expr_v1alpha1_Expr*) = value;
904 }
905 UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_mutable_iter_range(google_api_expr_v1alpha1_Expr_Comprehension* msg, upb_Arena* arena) {
906 struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Comprehension_iter_range(msg);
907 if (sub == NULL) {
908 sub = (struct google_api_expr_v1alpha1_Expr*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_msginit, arena);
909 if (!sub) return NULL;
910 google_api_expr_v1alpha1_Expr_Comprehension_set_iter_range(msg, sub);
911 }
912 return sub;
913 }
914 UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_accu_var(google_api_expr_v1alpha1_Expr_Comprehension *msg, upb_StringView value) {
915 *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_StringView) = value;
916 }
917 UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_accu_init(google_api_expr_v1alpha1_Expr_Comprehension *msg, google_api_expr_v1alpha1_Expr* value) {
918 _upb_sethas(msg, 2);
919 *UPB_PTR_AT(msg, UPB_SIZE(24, 48), google_api_expr_v1alpha1_Expr*) = value;
920 }
921 UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_mutable_accu_init(google_api_expr_v1alpha1_Expr_Comprehension* msg, upb_Arena* arena) {
922 struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Comprehension_accu_init(msg);
923 if (sub == NULL) {
924 sub = (struct google_api_expr_v1alpha1_Expr*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_msginit, arena);
925 if (!sub) return NULL;
926 google_api_expr_v1alpha1_Expr_Comprehension_set_accu_init(msg, sub);
927 }
928 return sub;
929 }
930 UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_loop_condition(google_api_expr_v1alpha1_Expr_Comprehension *msg, google_api_expr_v1alpha1_Expr* value) {
931 _upb_sethas(msg, 3);
932 *UPB_PTR_AT(msg, UPB_SIZE(28, 56), google_api_expr_v1alpha1_Expr*) = value;
933 }
934 UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_mutable_loop_condition(google_api_expr_v1alpha1_Expr_Comprehension* msg, upb_Arena* arena) {
935 struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Comprehension_loop_condition(msg);
936 if (sub == NULL) {
937 sub = (struct google_api_expr_v1alpha1_Expr*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_msginit, arena);
938 if (!sub) return NULL;
939 google_api_expr_v1alpha1_Expr_Comprehension_set_loop_condition(msg, sub);
940 }
941 return sub;
942 }
943 UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_loop_step(google_api_expr_v1alpha1_Expr_Comprehension *msg, google_api_expr_v1alpha1_Expr* value) {
944 _upb_sethas(msg, 4);
945 *UPB_PTR_AT(msg, UPB_SIZE(32, 64), google_api_expr_v1alpha1_Expr*) = value;
946 }
947 UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_mutable_loop_step(google_api_expr_v1alpha1_Expr_Comprehension* msg, upb_Arena* arena) {
948 struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Comprehension_loop_step(msg);
949 if (sub == NULL) {
950 sub = (struct google_api_expr_v1alpha1_Expr*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_msginit, arena);
951 if (!sub) return NULL;
952 google_api_expr_v1alpha1_Expr_Comprehension_set_loop_step(msg, sub);
953 }
954 return sub;
955 }
956 UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_result(google_api_expr_v1alpha1_Expr_Comprehension *msg, google_api_expr_v1alpha1_Expr* value) {
957 _upb_sethas(msg, 5);
958 *UPB_PTR_AT(msg, UPB_SIZE(36, 72), google_api_expr_v1alpha1_Expr*) = value;
959 }
960 UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_mutable_result(google_api_expr_v1alpha1_Expr_Comprehension* msg, upb_Arena* arena) {
961 struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Comprehension_result(msg);
962 if (sub == NULL) {
963 sub = (struct google_api_expr_v1alpha1_Expr*)_upb_Message_New(&google_api_expr_v1alpha1_Expr_msginit, arena);
964 if (!sub) return NULL;
965 google_api_expr_v1alpha1_Expr_Comprehension_set_result(msg, sub);
966 }
967 return sub;
968 }
969
970 /* google.api.expr.v1alpha1.Constant */
971
972 UPB_INLINE google_api_expr_v1alpha1_Constant* google_api_expr_v1alpha1_Constant_new(upb_Arena* arena) {
973 return (google_api_expr_v1alpha1_Constant*)_upb_Message_New(&google_api_expr_v1alpha1_Constant_msginit, arena);
974 }
975 UPB_INLINE google_api_expr_v1alpha1_Constant* google_api_expr_v1alpha1_Constant_parse(const char* buf, size_t size, upb_Arena* arena) {
976 google_api_expr_v1alpha1_Constant* ret = google_api_expr_v1alpha1_Constant_new(arena);
977 if (!ret) return NULL;
978 if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Constant_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
979 return NULL;
980 }
981 return ret;
982 }
983 UPB_INLINE google_api_expr_v1alpha1_Constant* google_api_expr_v1alpha1_Constant_parse_ex(const char* buf, size_t size,
984 const upb_ExtensionRegistry* extreg,
985 int options, upb_Arena* arena) {
986 google_api_expr_v1alpha1_Constant* ret = google_api_expr_v1alpha1_Constant_new(arena);
987 if (!ret) return NULL;
988 if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_Constant_msginit, extreg, options, arena) !=
989 kUpb_DecodeStatus_Ok) {
990 return NULL;
991 }
992 return ret;
993 }
994 UPB_INLINE char* google_api_expr_v1alpha1_Constant_serialize(const google_api_expr_v1alpha1_Constant* msg, upb_Arena* arena, size_t* len) {
995 char* ptr;
996 (void)upb_Encode(msg, &google_api_expr_v1alpha1_Constant_msginit, 0, arena, &ptr, len);
997 return ptr;
998 }
999 UPB_INLINE char* google_api_expr_v1alpha1_Constant_serialize_ex(const google_api_expr_v1alpha1_Constant* msg, int options,
1000 upb_Arena* arena, size_t* len) {
1001 char* ptr;
1002 (void)upb_Encode(msg, &google_api_expr_v1alpha1_Constant_msginit, options, arena, &ptr, len);
1003 return ptr;
1004 }
1005 typedef enum {
1006 google_api_expr_v1alpha1_Constant_constant_kind_null_value = 1,
1007 google_api_expr_v1alpha1_Constant_constant_kind_bool_value = 2,
1008 google_api_expr_v1alpha1_Constant_constant_kind_int64_value = 3,
1009 google_api_expr_v1alpha1_Constant_constant_kind_uint64_value = 4,
1010 google_api_expr_v1alpha1_Constant_constant_kind_double_value = 5,
1011 google_api_expr_v1alpha1_Constant_constant_kind_string_value = 6,
1012 google_api_expr_v1alpha1_Constant_constant_kind_bytes_value = 7,
1013 google_api_expr_v1alpha1_Constant_constant_kind_duration_value = 8,
1014 google_api_expr_v1alpha1_Constant_constant_kind_timestamp_value = 9,
1015 google_api_expr_v1alpha1_Constant_constant_kind_NOT_SET = 0
1016 } google_api_expr_v1alpha1_Constant_constant_kind_oneofcases;
1017 UPB_INLINE google_api_expr_v1alpha1_Constant_constant_kind_oneofcases google_api_expr_v1alpha1_Constant_constant_kind_case(const google_api_expr_v1alpha1_Constant* msg) {
1018 return (google_api_expr_v1alpha1_Constant_constant_kind_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t);
1019 }
1020 UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_null_value(const google_api_expr_v1alpha1_Constant* msg) {
1021 return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 1;
1022 }
1023 UPB_INLINE void google_api_expr_v1alpha1_Constant_clear_null_value(const google_api_expr_v1alpha1_Constant* msg) {
1024 UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(8, 8), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Constant_constant_kind_NOT_SET);
1025 }
1026 UPB_INLINE int32_t google_api_expr_v1alpha1_Constant_null_value(const google_api_expr_v1alpha1_Constant* msg) {
1027 return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(8, 8), UPB_SIZE(0, 0), 1, 0);
1028 }
1029 UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_bool_value(const google_api_expr_v1alpha1_Constant* msg) {
1030 return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 2;
1031 }
1032 UPB_INLINE void google_api_expr_v1alpha1_Constant_clear_bool_value(const google_api_expr_v1alpha1_Constant* msg) {
1033 UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(8, 8), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Constant_constant_kind_NOT_SET);
1034 }
1035 UPB_INLINE bool google_api_expr_v1alpha1_Constant_bool_value(const google_api_expr_v1alpha1_Constant* msg) {
1036 return UPB_READ_ONEOF(msg, bool, UPB_SIZE(8, 8), UPB_SIZE(0, 0), 2, false);
1037 }
1038 UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_int64_value(const google_api_expr_v1alpha1_Constant* msg) {
1039 return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 3;
1040 }
1041 UPB_INLINE void google_api_expr_v1alpha1_Constant_clear_int64_value(const google_api_expr_v1alpha1_Constant* msg) {
1042 UPB_WRITE_ONEOF(msg, int64_t, UPB_SIZE(8, 8), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Constant_constant_kind_NOT_SET);
1043 }
1044 UPB_INLINE int64_t google_api_expr_v1alpha1_Constant_int64_value(const google_api_expr_v1alpha1_Constant* msg) {
1045 return UPB_READ_ONEOF(msg, int64_t, UPB_SIZE(8, 8), UPB_SIZE(0, 0), 3, _upb_Int64_FromLL(0ll));
1046 }
1047 UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_uint64_value(const google_api_expr_v1alpha1_Constant* msg) {
1048 return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 4;
1049 }
1050 UPB_INLINE void google_api_expr_v1alpha1_Constant_clear_uint64_value(const google_api_expr_v1alpha1_Constant* msg) {
1051 UPB_WRITE_ONEOF(msg, uint64_t, UPB_SIZE(8, 8), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Constant_constant_kind_NOT_SET);
1052 }
1053 UPB_INLINE uint64_t google_api_expr_v1alpha1_Constant_uint64_value(const google_api_expr_v1alpha1_Constant* msg) {
1054 return UPB_READ_ONEOF(msg, uint64_t, UPB_SIZE(8, 8), UPB_SIZE(0, 0), 4, _upb_UInt64_FromULL(0ull));
1055 }
1056 UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_double_value(const google_api_expr_v1alpha1_Constant* msg) {
1057 return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 5;
1058 }
1059 UPB_INLINE void google_api_expr_v1alpha1_Constant_clear_double_value(const google_api_expr_v1alpha1_Constant* msg) {
1060 UPB_WRITE_ONEOF(msg, double, UPB_SIZE(8, 8), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Constant_constant_kind_NOT_SET);
1061 }
1062 UPB_INLINE double google_api_expr_v1alpha1_Constant_double_value(const google_api_expr_v1alpha1_Constant* msg) {
1063 return UPB_READ_ONEOF(msg, double, UPB_SIZE(8, 8), UPB_SIZE(0, 0), 5, 0);
1064 }
1065 UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_string_value(const google_api_expr_v1alpha1_Constant* msg) {
1066 return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 6;
1067 }
1068 UPB_INLINE void google_api_expr_v1alpha1_Constant_clear_string_value(const google_api_expr_v1alpha1_Constant* msg) {
1069 UPB_WRITE_ONEOF(msg, upb_StringView, UPB_SIZE(8, 8), upb_StringView_FromDataAndSize(NULL, 0), UPB_SIZE(0, 0), google_api_expr_v1alpha1_Constant_constant_kind_NOT_SET);
1070 }
1071 UPB_INLINE upb_StringView google_api_expr_v1alpha1_Constant_string_value(const google_api_expr_v1alpha1_Constant* msg) {
1072 return UPB_READ_ONEOF(msg, upb_StringView, UPB_SIZE(8, 8), UPB_SIZE(0, 0), 6, upb_StringView_FromString(""));
1073 }
1074 UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_bytes_value(const google_api_expr_v1alpha1_Constant* msg) {
1075 return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 7;
1076 }
1077 UPB_INLINE void google_api_expr_v1alpha1_Constant_clear_bytes_value(const google_api_expr_v1alpha1_Constant* msg) {
1078 UPB_WRITE_ONEOF(msg, upb_StringView, UPB_SIZE(8, 8), upb_StringView_FromDataAndSize(NULL, 0), UPB_SIZE(0, 0), google_api_expr_v1alpha1_Constant_constant_kind_NOT_SET);
1079 }
1080 UPB_INLINE upb_StringView google_api_expr_v1alpha1_Constant_bytes_value(const google_api_expr_v1alpha1_Constant* msg) {
1081 return UPB_READ_ONEOF(msg, upb_StringView, UPB_SIZE(8, 8), UPB_SIZE(0, 0), 7, upb_StringView_FromString(""));
1082 }
1083 UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_duration_value(const google_api_expr_v1alpha1_Constant* msg) {
1084 return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 8;
1085 }
1086 UPB_INLINE void google_api_expr_v1alpha1_Constant_clear_duration_value(const google_api_expr_v1alpha1_Constant* msg) {
1087 UPB_WRITE_ONEOF(msg, struct google_protobuf_Duration*, UPB_SIZE(8, 8), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Constant_constant_kind_NOT_SET);
1088 }
1089 UPB_INLINE const struct google_protobuf_Duration* google_api_expr_v1alpha1_Constant_duration_value(const google_api_expr_v1alpha1_Constant* msg) {
1090 return UPB_READ_ONEOF(msg, const struct google_protobuf_Duration*, UPB_SIZE(8, 8), UPB_SIZE(0, 0), 8, NULL);
1091 }
1092 UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_timestamp_value(const google_api_expr_v1alpha1_Constant* msg) {
1093 return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 9;
1094 }
1095 UPB_INLINE void google_api_expr_v1alpha1_Constant_clear_timestamp_value(const google_api_expr_v1alpha1_Constant* msg) {
1096 UPB_WRITE_ONEOF(msg, struct google_protobuf_Timestamp*, UPB_SIZE(8, 8), 0, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Constant_constant_kind_NOT_SET);
1097 }
1098 UPB_INLINE const struct google_protobuf_Timestamp* google_api_expr_v1alpha1_Constant_timestamp_value(const google_api_expr_v1alpha1_Constant* msg) {
1099 return UPB_READ_ONEOF(msg, const struct google_protobuf_Timestamp*, UPB_SIZE(8, 8), UPB_SIZE(0, 0), 9, NULL);
1100 }
1101
1102 UPB_INLINE void google_api_expr_v1alpha1_Constant_set_null_value(google_api_expr_v1alpha1_Constant *msg, int32_t value) {
1103 UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(8, 8), value, UPB_SIZE(0, 0), 1);
1104 }
1105 UPB_INLINE void google_api_expr_v1alpha1_Constant_set_bool_value(google_api_expr_v1alpha1_Constant *msg, bool value) {
1106 UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(8, 8), value, UPB_SIZE(0, 0), 2);
1107 }
1108 UPB_INLINE void google_api_expr_v1alpha1_Constant_set_int64_value(google_api_expr_v1alpha1_Constant *msg, int64_t value) {
1109 UPB_WRITE_ONEOF(msg, int64_t, UPB_SIZE(8, 8), value, UPB_SIZE(0, 0), 3);
1110 }
1111 UPB_INLINE void google_api_expr_v1alpha1_Constant_set_uint64_value(google_api_expr_v1alpha1_Constant *msg, uint64_t value) {
1112 UPB_WRITE_ONEOF(msg, uint64_t, UPB_SIZE(8, 8), value, UPB_SIZE(0, 0), 4);
1113 }
1114 UPB_INLINE void google_api_expr_v1alpha1_Constant_set_double_value(google_api_expr_v1alpha1_Constant *msg, double value) {
1115 UPB_WRITE_ONEOF(msg, double, UPB_SIZE(8, 8), value, UPB_SIZE(0, 0), 5);
1116 }
1117 UPB_INLINE void google_api_expr_v1alpha1_Constant_set_string_value(google_api_expr_v1alpha1_Constant *msg, upb_StringView value) {
1118 UPB_WRITE_ONEOF(msg, upb_StringView, UPB_SIZE(8, 8), value, UPB_SIZE(0, 0), 6);
1119 }
1120 UPB_INLINE void google_api_expr_v1alpha1_Constant_set_bytes_value(google_api_expr_v1alpha1_Constant *msg, upb_StringView value) {
1121 UPB_WRITE_ONEOF(msg, upb_StringView, UPB_SIZE(8, 8), value, UPB_SIZE(0, 0), 7);
1122 }
1123 UPB_INLINE void google_api_expr_v1alpha1_Constant_set_duration_value(google_api_expr_v1alpha1_Constant *msg, struct google_protobuf_Duration* value) {
1124 UPB_WRITE_ONEOF(msg, struct google_protobuf_Duration*, UPB_SIZE(8, 8), value, UPB_SIZE(0, 0), 8);
1125 }
1126 UPB_INLINE struct google_protobuf_Duration* google_api_expr_v1alpha1_Constant_mutable_duration_value(google_api_expr_v1alpha1_Constant* msg, upb_Arena* arena) {
1127 struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)google_api_expr_v1alpha1_Constant_duration_value(msg);
1128 if (sub == NULL) {
1129 sub = (struct google_protobuf_Duration*)_upb_Message_New(&google_protobuf_Duration_msginit, arena);
1130 if (!sub) return NULL;
1131 google_api_expr_v1alpha1_Constant_set_duration_value(msg, sub);
1132 }
1133 return sub;
1134 }
1135 UPB_INLINE void google_api_expr_v1alpha1_Constant_set_timestamp_value(google_api_expr_v1alpha1_Constant *msg, struct google_protobuf_Timestamp* value) {
1136 UPB_WRITE_ONEOF(msg, struct google_protobuf_Timestamp*, UPB_SIZE(8, 8), value, UPB_SIZE(0, 0), 9);
1137 }
1138 UPB_INLINE struct google_protobuf_Timestamp* google_api_expr_v1alpha1_Constant_mutable_timestamp_value(google_api_expr_v1alpha1_Constant* msg, upb_Arena* arena) {
1139 struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)google_api_expr_v1alpha1_Constant_timestamp_value(msg);
1140 if (sub == NULL) {
1141 sub = (struct google_protobuf_Timestamp*)_upb_Message_New(&google_protobuf_Timestamp_msginit, arena);
1142 if (!sub) return NULL;
1143 google_api_expr_v1alpha1_Constant_set_timestamp_value(msg, sub);
1144 }
1145 return sub;
1146 }
1147
1148 /* google.api.expr.v1alpha1.SourceInfo */
1149
1150 UPB_INLINE google_api_expr_v1alpha1_SourceInfo* google_api_expr_v1alpha1_SourceInfo_new(upb_Arena* arena) {
1151 return (google_api_expr_v1alpha1_SourceInfo*)_upb_Message_New(&google_api_expr_v1alpha1_SourceInfo_msginit, arena);
1152 }
1153 UPB_INLINE google_api_expr_v1alpha1_SourceInfo* google_api_expr_v1alpha1_SourceInfo_parse(const char* buf, size_t size, upb_Arena* arena) {
1154 google_api_expr_v1alpha1_SourceInfo* ret = google_api_expr_v1alpha1_SourceInfo_new(arena);
1155 if (!ret) return NULL;
1156 if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_SourceInfo_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
1157 return NULL;
1158 }
1159 return ret;
1160 }
1161 UPB_INLINE google_api_expr_v1alpha1_SourceInfo* google_api_expr_v1alpha1_SourceInfo_parse_ex(const char* buf, size_t size,
1162 const upb_ExtensionRegistry* extreg,
1163 int options, upb_Arena* arena) {
1164 google_api_expr_v1alpha1_SourceInfo* ret = google_api_expr_v1alpha1_SourceInfo_new(arena);
1165 if (!ret) return NULL;
1166 if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_SourceInfo_msginit, extreg, options, arena) !=
1167 kUpb_DecodeStatus_Ok) {
1168 return NULL;
1169 }
1170 return ret;
1171 }
1172 UPB_INLINE char* google_api_expr_v1alpha1_SourceInfo_serialize(const google_api_expr_v1alpha1_SourceInfo* msg, upb_Arena* arena, size_t* len) {
1173 char* ptr;
1174 (void)upb_Encode(msg, &google_api_expr_v1alpha1_SourceInfo_msginit, 0, arena, &ptr, len);
1175 return ptr;
1176 }
1177 UPB_INLINE char* google_api_expr_v1alpha1_SourceInfo_serialize_ex(const google_api_expr_v1alpha1_SourceInfo* msg, int options,
1178 upb_Arena* arena, size_t* len) {
1179 char* ptr;
1180 (void)upb_Encode(msg, &google_api_expr_v1alpha1_SourceInfo_msginit, options, arena, &ptr, len);
1181 return ptr;
1182 }
1183 UPB_INLINE void google_api_expr_v1alpha1_SourceInfo_clear_syntax_version(const google_api_expr_v1alpha1_SourceInfo* msg) {
1184 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
1185 }
1186 UPB_INLINE upb_StringView google_api_expr_v1alpha1_SourceInfo_syntax_version(const google_api_expr_v1alpha1_SourceInfo* msg) {
1187 return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView);
1188 }
1189 UPB_INLINE void google_api_expr_v1alpha1_SourceInfo_clear_location(const google_api_expr_v1alpha1_SourceInfo* msg) {
1190 *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
1191 }
1192 UPB_INLINE upb_StringView google_api_expr_v1alpha1_SourceInfo_location(const google_api_expr_v1alpha1_SourceInfo* msg) {
1193 return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView);
1194 }
1195 UPB_INLINE void google_api_expr_v1alpha1_SourceInfo_clear_line_offsets(const google_api_expr_v1alpha1_SourceInfo* msg) {
1196 _upb_array_detach(msg, UPB_SIZE(16, 32));
1197 }
1198 UPB_INLINE int32_t const* google_api_expr_v1alpha1_SourceInfo_line_offsets(const google_api_expr_v1alpha1_SourceInfo* msg, size_t* len) {
1199 return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len);
1200 }
1201 UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_has_positions(const google_api_expr_v1alpha1_SourceInfo* msg) {
1202 return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40));
1203 }
1204 UPB_INLINE void google_api_expr_v1alpha1_SourceInfo_clear_positions(const google_api_expr_v1alpha1_SourceInfo* msg) {
1205 _upb_array_detach(msg, UPB_SIZE(20, 40));
1206 }
1207 UPB_INLINE size_t google_api_expr_v1alpha1_SourceInfo_positions_size(const google_api_expr_v1alpha1_SourceInfo* msg) {
1208 return _upb_msg_map_size(msg, UPB_SIZE(20, 40));
1209 }
1210 UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_positions_get(const google_api_expr_v1alpha1_SourceInfo* msg, int64_t key, int32_t* val) {
1211 return _upb_msg_map_get(msg, UPB_SIZE(20, 40), &key, sizeof(key), val, sizeof(*val));
1212 }
1213 UPB_INLINE const google_api_expr_v1alpha1_SourceInfo_PositionsEntry* google_api_expr_v1alpha1_SourceInfo_positions_next(const google_api_expr_v1alpha1_SourceInfo* msg, size_t* iter) {
1214 return (const google_api_expr_v1alpha1_SourceInfo_PositionsEntry*)_upb_msg_map_next(msg, UPB_SIZE(20, 40), iter);
1215 }
1216 UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_has_macro_calls(const google_api_expr_v1alpha1_SourceInfo* msg) {
1217 return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48));
1218 }
1219 UPB_INLINE void google_api_expr_v1alpha1_SourceInfo_clear_macro_calls(const google_api_expr_v1alpha1_SourceInfo* msg) {
1220 _upb_array_detach(msg, UPB_SIZE(24, 48));
1221 }
1222 UPB_INLINE size_t google_api_expr_v1alpha1_SourceInfo_macro_calls_size(const google_api_expr_v1alpha1_SourceInfo* msg) {
1223 return _upb_msg_map_size(msg, UPB_SIZE(24, 48));
1224 }
1225 UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_macro_calls_get(const google_api_expr_v1alpha1_SourceInfo* msg, int64_t key, google_api_expr_v1alpha1_Expr** val) {
1226 return _upb_msg_map_get(msg, UPB_SIZE(24, 48), &key, sizeof(key), val, sizeof(*val));
1227 }
1228 UPB_INLINE const google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry* google_api_expr_v1alpha1_SourceInfo_macro_calls_next(const google_api_expr_v1alpha1_SourceInfo* msg, size_t* iter) {
1229 return (const google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry*)_upb_msg_map_next(msg, UPB_SIZE(24, 48), iter);
1230 }
1231
1232 UPB_INLINE void google_api_expr_v1alpha1_SourceInfo_set_syntax_version(google_api_expr_v1alpha1_SourceInfo *msg, upb_StringView value) {
1233 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = value;
1234 }
1235 UPB_INLINE void google_api_expr_v1alpha1_SourceInfo_set_location(google_api_expr_v1alpha1_SourceInfo *msg, upb_StringView value) {
1236 *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView) = value;
1237 }
1238 UPB_INLINE int32_t* google_api_expr_v1alpha1_SourceInfo_mutable_line_offsets(google_api_expr_v1alpha1_SourceInfo* msg, size_t* len) {
1239 return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
1240 }
1241 UPB_INLINE int32_t* google_api_expr_v1alpha1_SourceInfo_resize_line_offsets(google_api_expr_v1alpha1_SourceInfo* msg, size_t len, upb_Arena* arena) {
1242 return (int32_t*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(16, 32), len, 2, arena);
1243 }
1244 UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_add_line_offsets(google_api_expr_v1alpha1_SourceInfo* msg, int32_t val, upb_Arena* arena) {
1245 return _upb_Array_Append_accessor2(msg, UPB_SIZE(16, 32), 2, &val, arena);
1246 }
1247 UPB_INLINE void google_api_expr_v1alpha1_SourceInfo_positions_clear(google_api_expr_v1alpha1_SourceInfo* msg) { _upb_msg_map_clear(msg, UPB_SIZE(20, 40)); }
1248 UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_positions_set(google_api_expr_v1alpha1_SourceInfo* msg, int64_t key, int32_t val, upb_Arena* a) {
1249 return _upb_msg_map_set(msg, UPB_SIZE(20, 40), &key, sizeof(key), &val, sizeof(val), a);
1250 }
1251 UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_positions_delete(google_api_expr_v1alpha1_SourceInfo* msg, int64_t key) {
1252 return _upb_msg_map_delete(msg, UPB_SIZE(20, 40), &key, sizeof(key));
1253 }
1254 UPB_INLINE google_api_expr_v1alpha1_SourceInfo_PositionsEntry* google_api_expr_v1alpha1_SourceInfo_positions_nextmutable(google_api_expr_v1alpha1_SourceInfo* msg, size_t* iter) {
1255 return (google_api_expr_v1alpha1_SourceInfo_PositionsEntry*)_upb_msg_map_next(msg, UPB_SIZE(20, 40), iter);
1256 }
1257 UPB_INLINE void google_api_expr_v1alpha1_SourceInfo_macro_calls_clear(google_api_expr_v1alpha1_SourceInfo* msg) { _upb_msg_map_clear(msg, UPB_SIZE(24, 48)); }
1258 UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_macro_calls_set(google_api_expr_v1alpha1_SourceInfo* msg, int64_t key, google_api_expr_v1alpha1_Expr* val, upb_Arena* a) {
1259 return _upb_msg_map_set(msg, UPB_SIZE(24, 48), &key, sizeof(key), &val, sizeof(val), a);
1260 }
1261 UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_macro_calls_delete(google_api_expr_v1alpha1_SourceInfo* msg, int64_t key) {
1262 return _upb_msg_map_delete(msg, UPB_SIZE(24, 48), &key, sizeof(key));
1263 }
1264 UPB_INLINE google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry* google_api_expr_v1alpha1_SourceInfo_macro_calls_nextmutable(google_api_expr_v1alpha1_SourceInfo* msg, size_t* iter) {
1265 return (google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry*)_upb_msg_map_next(msg, UPB_SIZE(24, 48), iter);
1266 }
1267
1268 /* google.api.expr.v1alpha1.SourceInfo.PositionsEntry */
1269
1270 UPB_INLINE int64_t google_api_expr_v1alpha1_SourceInfo_PositionsEntry_key(const google_api_expr_v1alpha1_SourceInfo_PositionsEntry* msg) {
1271 int64_t ret;
1272 _upb_msg_map_key(msg, &ret, sizeof(ret));
1273 return ret;
1274 }
1275 UPB_INLINE int32_t google_api_expr_v1alpha1_SourceInfo_PositionsEntry_value(const google_api_expr_v1alpha1_SourceInfo_PositionsEntry* msg) {
1276 int32_t ret;
1277 _upb_msg_map_value(msg, &ret, sizeof(ret));
1278 return ret;
1279 }
1280
1281 UPB_INLINE void google_api_expr_v1alpha1_SourceInfo_PositionsEntry_set_value(google_api_expr_v1alpha1_SourceInfo_PositionsEntry *msg, int32_t value) {
1282 _upb_msg_map_set_value(msg, &value, sizeof(int32_t));
1283 }
1284
1285 /* google.api.expr.v1alpha1.SourceInfo.MacroCallsEntry */
1286
1287 UPB_INLINE int64_t google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry_key(const google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry* msg) {
1288 int64_t ret;
1289 _upb_msg_map_key(msg, &ret, sizeof(ret));
1290 return ret;
1291 }
1292 UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry_has_value(const google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry* msg) {
1293 return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16));
1294 }
1295 UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry_value(const google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry* msg) {
1296 google_api_expr_v1alpha1_Expr* ret;
1297 _upb_msg_map_value(msg, &ret, sizeof(ret));
1298 return ret;
1299 }
1300
1301 UPB_INLINE void google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry_set_value(google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry *msg, google_api_expr_v1alpha1_Expr* value) {
1302 _upb_msg_map_set_value(msg, &value, sizeof(google_api_expr_v1alpha1_Expr*));
1303 }
1304
1305 /* google.api.expr.v1alpha1.SourcePosition */
1306
1307 UPB_INLINE google_api_expr_v1alpha1_SourcePosition* google_api_expr_v1alpha1_SourcePosition_new(upb_Arena* arena) {
1308 return (google_api_expr_v1alpha1_SourcePosition*)_upb_Message_New(&google_api_expr_v1alpha1_SourcePosition_msginit, arena);
1309 }
1310 UPB_INLINE google_api_expr_v1alpha1_SourcePosition* google_api_expr_v1alpha1_SourcePosition_parse(const char* buf, size_t size, upb_Arena* arena) {
1311 google_api_expr_v1alpha1_SourcePosition* ret = google_api_expr_v1alpha1_SourcePosition_new(arena);
1312 if (!ret) return NULL;
1313 if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_SourcePosition_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
1314 return NULL;
1315 }
1316 return ret;
1317 }
1318 UPB_INLINE google_api_expr_v1alpha1_SourcePosition* google_api_expr_v1alpha1_SourcePosition_parse_ex(const char* buf, size_t size,
1319 const upb_ExtensionRegistry* extreg,
1320 int options, upb_Arena* arena) {
1321 google_api_expr_v1alpha1_SourcePosition* ret = google_api_expr_v1alpha1_SourcePosition_new(arena);
1322 if (!ret) return NULL;
1323 if (upb_Decode(buf, size, ret, &google_api_expr_v1alpha1_SourcePosition_msginit, extreg, options, arena) !=
1324 kUpb_DecodeStatus_Ok) {
1325 return NULL;
1326 }
1327 return ret;
1328 }
1329 UPB_INLINE char* google_api_expr_v1alpha1_SourcePosition_serialize(const google_api_expr_v1alpha1_SourcePosition* msg, upb_Arena* arena, size_t* len) {
1330 char* ptr;
1331 (void)upb_Encode(msg, &google_api_expr_v1alpha1_SourcePosition_msginit, 0, arena, &ptr, len);
1332 return ptr;
1333 }
1334 UPB_INLINE char* google_api_expr_v1alpha1_SourcePosition_serialize_ex(const google_api_expr_v1alpha1_SourcePosition* msg, int options,
1335 upb_Arena* arena, size_t* len) {
1336 char* ptr;
1337 (void)upb_Encode(msg, &google_api_expr_v1alpha1_SourcePosition_msginit, options, arena, &ptr, len);
1338 return ptr;
1339 }
1340 UPB_INLINE void google_api_expr_v1alpha1_SourcePosition_clear_location(const google_api_expr_v1alpha1_SourcePosition* msg) {
1341 *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
1342 }
1343 UPB_INLINE upb_StringView google_api_expr_v1alpha1_SourcePosition_location(const google_api_expr_v1alpha1_SourcePosition* msg) {
1344 return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_StringView);
1345 }
1346 UPB_INLINE void google_api_expr_v1alpha1_SourcePosition_clear_offset(const google_api_expr_v1alpha1_SourcePosition* msg) {
1347 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = 0;
1348 }
1349 UPB_INLINE int32_t google_api_expr_v1alpha1_SourcePosition_offset(const google_api_expr_v1alpha1_SourcePosition* msg) {
1350 return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t);
1351 }
1352 UPB_INLINE void google_api_expr_v1alpha1_SourcePosition_clear_line(const google_api_expr_v1alpha1_SourcePosition* msg) {
1353 *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = 0;
1354 }
1355 UPB_INLINE int32_t google_api_expr_v1alpha1_SourcePosition_line(const google_api_expr_v1alpha1_SourcePosition* msg) {
1356 return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t);
1357 }
1358 UPB_INLINE void google_api_expr_v1alpha1_SourcePosition_clear_column(const google_api_expr_v1alpha1_SourcePosition* msg) {
1359 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = 0;
1360 }
1361 UPB_INLINE int32_t google_api_expr_v1alpha1_SourcePosition_column(const google_api_expr_v1alpha1_SourcePosition* msg) {
1362 return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t);
1363 }
1364
1365 UPB_INLINE void google_api_expr_v1alpha1_SourcePosition_set_location(google_api_expr_v1alpha1_SourcePosition *msg, upb_StringView value) {
1366 *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_StringView) = value;
1367 }
1368 UPB_INLINE void google_api_expr_v1alpha1_SourcePosition_set_offset(google_api_expr_v1alpha1_SourcePosition *msg, int32_t value) {
1369 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
1370 }
1371 UPB_INLINE void google_api_expr_v1alpha1_SourcePosition_set_line(google_api_expr_v1alpha1_SourcePosition *msg, int32_t value) {
1372 *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
1373 }
1374 UPB_INLINE void google_api_expr_v1alpha1_SourcePosition_set_column(google_api_expr_v1alpha1_SourcePosition *msg, int32_t value) {
1375 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
1376 }
1377
1378 extern const upb_MiniTable_File google_api_expr_v1alpha1_syntax_proto_upb_file_layout;
1379
1380 #ifdef __cplusplus
1381 } /* extern "C" */
1382 #endif
1383
1384 #include "upb/port_undef.inc"
1385
1386 #endif /* GOOGLE_API_EXPR_V1ALPHA1_SYNTAX_PROTO_UPB_H_ */