xref: /aosp_15_r20/external/grpc-grpc/src/core/ext/upb-gen/google/protobuf/wrappers.upb.h (revision cc02d7e222339f7a4f6ba5f422e6413f4bd931f2)
1 /* This file was generated by upb_generator from the input file:
2  *
3  *     google/protobuf/wrappers.proto
4  *
5  * Do not edit -- your changes will be discarded when the file is
6  * regenerated. */
7 
8 #ifndef GOOGLE_PROTOBUF_WRAPPERS_PROTO_UPB_H_
9 #define GOOGLE_PROTOBUF_WRAPPERS_PROTO_UPB_H_
10 
11 #include "upb/generated_code_support.h"
12 
13 #include "google/protobuf/wrappers.upb_minitable.h"
14 
15 // Must be last.
16 #include "upb/port/def.inc"
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 typedef struct google_protobuf_DoubleValue { upb_Message UPB_PRIVATE(base); } google_protobuf_DoubleValue;
23 typedef struct google_protobuf_FloatValue { upb_Message UPB_PRIVATE(base); } google_protobuf_FloatValue;
24 typedef struct google_protobuf_Int64Value { upb_Message UPB_PRIVATE(base); } google_protobuf_Int64Value;
25 typedef struct google_protobuf_UInt64Value { upb_Message UPB_PRIVATE(base); } google_protobuf_UInt64Value;
26 typedef struct google_protobuf_Int32Value { upb_Message UPB_PRIVATE(base); } google_protobuf_Int32Value;
27 typedef struct google_protobuf_UInt32Value { upb_Message UPB_PRIVATE(base); } google_protobuf_UInt32Value;
28 typedef struct google_protobuf_BoolValue { upb_Message UPB_PRIVATE(base); } google_protobuf_BoolValue;
29 typedef struct google_protobuf_StringValue { upb_Message UPB_PRIVATE(base); } google_protobuf_StringValue;
30 typedef struct google_protobuf_BytesValue { upb_Message UPB_PRIVATE(base); } google_protobuf_BytesValue;
31 
32 
33 
34 /* google.protobuf.DoubleValue */
35 
google_protobuf_DoubleValue_new(upb_Arena * arena)36 UPB_INLINE google_protobuf_DoubleValue* google_protobuf_DoubleValue_new(upb_Arena* arena) {
37   return (google_protobuf_DoubleValue*)_upb_Message_New(&google__protobuf__DoubleValue_msg_init, arena);
38 }
google_protobuf_DoubleValue_parse(const char * buf,size_t size,upb_Arena * arena)39 UPB_INLINE google_protobuf_DoubleValue* google_protobuf_DoubleValue_parse(const char* buf, size_t size, upb_Arena* arena) {
40   google_protobuf_DoubleValue* ret = google_protobuf_DoubleValue_new(arena);
41   if (!ret) return NULL;
42   if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__DoubleValue_msg_init, NULL, 0, arena) !=
43       kUpb_DecodeStatus_Ok) {
44     return NULL;
45   }
46   return ret;
47 }
google_protobuf_DoubleValue_parse_ex(const char * buf,size_t size,const upb_ExtensionRegistry * extreg,int options,upb_Arena * arena)48 UPB_INLINE google_protobuf_DoubleValue* google_protobuf_DoubleValue_parse_ex(const char* buf, size_t size,
49                            const upb_ExtensionRegistry* extreg,
50                            int options, upb_Arena* arena) {
51   google_protobuf_DoubleValue* ret = google_protobuf_DoubleValue_new(arena);
52   if (!ret) return NULL;
53   if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__DoubleValue_msg_init, extreg, options,
54                  arena) != kUpb_DecodeStatus_Ok) {
55     return NULL;
56   }
57   return ret;
58 }
google_protobuf_DoubleValue_serialize(const google_protobuf_DoubleValue * msg,upb_Arena * arena,size_t * len)59 UPB_INLINE char* google_protobuf_DoubleValue_serialize(const google_protobuf_DoubleValue* msg, upb_Arena* arena, size_t* len) {
60   char* ptr;
61   (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__DoubleValue_msg_init, 0, arena, &ptr, len);
62   return ptr;
63 }
google_protobuf_DoubleValue_serialize_ex(const google_protobuf_DoubleValue * msg,int options,upb_Arena * arena,size_t * len)64 UPB_INLINE char* google_protobuf_DoubleValue_serialize_ex(const google_protobuf_DoubleValue* msg, int options,
65                                  upb_Arena* arena, size_t* len) {
66   char* ptr;
67   (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__DoubleValue_msg_init, options, arena, &ptr, len);
68   return ptr;
69 }
google_protobuf_DoubleValue_clear_value(google_protobuf_DoubleValue * msg)70 UPB_INLINE void google_protobuf_DoubleValue_clear_value(google_protobuf_DoubleValue* msg) {
71   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 1, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
72   upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
73 }
google_protobuf_DoubleValue_value(const google_protobuf_DoubleValue * msg)74 UPB_INLINE double google_protobuf_DoubleValue_value(const google_protobuf_DoubleValue* msg) {
75   double default_val = 0;
76   double ret;
77   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 1, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
78   _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field,
79                                     &default_val, &ret);
80   return ret;
81 }
82 
google_protobuf_DoubleValue_set_value(google_protobuf_DoubleValue * msg,double value)83 UPB_INLINE void google_protobuf_DoubleValue_set_value(google_protobuf_DoubleValue *msg, double value) {
84   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 1, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
85   _upb_Message_SetNonExtensionField((upb_Message *)msg, &field, &value);
86 }
87 
88 /* google.protobuf.FloatValue */
89 
google_protobuf_FloatValue_new(upb_Arena * arena)90 UPB_INLINE google_protobuf_FloatValue* google_protobuf_FloatValue_new(upb_Arena* arena) {
91   return (google_protobuf_FloatValue*)_upb_Message_New(&google__protobuf__FloatValue_msg_init, arena);
92 }
google_protobuf_FloatValue_parse(const char * buf,size_t size,upb_Arena * arena)93 UPB_INLINE google_protobuf_FloatValue* google_protobuf_FloatValue_parse(const char* buf, size_t size, upb_Arena* arena) {
94   google_protobuf_FloatValue* ret = google_protobuf_FloatValue_new(arena);
95   if (!ret) return NULL;
96   if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__FloatValue_msg_init, NULL, 0, arena) !=
97       kUpb_DecodeStatus_Ok) {
98     return NULL;
99   }
100   return ret;
101 }
google_protobuf_FloatValue_parse_ex(const char * buf,size_t size,const upb_ExtensionRegistry * extreg,int options,upb_Arena * arena)102 UPB_INLINE google_protobuf_FloatValue* google_protobuf_FloatValue_parse_ex(const char* buf, size_t size,
103                            const upb_ExtensionRegistry* extreg,
104                            int options, upb_Arena* arena) {
105   google_protobuf_FloatValue* ret = google_protobuf_FloatValue_new(arena);
106   if (!ret) return NULL;
107   if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__FloatValue_msg_init, extreg, options,
108                  arena) != kUpb_DecodeStatus_Ok) {
109     return NULL;
110   }
111   return ret;
112 }
google_protobuf_FloatValue_serialize(const google_protobuf_FloatValue * msg,upb_Arena * arena,size_t * len)113 UPB_INLINE char* google_protobuf_FloatValue_serialize(const google_protobuf_FloatValue* msg, upb_Arena* arena, size_t* len) {
114   char* ptr;
115   (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__FloatValue_msg_init, 0, arena, &ptr, len);
116   return ptr;
117 }
google_protobuf_FloatValue_serialize_ex(const google_protobuf_FloatValue * msg,int options,upb_Arena * arena,size_t * len)118 UPB_INLINE char* google_protobuf_FloatValue_serialize_ex(const google_protobuf_FloatValue* msg, int options,
119                                  upb_Arena* arena, size_t* len) {
120   char* ptr;
121   (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__FloatValue_msg_init, options, arena, &ptr, len);
122   return ptr;
123 }
google_protobuf_FloatValue_clear_value(google_protobuf_FloatValue * msg)124 UPB_INLINE void google_protobuf_FloatValue_clear_value(google_protobuf_FloatValue* msg) {
125   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 2, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)};
126   upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
127 }
google_protobuf_FloatValue_value(const google_protobuf_FloatValue * msg)128 UPB_INLINE float google_protobuf_FloatValue_value(const google_protobuf_FloatValue* msg) {
129   float default_val = 0;
130   float ret;
131   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 2, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)};
132   _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field,
133                                     &default_val, &ret);
134   return ret;
135 }
136 
google_protobuf_FloatValue_set_value(google_protobuf_FloatValue * msg,float value)137 UPB_INLINE void google_protobuf_FloatValue_set_value(google_protobuf_FloatValue *msg, float value) {
138   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 2, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)};
139   _upb_Message_SetNonExtensionField((upb_Message *)msg, &field, &value);
140 }
141 
142 /* google.protobuf.Int64Value */
143 
google_protobuf_Int64Value_new(upb_Arena * arena)144 UPB_INLINE google_protobuf_Int64Value* google_protobuf_Int64Value_new(upb_Arena* arena) {
145   return (google_protobuf_Int64Value*)_upb_Message_New(&google__protobuf__Int64Value_msg_init, arena);
146 }
google_protobuf_Int64Value_parse(const char * buf,size_t size,upb_Arena * arena)147 UPB_INLINE google_protobuf_Int64Value* google_protobuf_Int64Value_parse(const char* buf, size_t size, upb_Arena* arena) {
148   google_protobuf_Int64Value* ret = google_protobuf_Int64Value_new(arena);
149   if (!ret) return NULL;
150   if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__Int64Value_msg_init, NULL, 0, arena) !=
151       kUpb_DecodeStatus_Ok) {
152     return NULL;
153   }
154   return ret;
155 }
google_protobuf_Int64Value_parse_ex(const char * buf,size_t size,const upb_ExtensionRegistry * extreg,int options,upb_Arena * arena)156 UPB_INLINE google_protobuf_Int64Value* google_protobuf_Int64Value_parse_ex(const char* buf, size_t size,
157                            const upb_ExtensionRegistry* extreg,
158                            int options, upb_Arena* arena) {
159   google_protobuf_Int64Value* ret = google_protobuf_Int64Value_new(arena);
160   if (!ret) return NULL;
161   if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__Int64Value_msg_init, extreg, options,
162                  arena) != kUpb_DecodeStatus_Ok) {
163     return NULL;
164   }
165   return ret;
166 }
google_protobuf_Int64Value_serialize(const google_protobuf_Int64Value * msg,upb_Arena * arena,size_t * len)167 UPB_INLINE char* google_protobuf_Int64Value_serialize(const google_protobuf_Int64Value* msg, upb_Arena* arena, size_t* len) {
168   char* ptr;
169   (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__Int64Value_msg_init, 0, arena, &ptr, len);
170   return ptr;
171 }
google_protobuf_Int64Value_serialize_ex(const google_protobuf_Int64Value * msg,int options,upb_Arena * arena,size_t * len)172 UPB_INLINE char* google_protobuf_Int64Value_serialize_ex(const google_protobuf_Int64Value* msg, int options,
173                                  upb_Arena* arena, size_t* len) {
174   char* ptr;
175   (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__Int64Value_msg_init, options, arena, &ptr, len);
176   return ptr;
177 }
google_protobuf_Int64Value_clear_value(google_protobuf_Int64Value * msg)178 UPB_INLINE void google_protobuf_Int64Value_clear_value(google_protobuf_Int64Value* msg) {
179   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 3, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
180   upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
181 }
google_protobuf_Int64Value_value(const google_protobuf_Int64Value * msg)182 UPB_INLINE int64_t google_protobuf_Int64Value_value(const google_protobuf_Int64Value* msg) {
183   int64_t default_val = (int64_t)0ll;
184   int64_t ret;
185   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 3, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
186   _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field,
187                                     &default_val, &ret);
188   return ret;
189 }
190 
google_protobuf_Int64Value_set_value(google_protobuf_Int64Value * msg,int64_t value)191 UPB_INLINE void google_protobuf_Int64Value_set_value(google_protobuf_Int64Value *msg, int64_t value) {
192   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 3, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
193   _upb_Message_SetNonExtensionField((upb_Message *)msg, &field, &value);
194 }
195 
196 /* google.protobuf.UInt64Value */
197 
google_protobuf_UInt64Value_new(upb_Arena * arena)198 UPB_INLINE google_protobuf_UInt64Value* google_protobuf_UInt64Value_new(upb_Arena* arena) {
199   return (google_protobuf_UInt64Value*)_upb_Message_New(&google__protobuf__UInt64Value_msg_init, arena);
200 }
google_protobuf_UInt64Value_parse(const char * buf,size_t size,upb_Arena * arena)201 UPB_INLINE google_protobuf_UInt64Value* google_protobuf_UInt64Value_parse(const char* buf, size_t size, upb_Arena* arena) {
202   google_protobuf_UInt64Value* ret = google_protobuf_UInt64Value_new(arena);
203   if (!ret) return NULL;
204   if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__UInt64Value_msg_init, NULL, 0, arena) !=
205       kUpb_DecodeStatus_Ok) {
206     return NULL;
207   }
208   return ret;
209 }
google_protobuf_UInt64Value_parse_ex(const char * buf,size_t size,const upb_ExtensionRegistry * extreg,int options,upb_Arena * arena)210 UPB_INLINE google_protobuf_UInt64Value* google_protobuf_UInt64Value_parse_ex(const char* buf, size_t size,
211                            const upb_ExtensionRegistry* extreg,
212                            int options, upb_Arena* arena) {
213   google_protobuf_UInt64Value* ret = google_protobuf_UInt64Value_new(arena);
214   if (!ret) return NULL;
215   if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__UInt64Value_msg_init, extreg, options,
216                  arena) != kUpb_DecodeStatus_Ok) {
217     return NULL;
218   }
219   return ret;
220 }
google_protobuf_UInt64Value_serialize(const google_protobuf_UInt64Value * msg,upb_Arena * arena,size_t * len)221 UPB_INLINE char* google_protobuf_UInt64Value_serialize(const google_protobuf_UInt64Value* msg, upb_Arena* arena, size_t* len) {
222   char* ptr;
223   (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__UInt64Value_msg_init, 0, arena, &ptr, len);
224   return ptr;
225 }
google_protobuf_UInt64Value_serialize_ex(const google_protobuf_UInt64Value * msg,int options,upb_Arena * arena,size_t * len)226 UPB_INLINE char* google_protobuf_UInt64Value_serialize_ex(const google_protobuf_UInt64Value* msg, int options,
227                                  upb_Arena* arena, size_t* len) {
228   char* ptr;
229   (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__UInt64Value_msg_init, options, arena, &ptr, len);
230   return ptr;
231 }
google_protobuf_UInt64Value_clear_value(google_protobuf_UInt64Value * msg)232 UPB_INLINE void google_protobuf_UInt64Value_clear_value(google_protobuf_UInt64Value* msg) {
233   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 4, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
234   upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
235 }
google_protobuf_UInt64Value_value(const google_protobuf_UInt64Value * msg)236 UPB_INLINE uint64_t google_protobuf_UInt64Value_value(const google_protobuf_UInt64Value* msg) {
237   uint64_t default_val = (uint64_t)0ull;
238   uint64_t ret;
239   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 4, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
240   _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field,
241                                     &default_val, &ret);
242   return ret;
243 }
244 
google_protobuf_UInt64Value_set_value(google_protobuf_UInt64Value * msg,uint64_t value)245 UPB_INLINE void google_protobuf_UInt64Value_set_value(google_protobuf_UInt64Value *msg, uint64_t value) {
246   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 4, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_8Byte << kUpb_FieldRep_Shift)};
247   _upb_Message_SetNonExtensionField((upb_Message *)msg, &field, &value);
248 }
249 
250 /* google.protobuf.Int32Value */
251 
google_protobuf_Int32Value_new(upb_Arena * arena)252 UPB_INLINE google_protobuf_Int32Value* google_protobuf_Int32Value_new(upb_Arena* arena) {
253   return (google_protobuf_Int32Value*)_upb_Message_New(&google__protobuf__Int32Value_msg_init, arena);
254 }
google_protobuf_Int32Value_parse(const char * buf,size_t size,upb_Arena * arena)255 UPB_INLINE google_protobuf_Int32Value* google_protobuf_Int32Value_parse(const char* buf, size_t size, upb_Arena* arena) {
256   google_protobuf_Int32Value* ret = google_protobuf_Int32Value_new(arena);
257   if (!ret) return NULL;
258   if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__Int32Value_msg_init, NULL, 0, arena) !=
259       kUpb_DecodeStatus_Ok) {
260     return NULL;
261   }
262   return ret;
263 }
google_protobuf_Int32Value_parse_ex(const char * buf,size_t size,const upb_ExtensionRegistry * extreg,int options,upb_Arena * arena)264 UPB_INLINE google_protobuf_Int32Value* google_protobuf_Int32Value_parse_ex(const char* buf, size_t size,
265                            const upb_ExtensionRegistry* extreg,
266                            int options, upb_Arena* arena) {
267   google_protobuf_Int32Value* ret = google_protobuf_Int32Value_new(arena);
268   if (!ret) return NULL;
269   if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__Int32Value_msg_init, extreg, options,
270                  arena) != kUpb_DecodeStatus_Ok) {
271     return NULL;
272   }
273   return ret;
274 }
google_protobuf_Int32Value_serialize(const google_protobuf_Int32Value * msg,upb_Arena * arena,size_t * len)275 UPB_INLINE char* google_protobuf_Int32Value_serialize(const google_protobuf_Int32Value* msg, upb_Arena* arena, size_t* len) {
276   char* ptr;
277   (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__Int32Value_msg_init, 0, arena, &ptr, len);
278   return ptr;
279 }
google_protobuf_Int32Value_serialize_ex(const google_protobuf_Int32Value * msg,int options,upb_Arena * arena,size_t * len)280 UPB_INLINE char* google_protobuf_Int32Value_serialize_ex(const google_protobuf_Int32Value* msg, int options,
281                                  upb_Arena* arena, size_t* len) {
282   char* ptr;
283   (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__Int32Value_msg_init, options, arena, &ptr, len);
284   return ptr;
285 }
google_protobuf_Int32Value_clear_value(google_protobuf_Int32Value * msg)286 UPB_INLINE void google_protobuf_Int32Value_clear_value(google_protobuf_Int32Value* msg) {
287   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)};
288   upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
289 }
google_protobuf_Int32Value_value(const google_protobuf_Int32Value * msg)290 UPB_INLINE int32_t google_protobuf_Int32Value_value(const google_protobuf_Int32Value* msg) {
291   int32_t default_val = (int32_t)0;
292   int32_t ret;
293   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)};
294   _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field,
295                                     &default_val, &ret);
296   return ret;
297 }
298 
google_protobuf_Int32Value_set_value(google_protobuf_Int32Value * msg,int32_t value)299 UPB_INLINE void google_protobuf_Int32Value_set_value(google_protobuf_Int32Value *msg, int32_t value) {
300   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)};
301   _upb_Message_SetNonExtensionField((upb_Message *)msg, &field, &value);
302 }
303 
304 /* google.protobuf.UInt32Value */
305 
google_protobuf_UInt32Value_new(upb_Arena * arena)306 UPB_INLINE google_protobuf_UInt32Value* google_protobuf_UInt32Value_new(upb_Arena* arena) {
307   return (google_protobuf_UInt32Value*)_upb_Message_New(&google__protobuf__UInt32Value_msg_init, arena);
308 }
google_protobuf_UInt32Value_parse(const char * buf,size_t size,upb_Arena * arena)309 UPB_INLINE google_protobuf_UInt32Value* google_protobuf_UInt32Value_parse(const char* buf, size_t size, upb_Arena* arena) {
310   google_protobuf_UInt32Value* ret = google_protobuf_UInt32Value_new(arena);
311   if (!ret) return NULL;
312   if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__UInt32Value_msg_init, NULL, 0, arena) !=
313       kUpb_DecodeStatus_Ok) {
314     return NULL;
315   }
316   return ret;
317 }
google_protobuf_UInt32Value_parse_ex(const char * buf,size_t size,const upb_ExtensionRegistry * extreg,int options,upb_Arena * arena)318 UPB_INLINE google_protobuf_UInt32Value* google_protobuf_UInt32Value_parse_ex(const char* buf, size_t size,
319                            const upb_ExtensionRegistry* extreg,
320                            int options, upb_Arena* arena) {
321   google_protobuf_UInt32Value* ret = google_protobuf_UInt32Value_new(arena);
322   if (!ret) return NULL;
323   if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__UInt32Value_msg_init, extreg, options,
324                  arena) != kUpb_DecodeStatus_Ok) {
325     return NULL;
326   }
327   return ret;
328 }
google_protobuf_UInt32Value_serialize(const google_protobuf_UInt32Value * msg,upb_Arena * arena,size_t * len)329 UPB_INLINE char* google_protobuf_UInt32Value_serialize(const google_protobuf_UInt32Value* msg, upb_Arena* arena, size_t* len) {
330   char* ptr;
331   (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__UInt32Value_msg_init, 0, arena, &ptr, len);
332   return ptr;
333 }
google_protobuf_UInt32Value_serialize_ex(const google_protobuf_UInt32Value * msg,int options,upb_Arena * arena,size_t * len)334 UPB_INLINE char* google_protobuf_UInt32Value_serialize_ex(const google_protobuf_UInt32Value* msg, int options,
335                                  upb_Arena* arena, size_t* len) {
336   char* ptr;
337   (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__UInt32Value_msg_init, options, arena, &ptr, len);
338   return ptr;
339 }
google_protobuf_UInt32Value_clear_value(google_protobuf_UInt32Value * msg)340 UPB_INLINE void google_protobuf_UInt32Value_clear_value(google_protobuf_UInt32Value* msg) {
341   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 13, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)};
342   upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
343 }
google_protobuf_UInt32Value_value(const google_protobuf_UInt32Value * msg)344 UPB_INLINE uint32_t google_protobuf_UInt32Value_value(const google_protobuf_UInt32Value* msg) {
345   uint32_t default_val = (uint32_t)0u;
346   uint32_t ret;
347   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 13, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)};
348   _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field,
349                                     &default_val, &ret);
350   return ret;
351 }
352 
google_protobuf_UInt32Value_set_value(google_protobuf_UInt32Value * msg,uint32_t value)353 UPB_INLINE void google_protobuf_UInt32Value_set_value(google_protobuf_UInt32Value *msg, uint32_t value) {
354   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 13, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)};
355   _upb_Message_SetNonExtensionField((upb_Message *)msg, &field, &value);
356 }
357 
358 /* google.protobuf.BoolValue */
359 
google_protobuf_BoolValue_new(upb_Arena * arena)360 UPB_INLINE google_protobuf_BoolValue* google_protobuf_BoolValue_new(upb_Arena* arena) {
361   return (google_protobuf_BoolValue*)_upb_Message_New(&google__protobuf__BoolValue_msg_init, arena);
362 }
google_protobuf_BoolValue_parse(const char * buf,size_t size,upb_Arena * arena)363 UPB_INLINE google_protobuf_BoolValue* google_protobuf_BoolValue_parse(const char* buf, size_t size, upb_Arena* arena) {
364   google_protobuf_BoolValue* ret = google_protobuf_BoolValue_new(arena);
365   if (!ret) return NULL;
366   if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__BoolValue_msg_init, NULL, 0, arena) !=
367       kUpb_DecodeStatus_Ok) {
368     return NULL;
369   }
370   return ret;
371 }
google_protobuf_BoolValue_parse_ex(const char * buf,size_t size,const upb_ExtensionRegistry * extreg,int options,upb_Arena * arena)372 UPB_INLINE google_protobuf_BoolValue* google_protobuf_BoolValue_parse_ex(const char* buf, size_t size,
373                            const upb_ExtensionRegistry* extreg,
374                            int options, upb_Arena* arena) {
375   google_protobuf_BoolValue* ret = google_protobuf_BoolValue_new(arena);
376   if (!ret) return NULL;
377   if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__BoolValue_msg_init, extreg, options,
378                  arena) != kUpb_DecodeStatus_Ok) {
379     return NULL;
380   }
381   return ret;
382 }
google_protobuf_BoolValue_serialize(const google_protobuf_BoolValue * msg,upb_Arena * arena,size_t * len)383 UPB_INLINE char* google_protobuf_BoolValue_serialize(const google_protobuf_BoolValue* msg, upb_Arena* arena, size_t* len) {
384   char* ptr;
385   (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__BoolValue_msg_init, 0, arena, &ptr, len);
386   return ptr;
387 }
google_protobuf_BoolValue_serialize_ex(const google_protobuf_BoolValue * msg,int options,upb_Arena * arena,size_t * len)388 UPB_INLINE char* google_protobuf_BoolValue_serialize_ex(const google_protobuf_BoolValue* msg, int options,
389                                  upb_Arena* arena, size_t* len) {
390   char* ptr;
391   (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__BoolValue_msg_init, options, arena, &ptr, len);
392   return ptr;
393 }
google_protobuf_BoolValue_clear_value(google_protobuf_BoolValue * msg)394 UPB_INLINE void google_protobuf_BoolValue_clear_value(google_protobuf_BoolValue* msg) {
395   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)};
396   upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
397 }
google_protobuf_BoolValue_value(const google_protobuf_BoolValue * msg)398 UPB_INLINE bool google_protobuf_BoolValue_value(const google_protobuf_BoolValue* msg) {
399   bool default_val = false;
400   bool ret;
401   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)};
402   _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field,
403                                     &default_val, &ret);
404   return ret;
405 }
406 
google_protobuf_BoolValue_set_value(google_protobuf_BoolValue * msg,bool value)407 UPB_INLINE void google_protobuf_BoolValue_set_value(google_protobuf_BoolValue *msg, bool value) {
408   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 8, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)};
409   _upb_Message_SetNonExtensionField((upb_Message *)msg, &field, &value);
410 }
411 
412 /* google.protobuf.StringValue */
413 
google_protobuf_StringValue_new(upb_Arena * arena)414 UPB_INLINE google_protobuf_StringValue* google_protobuf_StringValue_new(upb_Arena* arena) {
415   return (google_protobuf_StringValue*)_upb_Message_New(&google__protobuf__StringValue_msg_init, arena);
416 }
google_protobuf_StringValue_parse(const char * buf,size_t size,upb_Arena * arena)417 UPB_INLINE google_protobuf_StringValue* google_protobuf_StringValue_parse(const char* buf, size_t size, upb_Arena* arena) {
418   google_protobuf_StringValue* ret = google_protobuf_StringValue_new(arena);
419   if (!ret) return NULL;
420   if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__StringValue_msg_init, NULL, 0, arena) !=
421       kUpb_DecodeStatus_Ok) {
422     return NULL;
423   }
424   return ret;
425 }
google_protobuf_StringValue_parse_ex(const char * buf,size_t size,const upb_ExtensionRegistry * extreg,int options,upb_Arena * arena)426 UPB_INLINE google_protobuf_StringValue* google_protobuf_StringValue_parse_ex(const char* buf, size_t size,
427                            const upb_ExtensionRegistry* extreg,
428                            int options, upb_Arena* arena) {
429   google_protobuf_StringValue* ret = google_protobuf_StringValue_new(arena);
430   if (!ret) return NULL;
431   if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__StringValue_msg_init, extreg, options,
432                  arena) != kUpb_DecodeStatus_Ok) {
433     return NULL;
434   }
435   return ret;
436 }
google_protobuf_StringValue_serialize(const google_protobuf_StringValue * msg,upb_Arena * arena,size_t * len)437 UPB_INLINE char* google_protobuf_StringValue_serialize(const google_protobuf_StringValue* msg, upb_Arena* arena, size_t* len) {
438   char* ptr;
439   (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__StringValue_msg_init, 0, arena, &ptr, len);
440   return ptr;
441 }
google_protobuf_StringValue_serialize_ex(const google_protobuf_StringValue * msg,int options,upb_Arena * arena,size_t * len)442 UPB_INLINE char* google_protobuf_StringValue_serialize_ex(const google_protobuf_StringValue* msg, int options,
443                                  upb_Arena* arena, size_t* len) {
444   char* ptr;
445   (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__StringValue_msg_init, options, arena, &ptr, len);
446   return ptr;
447 }
google_protobuf_StringValue_clear_value(google_protobuf_StringValue * msg)448 UPB_INLINE void google_protobuf_StringValue_clear_value(google_protobuf_StringValue* msg) {
449   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
450   upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
451 }
google_protobuf_StringValue_value(const google_protobuf_StringValue * msg)452 UPB_INLINE upb_StringView google_protobuf_StringValue_value(const google_protobuf_StringValue* msg) {
453   upb_StringView default_val = upb_StringView_FromString("");
454   upb_StringView ret;
455   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
456   _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field,
457                                     &default_val, &ret);
458   return ret;
459 }
460 
google_protobuf_StringValue_set_value(google_protobuf_StringValue * msg,upb_StringView value)461 UPB_INLINE void google_protobuf_StringValue_set_value(google_protobuf_StringValue *msg, upb_StringView value) {
462   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 9, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
463   _upb_Message_SetNonExtensionField((upb_Message *)msg, &field, &value);
464 }
465 
466 /* google.protobuf.BytesValue */
467 
google_protobuf_BytesValue_new(upb_Arena * arena)468 UPB_INLINE google_protobuf_BytesValue* google_protobuf_BytesValue_new(upb_Arena* arena) {
469   return (google_protobuf_BytesValue*)_upb_Message_New(&google__protobuf__BytesValue_msg_init, arena);
470 }
google_protobuf_BytesValue_parse(const char * buf,size_t size,upb_Arena * arena)471 UPB_INLINE google_protobuf_BytesValue* google_protobuf_BytesValue_parse(const char* buf, size_t size, upb_Arena* arena) {
472   google_protobuf_BytesValue* ret = google_protobuf_BytesValue_new(arena);
473   if (!ret) return NULL;
474   if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__BytesValue_msg_init, NULL, 0, arena) !=
475       kUpb_DecodeStatus_Ok) {
476     return NULL;
477   }
478   return ret;
479 }
google_protobuf_BytesValue_parse_ex(const char * buf,size_t size,const upb_ExtensionRegistry * extreg,int options,upb_Arena * arena)480 UPB_INLINE google_protobuf_BytesValue* google_protobuf_BytesValue_parse_ex(const char* buf, size_t size,
481                            const upb_ExtensionRegistry* extreg,
482                            int options, upb_Arena* arena) {
483   google_protobuf_BytesValue* ret = google_protobuf_BytesValue_new(arena);
484   if (!ret) return NULL;
485   if (upb_Decode(buf, size, UPB_UPCAST(ret), &google__protobuf__BytesValue_msg_init, extreg, options,
486                  arena) != kUpb_DecodeStatus_Ok) {
487     return NULL;
488   }
489   return ret;
490 }
google_protobuf_BytesValue_serialize(const google_protobuf_BytesValue * msg,upb_Arena * arena,size_t * len)491 UPB_INLINE char* google_protobuf_BytesValue_serialize(const google_protobuf_BytesValue* msg, upb_Arena* arena, size_t* len) {
492   char* ptr;
493   (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__BytesValue_msg_init, 0, arena, &ptr, len);
494   return ptr;
495 }
google_protobuf_BytesValue_serialize_ex(const google_protobuf_BytesValue * msg,int options,upb_Arena * arena,size_t * len)496 UPB_INLINE char* google_protobuf_BytesValue_serialize_ex(const google_protobuf_BytesValue* msg, int options,
497                                  upb_Arena* arena, size_t* len) {
498   char* ptr;
499   (void)upb_Encode(UPB_UPCAST(msg), &google__protobuf__BytesValue_msg_init, options, arena, &ptr, len);
500   return ptr;
501 }
google_protobuf_BytesValue_clear_value(google_protobuf_BytesValue * msg)502 UPB_INLINE void google_protobuf_BytesValue_clear_value(google_protobuf_BytesValue* msg) {
503   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
504   upb_Message_ClearBaseField(UPB_UPCAST(msg), &field);
505 }
google_protobuf_BytesValue_value(const google_protobuf_BytesValue * msg)506 UPB_INLINE upb_StringView google_protobuf_BytesValue_value(const google_protobuf_BytesValue* msg) {
507   upb_StringView default_val = upb_StringView_FromString("");
508   upb_StringView ret;
509   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
510   _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field,
511                                     &default_val, &ret);
512   return ret;
513 }
514 
google_protobuf_BytesValue_set_value(google_protobuf_BytesValue * msg,upb_StringView value)515 UPB_INLINE void google_protobuf_BytesValue_set_value(google_protobuf_BytesValue *msg, upb_StringView value) {
516   const upb_MiniTableField field = {1, 8, 0, kUpb_NoSub, 12, (int)kUpb_FieldMode_Scalar | ((int)kUpb_FieldRep_StringView << kUpb_FieldRep_Shift)};
517   _upb_Message_SetNonExtensionField((upb_Message *)msg, &field, &value);
518 }
519 
520 #ifdef __cplusplus
521 }  /* extern "C" */
522 #endif
523 
524 #include "upb/port/undef.inc"
525 
526 #endif  /* GOOGLE_PROTOBUF_WRAPPERS_PROTO_UPB_H_ */
527