• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* This file was generated by upbc (the upb compiler) from the input
2  * file:
3  *
4  *     google/protobuf/wrappers.proto
5  *
6  * Do not edit -- your changes will be discarded when the file is
7  * regenerated. */
8 
9 #ifndef GOOGLE_PROTOBUF_WRAPPERS_PROTO_UPB_H_
10 #define GOOGLE_PROTOBUF_WRAPPERS_PROTO_UPB_H_
11 
12 #include "upb/msg.h"
13 #include "upb/decode.h"
14 #include "upb/decode_fast.h"
15 #include "upb/encode.h"
16 
17 #include "upb/port_def.inc"
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 struct google_protobuf_DoubleValue;
24 struct google_protobuf_FloatValue;
25 struct google_protobuf_Int64Value;
26 struct google_protobuf_UInt64Value;
27 struct google_protobuf_Int32Value;
28 struct google_protobuf_UInt32Value;
29 struct google_protobuf_BoolValue;
30 struct google_protobuf_StringValue;
31 struct google_protobuf_BytesValue;
32 typedef struct google_protobuf_DoubleValue google_protobuf_DoubleValue;
33 typedef struct google_protobuf_FloatValue google_protobuf_FloatValue;
34 typedef struct google_protobuf_Int64Value google_protobuf_Int64Value;
35 typedef struct google_protobuf_UInt64Value google_protobuf_UInt64Value;
36 typedef struct google_protobuf_Int32Value google_protobuf_Int32Value;
37 typedef struct google_protobuf_UInt32Value google_protobuf_UInt32Value;
38 typedef struct google_protobuf_BoolValue google_protobuf_BoolValue;
39 typedef struct google_protobuf_StringValue google_protobuf_StringValue;
40 typedef struct google_protobuf_BytesValue google_protobuf_BytesValue;
41 extern const upb_msglayout google_protobuf_DoubleValue_msginit;
42 extern const upb_msglayout google_protobuf_FloatValue_msginit;
43 extern const upb_msglayout google_protobuf_Int64Value_msginit;
44 extern const upb_msglayout google_protobuf_UInt64Value_msginit;
45 extern const upb_msglayout google_protobuf_Int32Value_msginit;
46 extern const upb_msglayout google_protobuf_UInt32Value_msginit;
47 extern const upb_msglayout google_protobuf_BoolValue_msginit;
48 extern const upb_msglayout google_protobuf_StringValue_msginit;
49 extern const upb_msglayout google_protobuf_BytesValue_msginit;
50 
51 
52 /* google.protobuf.DoubleValue */
53 
google_protobuf_DoubleValue_new(upb_arena * arena)54 UPB_INLINE google_protobuf_DoubleValue *google_protobuf_DoubleValue_new(upb_arena *arena) {
55   return (google_protobuf_DoubleValue *)_upb_msg_new(&google_protobuf_DoubleValue_msginit, arena);
56 }
google_protobuf_DoubleValue_parse(const char * buf,size_t size,upb_arena * arena)57 UPB_INLINE google_protobuf_DoubleValue *google_protobuf_DoubleValue_parse(const char *buf, size_t size,
58                         upb_arena *arena) {
59   google_protobuf_DoubleValue *ret = google_protobuf_DoubleValue_new(arena);
60   return (ret && upb_decode(buf, size, ret, &google_protobuf_DoubleValue_msginit, arena)) ? ret : NULL;
61 }
google_protobuf_DoubleValue_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)62 UPB_INLINE google_protobuf_DoubleValue *google_protobuf_DoubleValue_parse_ex(const char *buf, size_t size,
63                            upb_arena *arena, int options) {
64   google_protobuf_DoubleValue *ret = google_protobuf_DoubleValue_new(arena);
65   return (ret && _upb_decode(buf, size, ret, &google_protobuf_DoubleValue_msginit, arena, options))
66       ? ret : NULL;
67 }
google_protobuf_DoubleValue_serialize(const google_protobuf_DoubleValue * msg,upb_arena * arena,size_t * len)68 UPB_INLINE char *google_protobuf_DoubleValue_serialize(const google_protobuf_DoubleValue *msg, upb_arena *arena, size_t *len) {
69   return upb_encode(msg, &google_protobuf_DoubleValue_msginit, arena, len);
70 }
71 
google_protobuf_DoubleValue_value(const google_protobuf_DoubleValue * msg)72 UPB_INLINE double google_protobuf_DoubleValue_value(const google_protobuf_DoubleValue *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), double); }
73 
google_protobuf_DoubleValue_set_value(google_protobuf_DoubleValue * msg,double value)74 UPB_INLINE void google_protobuf_DoubleValue_set_value(google_protobuf_DoubleValue *msg, double value) {
75   *UPB_PTR_AT(msg, UPB_SIZE(0, 0), double) = value;
76 }
77 
78 /* google.protobuf.FloatValue */
79 
google_protobuf_FloatValue_new(upb_arena * arena)80 UPB_INLINE google_protobuf_FloatValue *google_protobuf_FloatValue_new(upb_arena *arena) {
81   return (google_protobuf_FloatValue *)_upb_msg_new(&google_protobuf_FloatValue_msginit, arena);
82 }
google_protobuf_FloatValue_parse(const char * buf,size_t size,upb_arena * arena)83 UPB_INLINE google_protobuf_FloatValue *google_protobuf_FloatValue_parse(const char *buf, size_t size,
84                         upb_arena *arena) {
85   google_protobuf_FloatValue *ret = google_protobuf_FloatValue_new(arena);
86   return (ret && upb_decode(buf, size, ret, &google_protobuf_FloatValue_msginit, arena)) ? ret : NULL;
87 }
google_protobuf_FloatValue_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)88 UPB_INLINE google_protobuf_FloatValue *google_protobuf_FloatValue_parse_ex(const char *buf, size_t size,
89                            upb_arena *arena, int options) {
90   google_protobuf_FloatValue *ret = google_protobuf_FloatValue_new(arena);
91   return (ret && _upb_decode(buf, size, ret, &google_protobuf_FloatValue_msginit, arena, options))
92       ? ret : NULL;
93 }
google_protobuf_FloatValue_serialize(const google_protobuf_FloatValue * msg,upb_arena * arena,size_t * len)94 UPB_INLINE char *google_protobuf_FloatValue_serialize(const google_protobuf_FloatValue *msg, upb_arena *arena, size_t *len) {
95   return upb_encode(msg, &google_protobuf_FloatValue_msginit, arena, len);
96 }
97 
google_protobuf_FloatValue_value(const google_protobuf_FloatValue * msg)98 UPB_INLINE float google_protobuf_FloatValue_value(const google_protobuf_FloatValue *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), float); }
99 
google_protobuf_FloatValue_set_value(google_protobuf_FloatValue * msg,float value)100 UPB_INLINE void google_protobuf_FloatValue_set_value(google_protobuf_FloatValue *msg, float value) {
101   *UPB_PTR_AT(msg, UPB_SIZE(0, 0), float) = value;
102 }
103 
104 /* google.protobuf.Int64Value */
105 
google_protobuf_Int64Value_new(upb_arena * arena)106 UPB_INLINE google_protobuf_Int64Value *google_protobuf_Int64Value_new(upb_arena *arena) {
107   return (google_protobuf_Int64Value *)_upb_msg_new(&google_protobuf_Int64Value_msginit, arena);
108 }
google_protobuf_Int64Value_parse(const char * buf,size_t size,upb_arena * arena)109 UPB_INLINE google_protobuf_Int64Value *google_protobuf_Int64Value_parse(const char *buf, size_t size,
110                         upb_arena *arena) {
111   google_protobuf_Int64Value *ret = google_protobuf_Int64Value_new(arena);
112   return (ret && upb_decode(buf, size, ret, &google_protobuf_Int64Value_msginit, arena)) ? ret : NULL;
113 }
google_protobuf_Int64Value_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)114 UPB_INLINE google_protobuf_Int64Value *google_protobuf_Int64Value_parse_ex(const char *buf, size_t size,
115                            upb_arena *arena, int options) {
116   google_protobuf_Int64Value *ret = google_protobuf_Int64Value_new(arena);
117   return (ret && _upb_decode(buf, size, ret, &google_protobuf_Int64Value_msginit, arena, options))
118       ? ret : NULL;
119 }
google_protobuf_Int64Value_serialize(const google_protobuf_Int64Value * msg,upb_arena * arena,size_t * len)120 UPB_INLINE char *google_protobuf_Int64Value_serialize(const google_protobuf_Int64Value *msg, upb_arena *arena, size_t *len) {
121   return upb_encode(msg, &google_protobuf_Int64Value_msginit, arena, len);
122 }
123 
google_protobuf_Int64Value_value(const google_protobuf_Int64Value * msg)124 UPB_INLINE int64_t google_protobuf_Int64Value_value(const google_protobuf_Int64Value *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t); }
125 
google_protobuf_Int64Value_set_value(google_protobuf_Int64Value * msg,int64_t value)126 UPB_INLINE void google_protobuf_Int64Value_set_value(google_protobuf_Int64Value *msg, int64_t value) {
127   *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t) = value;
128 }
129 
130 /* google.protobuf.UInt64Value */
131 
google_protobuf_UInt64Value_new(upb_arena * arena)132 UPB_INLINE google_protobuf_UInt64Value *google_protobuf_UInt64Value_new(upb_arena *arena) {
133   return (google_protobuf_UInt64Value *)_upb_msg_new(&google_protobuf_UInt64Value_msginit, arena);
134 }
google_protobuf_UInt64Value_parse(const char * buf,size_t size,upb_arena * arena)135 UPB_INLINE google_protobuf_UInt64Value *google_protobuf_UInt64Value_parse(const char *buf, size_t size,
136                         upb_arena *arena) {
137   google_protobuf_UInt64Value *ret = google_protobuf_UInt64Value_new(arena);
138   return (ret && upb_decode(buf, size, ret, &google_protobuf_UInt64Value_msginit, arena)) ? ret : NULL;
139 }
google_protobuf_UInt64Value_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)140 UPB_INLINE google_protobuf_UInt64Value *google_protobuf_UInt64Value_parse_ex(const char *buf, size_t size,
141                            upb_arena *arena, int options) {
142   google_protobuf_UInt64Value *ret = google_protobuf_UInt64Value_new(arena);
143   return (ret && _upb_decode(buf, size, ret, &google_protobuf_UInt64Value_msginit, arena, options))
144       ? ret : NULL;
145 }
google_protobuf_UInt64Value_serialize(const google_protobuf_UInt64Value * msg,upb_arena * arena,size_t * len)146 UPB_INLINE char *google_protobuf_UInt64Value_serialize(const google_protobuf_UInt64Value *msg, upb_arena *arena, size_t *len) {
147   return upb_encode(msg, &google_protobuf_UInt64Value_msginit, arena, len);
148 }
149 
google_protobuf_UInt64Value_value(const google_protobuf_UInt64Value * msg)150 UPB_INLINE uint64_t google_protobuf_UInt64Value_value(const google_protobuf_UInt64Value *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t); }
151 
google_protobuf_UInt64Value_set_value(google_protobuf_UInt64Value * msg,uint64_t value)152 UPB_INLINE void google_protobuf_UInt64Value_set_value(google_protobuf_UInt64Value *msg, uint64_t value) {
153   *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t) = value;
154 }
155 
156 /* google.protobuf.Int32Value */
157 
google_protobuf_Int32Value_new(upb_arena * arena)158 UPB_INLINE google_protobuf_Int32Value *google_protobuf_Int32Value_new(upb_arena *arena) {
159   return (google_protobuf_Int32Value *)_upb_msg_new(&google_protobuf_Int32Value_msginit, arena);
160 }
google_protobuf_Int32Value_parse(const char * buf,size_t size,upb_arena * arena)161 UPB_INLINE google_protobuf_Int32Value *google_protobuf_Int32Value_parse(const char *buf, size_t size,
162                         upb_arena *arena) {
163   google_protobuf_Int32Value *ret = google_protobuf_Int32Value_new(arena);
164   return (ret && upb_decode(buf, size, ret, &google_protobuf_Int32Value_msginit, arena)) ? ret : NULL;
165 }
google_protobuf_Int32Value_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)166 UPB_INLINE google_protobuf_Int32Value *google_protobuf_Int32Value_parse_ex(const char *buf, size_t size,
167                            upb_arena *arena, int options) {
168   google_protobuf_Int32Value *ret = google_protobuf_Int32Value_new(arena);
169   return (ret && _upb_decode(buf, size, ret, &google_protobuf_Int32Value_msginit, arena, options))
170       ? ret : NULL;
171 }
google_protobuf_Int32Value_serialize(const google_protobuf_Int32Value * msg,upb_arena * arena,size_t * len)172 UPB_INLINE char *google_protobuf_Int32Value_serialize(const google_protobuf_Int32Value *msg, upb_arena *arena, size_t *len) {
173   return upb_encode(msg, &google_protobuf_Int32Value_msginit, arena, len);
174 }
175 
google_protobuf_Int32Value_value(const google_protobuf_Int32Value * msg)176 UPB_INLINE int32_t google_protobuf_Int32Value_value(const google_protobuf_Int32Value *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
177 
google_protobuf_Int32Value_set_value(google_protobuf_Int32Value * msg,int32_t value)178 UPB_INLINE void google_protobuf_Int32Value_set_value(google_protobuf_Int32Value *msg, int32_t value) {
179   *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
180 }
181 
182 /* google.protobuf.UInt32Value */
183 
google_protobuf_UInt32Value_new(upb_arena * arena)184 UPB_INLINE google_protobuf_UInt32Value *google_protobuf_UInt32Value_new(upb_arena *arena) {
185   return (google_protobuf_UInt32Value *)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
186 }
google_protobuf_UInt32Value_parse(const char * buf,size_t size,upb_arena * arena)187 UPB_INLINE google_protobuf_UInt32Value *google_protobuf_UInt32Value_parse(const char *buf, size_t size,
188                         upb_arena *arena) {
189   google_protobuf_UInt32Value *ret = google_protobuf_UInt32Value_new(arena);
190   return (ret && upb_decode(buf, size, ret, &google_protobuf_UInt32Value_msginit, arena)) ? ret : NULL;
191 }
google_protobuf_UInt32Value_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)192 UPB_INLINE google_protobuf_UInt32Value *google_protobuf_UInt32Value_parse_ex(const char *buf, size_t size,
193                            upb_arena *arena, int options) {
194   google_protobuf_UInt32Value *ret = google_protobuf_UInt32Value_new(arena);
195   return (ret && _upb_decode(buf, size, ret, &google_protobuf_UInt32Value_msginit, arena, options))
196       ? ret : NULL;
197 }
google_protobuf_UInt32Value_serialize(const google_protobuf_UInt32Value * msg,upb_arena * arena,size_t * len)198 UPB_INLINE char *google_protobuf_UInt32Value_serialize(const google_protobuf_UInt32Value *msg, upb_arena *arena, size_t *len) {
199   return upb_encode(msg, &google_protobuf_UInt32Value_msginit, arena, len);
200 }
201 
google_protobuf_UInt32Value_value(const google_protobuf_UInt32Value * msg)202 UPB_INLINE uint32_t google_protobuf_UInt32Value_value(const google_protobuf_UInt32Value *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); }
203 
google_protobuf_UInt32Value_set_value(google_protobuf_UInt32Value * msg,uint32_t value)204 UPB_INLINE void google_protobuf_UInt32Value_set_value(google_protobuf_UInt32Value *msg, uint32_t value) {
205   *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value;
206 }
207 
208 /* google.protobuf.BoolValue */
209 
google_protobuf_BoolValue_new(upb_arena * arena)210 UPB_INLINE google_protobuf_BoolValue *google_protobuf_BoolValue_new(upb_arena *arena) {
211   return (google_protobuf_BoolValue *)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena);
212 }
google_protobuf_BoolValue_parse(const char * buf,size_t size,upb_arena * arena)213 UPB_INLINE google_protobuf_BoolValue *google_protobuf_BoolValue_parse(const char *buf, size_t size,
214                         upb_arena *arena) {
215   google_protobuf_BoolValue *ret = google_protobuf_BoolValue_new(arena);
216   return (ret && upb_decode(buf, size, ret, &google_protobuf_BoolValue_msginit, arena)) ? ret : NULL;
217 }
google_protobuf_BoolValue_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)218 UPB_INLINE google_protobuf_BoolValue *google_protobuf_BoolValue_parse_ex(const char *buf, size_t size,
219                            upb_arena *arena, int options) {
220   google_protobuf_BoolValue *ret = google_protobuf_BoolValue_new(arena);
221   return (ret && _upb_decode(buf, size, ret, &google_protobuf_BoolValue_msginit, arena, options))
222       ? ret : NULL;
223 }
google_protobuf_BoolValue_serialize(const google_protobuf_BoolValue * msg,upb_arena * arena,size_t * len)224 UPB_INLINE char *google_protobuf_BoolValue_serialize(const google_protobuf_BoolValue *msg, upb_arena *arena, size_t *len) {
225   return upb_encode(msg, &google_protobuf_BoolValue_msginit, arena, len);
226 }
227 
google_protobuf_BoolValue_value(const google_protobuf_BoolValue * msg)228 UPB_INLINE bool google_protobuf_BoolValue_value(const google_protobuf_BoolValue *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
229 
google_protobuf_BoolValue_set_value(google_protobuf_BoolValue * msg,bool value)230 UPB_INLINE void google_protobuf_BoolValue_set_value(google_protobuf_BoolValue *msg, bool value) {
231   *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
232 }
233 
234 /* google.protobuf.StringValue */
235 
google_protobuf_StringValue_new(upb_arena * arena)236 UPB_INLINE google_protobuf_StringValue *google_protobuf_StringValue_new(upb_arena *arena) {
237   return (google_protobuf_StringValue *)_upb_msg_new(&google_protobuf_StringValue_msginit, arena);
238 }
google_protobuf_StringValue_parse(const char * buf,size_t size,upb_arena * arena)239 UPB_INLINE google_protobuf_StringValue *google_protobuf_StringValue_parse(const char *buf, size_t size,
240                         upb_arena *arena) {
241   google_protobuf_StringValue *ret = google_protobuf_StringValue_new(arena);
242   return (ret && upb_decode(buf, size, ret, &google_protobuf_StringValue_msginit, arena)) ? ret : NULL;
243 }
google_protobuf_StringValue_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)244 UPB_INLINE google_protobuf_StringValue *google_protobuf_StringValue_parse_ex(const char *buf, size_t size,
245                            upb_arena *arena, int options) {
246   google_protobuf_StringValue *ret = google_protobuf_StringValue_new(arena);
247   return (ret && _upb_decode(buf, size, ret, &google_protobuf_StringValue_msginit, arena, options))
248       ? ret : NULL;
249 }
google_protobuf_StringValue_serialize(const google_protobuf_StringValue * msg,upb_arena * arena,size_t * len)250 UPB_INLINE char *google_protobuf_StringValue_serialize(const google_protobuf_StringValue *msg, upb_arena *arena, size_t *len) {
251   return upb_encode(msg, &google_protobuf_StringValue_msginit, arena, len);
252 }
253 
google_protobuf_StringValue_value(const google_protobuf_StringValue * msg)254 UPB_INLINE upb_strview google_protobuf_StringValue_value(const google_protobuf_StringValue *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
255 
google_protobuf_StringValue_set_value(google_protobuf_StringValue * msg,upb_strview value)256 UPB_INLINE void google_protobuf_StringValue_set_value(google_protobuf_StringValue *msg, upb_strview value) {
257   *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
258 }
259 
260 /* google.protobuf.BytesValue */
261 
google_protobuf_BytesValue_new(upb_arena * arena)262 UPB_INLINE google_protobuf_BytesValue *google_protobuf_BytesValue_new(upb_arena *arena) {
263   return (google_protobuf_BytesValue *)_upb_msg_new(&google_protobuf_BytesValue_msginit, arena);
264 }
google_protobuf_BytesValue_parse(const char * buf,size_t size,upb_arena * arena)265 UPB_INLINE google_protobuf_BytesValue *google_protobuf_BytesValue_parse(const char *buf, size_t size,
266                         upb_arena *arena) {
267   google_protobuf_BytesValue *ret = google_protobuf_BytesValue_new(arena);
268   return (ret && upb_decode(buf, size, ret, &google_protobuf_BytesValue_msginit, arena)) ? ret : NULL;
269 }
google_protobuf_BytesValue_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)270 UPB_INLINE google_protobuf_BytesValue *google_protobuf_BytesValue_parse_ex(const char *buf, size_t size,
271                            upb_arena *arena, int options) {
272   google_protobuf_BytesValue *ret = google_protobuf_BytesValue_new(arena);
273   return (ret && _upb_decode(buf, size, ret, &google_protobuf_BytesValue_msginit, arena, options))
274       ? ret : NULL;
275 }
google_protobuf_BytesValue_serialize(const google_protobuf_BytesValue * msg,upb_arena * arena,size_t * len)276 UPB_INLINE char *google_protobuf_BytesValue_serialize(const google_protobuf_BytesValue *msg, upb_arena *arena, size_t *len) {
277   return upb_encode(msg, &google_protobuf_BytesValue_msginit, arena, len);
278 }
279 
google_protobuf_BytesValue_value(const google_protobuf_BytesValue * msg)280 UPB_INLINE upb_strview google_protobuf_BytesValue_value(const google_protobuf_BytesValue *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
281 
google_protobuf_BytesValue_set_value(google_protobuf_BytesValue * msg,upb_strview value)282 UPB_INLINE void google_protobuf_BytesValue_set_value(google_protobuf_BytesValue *msg, upb_strview value) {
283   *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
284 }
285 
286 #ifdef __cplusplus
287 }  /* extern "C" */
288 #endif
289 
290 #include "upb/port_undef.inc"
291 
292 #endif  /* GOOGLE_PROTOBUF_WRAPPERS_PROTO_UPB_H_ */
293