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/encode.h"
15
16 #include "upb/port_def.inc"
17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21
22 struct google_protobuf_DoubleValue;
23 struct google_protobuf_FloatValue;
24 struct google_protobuf_Int64Value;
25 struct google_protobuf_UInt64Value;
26 struct google_protobuf_Int32Value;
27 struct google_protobuf_UInt32Value;
28 struct google_protobuf_BoolValue;
29 struct google_protobuf_StringValue;
30 struct google_protobuf_BytesValue;
31 typedef struct google_protobuf_DoubleValue google_protobuf_DoubleValue;
32 typedef struct google_protobuf_FloatValue google_protobuf_FloatValue;
33 typedef struct google_protobuf_Int64Value google_protobuf_Int64Value;
34 typedef struct google_protobuf_UInt64Value google_protobuf_UInt64Value;
35 typedef struct google_protobuf_Int32Value google_protobuf_Int32Value;
36 typedef struct google_protobuf_UInt32Value google_protobuf_UInt32Value;
37 typedef struct google_protobuf_BoolValue google_protobuf_BoolValue;
38 typedef struct google_protobuf_StringValue google_protobuf_StringValue;
39 typedef struct google_protobuf_BytesValue google_protobuf_BytesValue;
40 extern const upb_msglayout google_protobuf_DoubleValue_msginit;
41 extern const upb_msglayout google_protobuf_FloatValue_msginit;
42 extern const upb_msglayout google_protobuf_Int64Value_msginit;
43 extern const upb_msglayout google_protobuf_UInt64Value_msginit;
44 extern const upb_msglayout google_protobuf_Int32Value_msginit;
45 extern const upb_msglayout google_protobuf_UInt32Value_msginit;
46 extern const upb_msglayout google_protobuf_BoolValue_msginit;
47 extern const upb_msglayout google_protobuf_StringValue_msginit;
48 extern const upb_msglayout google_protobuf_BytesValue_msginit;
49
50
51 /* google.protobuf.DoubleValue */
52
google_protobuf_DoubleValue_new(upb_arena * arena)53 UPB_INLINE google_protobuf_DoubleValue *google_protobuf_DoubleValue_new(upb_arena *arena) {
54 return (google_protobuf_DoubleValue *)_upb_msg_new(&google_protobuf_DoubleValue_msginit, arena);
55 }
google_protobuf_DoubleValue_parse(const char * buf,size_t size,upb_arena * arena)56 UPB_INLINE google_protobuf_DoubleValue *google_protobuf_DoubleValue_parse(const char *buf, size_t size,
57 upb_arena *arena) {
58 google_protobuf_DoubleValue *ret = google_protobuf_DoubleValue_new(arena);
59 return (ret && upb_decode(buf, size, ret, &google_protobuf_DoubleValue_msginit, arena)) ? ret : NULL;
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 return upb_encode(msg, &google_protobuf_DoubleValue_msginit, arena, len);
63 }
64
google_protobuf_DoubleValue_value(const google_protobuf_DoubleValue * msg)65 UPB_INLINE double google_protobuf_DoubleValue_value(const google_protobuf_DoubleValue *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), double); }
66
google_protobuf_DoubleValue_set_value(google_protobuf_DoubleValue * msg,double value)67 UPB_INLINE void google_protobuf_DoubleValue_set_value(google_protobuf_DoubleValue *msg, double value) {
68 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), double) = value;
69 }
70
71 /* google.protobuf.FloatValue */
72
google_protobuf_FloatValue_new(upb_arena * arena)73 UPB_INLINE google_protobuf_FloatValue *google_protobuf_FloatValue_new(upb_arena *arena) {
74 return (google_protobuf_FloatValue *)_upb_msg_new(&google_protobuf_FloatValue_msginit, arena);
75 }
google_protobuf_FloatValue_parse(const char * buf,size_t size,upb_arena * arena)76 UPB_INLINE google_protobuf_FloatValue *google_protobuf_FloatValue_parse(const char *buf, size_t size,
77 upb_arena *arena) {
78 google_protobuf_FloatValue *ret = google_protobuf_FloatValue_new(arena);
79 return (ret && upb_decode(buf, size, ret, &google_protobuf_FloatValue_msginit, arena)) ? ret : NULL;
80 }
google_protobuf_FloatValue_serialize(const google_protobuf_FloatValue * msg,upb_arena * arena,size_t * len)81 UPB_INLINE char *google_protobuf_FloatValue_serialize(const google_protobuf_FloatValue *msg, upb_arena *arena, size_t *len) {
82 return upb_encode(msg, &google_protobuf_FloatValue_msginit, arena, len);
83 }
84
google_protobuf_FloatValue_value(const google_protobuf_FloatValue * msg)85 UPB_INLINE float google_protobuf_FloatValue_value(const google_protobuf_FloatValue *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), float); }
86
google_protobuf_FloatValue_set_value(google_protobuf_FloatValue * msg,float value)87 UPB_INLINE void google_protobuf_FloatValue_set_value(google_protobuf_FloatValue *msg, float value) {
88 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), float) = value;
89 }
90
91 /* google.protobuf.Int64Value */
92
google_protobuf_Int64Value_new(upb_arena * arena)93 UPB_INLINE google_protobuf_Int64Value *google_protobuf_Int64Value_new(upb_arena *arena) {
94 return (google_protobuf_Int64Value *)_upb_msg_new(&google_protobuf_Int64Value_msginit, arena);
95 }
google_protobuf_Int64Value_parse(const char * buf,size_t size,upb_arena * arena)96 UPB_INLINE google_protobuf_Int64Value *google_protobuf_Int64Value_parse(const char *buf, size_t size,
97 upb_arena *arena) {
98 google_protobuf_Int64Value *ret = google_protobuf_Int64Value_new(arena);
99 return (ret && upb_decode(buf, size, ret, &google_protobuf_Int64Value_msginit, arena)) ? ret : NULL;
100 }
google_protobuf_Int64Value_serialize(const google_protobuf_Int64Value * msg,upb_arena * arena,size_t * len)101 UPB_INLINE char *google_protobuf_Int64Value_serialize(const google_protobuf_Int64Value *msg, upb_arena *arena, size_t *len) {
102 return upb_encode(msg, &google_protobuf_Int64Value_msginit, arena, len);
103 }
104
google_protobuf_Int64Value_value(const google_protobuf_Int64Value * msg)105 UPB_INLINE int64_t google_protobuf_Int64Value_value(const google_protobuf_Int64Value *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t); }
106
google_protobuf_Int64Value_set_value(google_protobuf_Int64Value * msg,int64_t value)107 UPB_INLINE void google_protobuf_Int64Value_set_value(google_protobuf_Int64Value *msg, int64_t value) {
108 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t) = value;
109 }
110
111 /* google.protobuf.UInt64Value */
112
google_protobuf_UInt64Value_new(upb_arena * arena)113 UPB_INLINE google_protobuf_UInt64Value *google_protobuf_UInt64Value_new(upb_arena *arena) {
114 return (google_protobuf_UInt64Value *)_upb_msg_new(&google_protobuf_UInt64Value_msginit, arena);
115 }
google_protobuf_UInt64Value_parse(const char * buf,size_t size,upb_arena * arena)116 UPB_INLINE google_protobuf_UInt64Value *google_protobuf_UInt64Value_parse(const char *buf, size_t size,
117 upb_arena *arena) {
118 google_protobuf_UInt64Value *ret = google_protobuf_UInt64Value_new(arena);
119 return (ret && upb_decode(buf, size, ret, &google_protobuf_UInt64Value_msginit, arena)) ? ret : NULL;
120 }
google_protobuf_UInt64Value_serialize(const google_protobuf_UInt64Value * msg,upb_arena * arena,size_t * len)121 UPB_INLINE char *google_protobuf_UInt64Value_serialize(const google_protobuf_UInt64Value *msg, upb_arena *arena, size_t *len) {
122 return upb_encode(msg, &google_protobuf_UInt64Value_msginit, arena, len);
123 }
124
google_protobuf_UInt64Value_value(const google_protobuf_UInt64Value * msg)125 UPB_INLINE uint64_t google_protobuf_UInt64Value_value(const google_protobuf_UInt64Value *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t); }
126
google_protobuf_UInt64Value_set_value(google_protobuf_UInt64Value * msg,uint64_t value)127 UPB_INLINE void google_protobuf_UInt64Value_set_value(google_protobuf_UInt64Value *msg, uint64_t value) {
128 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t) = value;
129 }
130
131 /* google.protobuf.Int32Value */
132
google_protobuf_Int32Value_new(upb_arena * arena)133 UPB_INLINE google_protobuf_Int32Value *google_protobuf_Int32Value_new(upb_arena *arena) {
134 return (google_protobuf_Int32Value *)_upb_msg_new(&google_protobuf_Int32Value_msginit, arena);
135 }
google_protobuf_Int32Value_parse(const char * buf,size_t size,upb_arena * arena)136 UPB_INLINE google_protobuf_Int32Value *google_protobuf_Int32Value_parse(const char *buf, size_t size,
137 upb_arena *arena) {
138 google_protobuf_Int32Value *ret = google_protobuf_Int32Value_new(arena);
139 return (ret && upb_decode(buf, size, ret, &google_protobuf_Int32Value_msginit, arena)) ? ret : NULL;
140 }
google_protobuf_Int32Value_serialize(const google_protobuf_Int32Value * msg,upb_arena * arena,size_t * len)141 UPB_INLINE char *google_protobuf_Int32Value_serialize(const google_protobuf_Int32Value *msg, upb_arena *arena, size_t *len) {
142 return upb_encode(msg, &google_protobuf_Int32Value_msginit, arena, len);
143 }
144
google_protobuf_Int32Value_value(const google_protobuf_Int32Value * msg)145 UPB_INLINE int32_t google_protobuf_Int32Value_value(const google_protobuf_Int32Value *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
146
google_protobuf_Int32Value_set_value(google_protobuf_Int32Value * msg,int32_t value)147 UPB_INLINE void google_protobuf_Int32Value_set_value(google_protobuf_Int32Value *msg, int32_t value) {
148 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
149 }
150
151 /* google.protobuf.UInt32Value */
152
google_protobuf_UInt32Value_new(upb_arena * arena)153 UPB_INLINE google_protobuf_UInt32Value *google_protobuf_UInt32Value_new(upb_arena *arena) {
154 return (google_protobuf_UInt32Value *)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
155 }
google_protobuf_UInt32Value_parse(const char * buf,size_t size,upb_arena * arena)156 UPB_INLINE google_protobuf_UInt32Value *google_protobuf_UInt32Value_parse(const char *buf, size_t size,
157 upb_arena *arena) {
158 google_protobuf_UInt32Value *ret = google_protobuf_UInt32Value_new(arena);
159 return (ret && upb_decode(buf, size, ret, &google_protobuf_UInt32Value_msginit, arena)) ? ret : NULL;
160 }
google_protobuf_UInt32Value_serialize(const google_protobuf_UInt32Value * msg,upb_arena * arena,size_t * len)161 UPB_INLINE char *google_protobuf_UInt32Value_serialize(const google_protobuf_UInt32Value *msg, upb_arena *arena, size_t *len) {
162 return upb_encode(msg, &google_protobuf_UInt32Value_msginit, arena, len);
163 }
164
google_protobuf_UInt32Value_value(const google_protobuf_UInt32Value * msg)165 UPB_INLINE uint32_t google_protobuf_UInt32Value_value(const google_protobuf_UInt32Value *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); }
166
google_protobuf_UInt32Value_set_value(google_protobuf_UInt32Value * msg,uint32_t value)167 UPB_INLINE void google_protobuf_UInt32Value_set_value(google_protobuf_UInt32Value *msg, uint32_t value) {
168 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value;
169 }
170
171 /* google.protobuf.BoolValue */
172
google_protobuf_BoolValue_new(upb_arena * arena)173 UPB_INLINE google_protobuf_BoolValue *google_protobuf_BoolValue_new(upb_arena *arena) {
174 return (google_protobuf_BoolValue *)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena);
175 }
google_protobuf_BoolValue_parse(const char * buf,size_t size,upb_arena * arena)176 UPB_INLINE google_protobuf_BoolValue *google_protobuf_BoolValue_parse(const char *buf, size_t size,
177 upb_arena *arena) {
178 google_protobuf_BoolValue *ret = google_protobuf_BoolValue_new(arena);
179 return (ret && upb_decode(buf, size, ret, &google_protobuf_BoolValue_msginit, arena)) ? ret : NULL;
180 }
google_protobuf_BoolValue_serialize(const google_protobuf_BoolValue * msg,upb_arena * arena,size_t * len)181 UPB_INLINE char *google_protobuf_BoolValue_serialize(const google_protobuf_BoolValue *msg, upb_arena *arena, size_t *len) {
182 return upb_encode(msg, &google_protobuf_BoolValue_msginit, arena, len);
183 }
184
google_protobuf_BoolValue_value(const google_protobuf_BoolValue * msg)185 UPB_INLINE bool google_protobuf_BoolValue_value(const google_protobuf_BoolValue *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
186
google_protobuf_BoolValue_set_value(google_protobuf_BoolValue * msg,bool value)187 UPB_INLINE void google_protobuf_BoolValue_set_value(google_protobuf_BoolValue *msg, bool value) {
188 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
189 }
190
191 /* google.protobuf.StringValue */
192
google_protobuf_StringValue_new(upb_arena * arena)193 UPB_INLINE google_protobuf_StringValue *google_protobuf_StringValue_new(upb_arena *arena) {
194 return (google_protobuf_StringValue *)_upb_msg_new(&google_protobuf_StringValue_msginit, arena);
195 }
google_protobuf_StringValue_parse(const char * buf,size_t size,upb_arena * arena)196 UPB_INLINE google_protobuf_StringValue *google_protobuf_StringValue_parse(const char *buf, size_t size,
197 upb_arena *arena) {
198 google_protobuf_StringValue *ret = google_protobuf_StringValue_new(arena);
199 return (ret && upb_decode(buf, size, ret, &google_protobuf_StringValue_msginit, arena)) ? ret : NULL;
200 }
google_protobuf_StringValue_serialize(const google_protobuf_StringValue * msg,upb_arena * arena,size_t * len)201 UPB_INLINE char *google_protobuf_StringValue_serialize(const google_protobuf_StringValue *msg, upb_arena *arena, size_t *len) {
202 return upb_encode(msg, &google_protobuf_StringValue_msginit, arena, len);
203 }
204
google_protobuf_StringValue_value(const google_protobuf_StringValue * msg)205 UPB_INLINE upb_strview google_protobuf_StringValue_value(const google_protobuf_StringValue *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
206
google_protobuf_StringValue_set_value(google_protobuf_StringValue * msg,upb_strview value)207 UPB_INLINE void google_protobuf_StringValue_set_value(google_protobuf_StringValue *msg, upb_strview value) {
208 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
209 }
210
211 /* google.protobuf.BytesValue */
212
google_protobuf_BytesValue_new(upb_arena * arena)213 UPB_INLINE google_protobuf_BytesValue *google_protobuf_BytesValue_new(upb_arena *arena) {
214 return (google_protobuf_BytesValue *)_upb_msg_new(&google_protobuf_BytesValue_msginit, arena);
215 }
google_protobuf_BytesValue_parse(const char * buf,size_t size,upb_arena * arena)216 UPB_INLINE google_protobuf_BytesValue *google_protobuf_BytesValue_parse(const char *buf, size_t size,
217 upb_arena *arena) {
218 google_protobuf_BytesValue *ret = google_protobuf_BytesValue_new(arena);
219 return (ret && upb_decode(buf, size, ret, &google_protobuf_BytesValue_msginit, arena)) ? ret : NULL;
220 }
google_protobuf_BytesValue_serialize(const google_protobuf_BytesValue * msg,upb_arena * arena,size_t * len)221 UPB_INLINE char *google_protobuf_BytesValue_serialize(const google_protobuf_BytesValue *msg, upb_arena *arena, size_t *len) {
222 return upb_encode(msg, &google_protobuf_BytesValue_msginit, arena, len);
223 }
224
google_protobuf_BytesValue_value(const google_protobuf_BytesValue * msg)225 UPB_INLINE upb_strview google_protobuf_BytesValue_value(const google_protobuf_BytesValue *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
226
google_protobuf_BytesValue_set_value(google_protobuf_BytesValue * msg,upb_strview value)227 UPB_INLINE void google_protobuf_BytesValue_set_value(google_protobuf_BytesValue *msg, upb_strview value) {
228 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
229 }
230
231 #ifdef __cplusplus
232 } /* extern "C" */
233 #endif
234
235 #include "upb/port_undef.inc"
236
237 #endif /* GOOGLE_PROTOBUF_WRAPPERS_PROTO_UPB_H_ */
238