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