| 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_internal.h" |
| 13 |
#include "upb/decode.h" |
| 14 |
#include "upb/decode_fast.h" |
| 15 |
#include "upb/encode.h" |
| 16 |
|
| 17 |
#include "upb/port_def.inc" |
| 18 |
|
| 19 |
#ifdef __cplusplus |
| 20 |
extern "C" { |
| 21 |
#endif |
| 22 |
|
| 23 |
struct google_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_MiniTable google_protobuf_DoubleValue_msginit; |
| 42 |
extern const upb_MiniTable google_protobuf_FloatValue_msginit; |
| 43 |
extern const upb_MiniTable google_protobuf_Int64Value_msginit; |
| 44 |
extern const upb_MiniTable google_protobuf_UInt64Value_msginit; |
| 45 |
extern const upb_MiniTable google_protobuf_Int32Value_msginit; |
| 46 |
extern const upb_MiniTable google_protobuf_UInt32Value_msginit; |
| 47 |
extern const upb_MiniTable google_protobuf_BoolValue_msginit; |
| 48 |
extern const upb_MiniTable google_protobuf_StringValue_msginit; |
| 49 |
extern const upb_MiniTable google_protobuf_BytesValue_msginit; |
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
/* google.protobuf.DoubleValue */ |
| 54 |
|
| 55 |
UPB_INLINE google_protobuf_DoubleValue* google_protobuf_DoubleValue_new(upb_Arena* arena) { |
| 56 |
return (google_protobuf_DoubleValue*)_upb_Message_New(&google_protobuf_DoubleValue_msginit, arena); |
| 57 |
} |
| 58 |
UPB_INLINE google_protobuf_DoubleValue* google_protobuf_DoubleValue_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 59 |
google_protobuf_DoubleValue* ret = google_protobuf_DoubleValue_new(arena); |
| 60 |
if (!ret) return NULL; |
| 61 |
if (upb_Decode(buf, size, ret, &google_protobuf_DoubleValue_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 62 |
return NULL; |
| 63 |
} |
| 64 |
return ret; |
| 65 |
} |
| 66 |
UPB_INLINE google_protobuf_DoubleValue* google_protobuf_DoubleValue_parse_ex(const char* buf, size_t size, |
| 67 |
const upb_ExtensionRegistry* extreg, |
| 68 |
int options, upb_Arena* arena) { |
| 69 |
google_protobuf_DoubleValue* ret = google_protobuf_DoubleValue_new(arena); |
| 70 |
if (!ret) return NULL; |
| 71 |
if (upb_Decode(buf, size, ret, &google_protobuf_DoubleValue_msginit, extreg, options, arena) != |
| 72 |
kUpb_DecodeStatus_Ok) { |
| 73 |
return NULL; |
| 74 |
} |
| 75 |
return ret; |
| 76 |
} |
| 77 |
UPB_INLINE char* google_protobuf_DoubleValue_serialize(const google_protobuf_DoubleValue* msg, upb_Arena* arena, size_t* len) { |
| 78 |
char* ptr; |
| 79 |
(void)upb_Encode(msg, &google_protobuf_DoubleValue_msginit, 0, arena, &ptr, len); |
| 80 |
return ptr; |
| 81 |
} |
| 82 |
UPB_INLINE char* google_protobuf_DoubleValue_serialize_ex(const google_protobuf_DoubleValue* msg, int options, |
| 83 |
upb_Arena* arena, size_t* len) { |
| 84 |
char* ptr; |
| 85 |
(void)upb_Encode(msg, &google_protobuf_DoubleValue_msginit, options, arena, &ptr, len); |
| 86 |
return ptr; |
| 87 |
} |
| 88 |
UPB_INLINE void google_protobuf_DoubleValue_clear_value(const google_protobuf_DoubleValue* msg) { |
| 89 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), double) = 0; |
| 90 |
} |
| 91 |
UPB_INLINE double google_protobuf_DoubleValue_value(const google_protobuf_DoubleValue* msg) { |
| 92 |
return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), double); |
| 93 |
} |
| 94 |
|
| 95 |
UPB_INLINE void google_protobuf_DoubleValue_set_value(google_protobuf_DoubleValue *msg, double value) { |
| 96 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), double) = value; |
| 97 |
} |
| 98 |
|
| 99 |
/* google.protobuf.FloatValue */ |
| 100 |
|
| 101 |
UPB_INLINE google_protobuf_FloatValue* google_protobuf_FloatValue_new(upb_Arena* arena) { |
| 102 |
return (google_protobuf_FloatValue*)_upb_Message_New(&google_protobuf_FloatValue_msginit, arena); |
| 103 |
} |
| 104 |
UPB_INLINE google_protobuf_FloatValue* google_protobuf_FloatValue_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 105 |
google_protobuf_FloatValue* ret = google_protobuf_FloatValue_new(arena); |
| 106 |
if (!ret) return NULL; |
| 107 |
if (upb_Decode(buf, size, ret, &google_protobuf_FloatValue_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 108 |
return NULL; |
| 109 |
} |
| 110 |
return ret; |
| 111 |
} |
| 112 |
UPB_INLINE google_protobuf_FloatValue* google_protobuf_FloatValue_parse_ex(const char* buf, size_t size, |
| 113 |
const upb_ExtensionRegistry* extreg, |
| 114 |
int options, upb_Arena* arena) { |
| 115 |
google_protobuf_FloatValue* ret = google_protobuf_FloatValue_new(arena); |
| 116 |
if (!ret) return NULL; |
| 117 |
if (upb_Decode(buf, size, ret, &google_protobuf_FloatValue_msginit, extreg, options, arena) != |
| 118 |
kUpb_DecodeStatus_Ok) { |
| 119 |
return NULL; |
| 120 |
} |
| 121 |
return ret; |
| 122 |
} |
| 123 |
UPB_INLINE char* google_protobuf_FloatValue_serialize(const google_protobuf_FloatValue* msg, upb_Arena* arena, size_t* len) { |
| 124 |
char* ptr; |
| 125 |
(void)upb_Encode(msg, &google_protobuf_FloatValue_msginit, 0, arena, &ptr, len); |
| 126 |
return ptr; |
| 127 |
} |
| 128 |
UPB_INLINE char* google_protobuf_FloatValue_serialize_ex(const google_protobuf_FloatValue* msg, int options, |
| 129 |
upb_Arena* arena, size_t* len) { |
| 130 |
char* ptr; |
| 131 |
(void)upb_Encode(msg, &google_protobuf_FloatValue_msginit, options, arena, &ptr, len); |
| 132 |
return ptr; |
| 133 |
} |
| 134 |
UPB_INLINE void google_protobuf_FloatValue_clear_value(const google_protobuf_FloatValue* msg) { |
| 135 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), float) = 0; |
| 136 |
} |
| 137 |
UPB_INLINE float google_protobuf_FloatValue_value(const google_protobuf_FloatValue* msg) { |
| 138 |
return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), float); |
| 139 |
} |
| 140 |
|
| 141 |
UPB_INLINE void google_protobuf_FloatValue_set_value(google_protobuf_FloatValue *msg, float value) { |
| 142 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), float) = value; |
| 143 |
} |
| 144 |
|
| 145 |
/* google.protobuf.Int64Value */ |
| 146 |
|
| 147 |
UPB_INLINE google_protobuf_Int64Value* google_protobuf_Int64Value_new(upb_Arena* arena) { |
| 148 |
return (google_protobuf_Int64Value*)_upb_Message_New(&google_protobuf_Int64Value_msginit, arena); |
| 149 |
} |
| 150 |
UPB_INLINE google_protobuf_Int64Value* google_protobuf_Int64Value_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 151 |
google_protobuf_Int64Value* ret = google_protobuf_Int64Value_new(arena); |
| 152 |
if (!ret) return NULL; |
| 153 |
if (upb_Decode(buf, size, ret, &google_protobuf_Int64Value_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 154 |
return NULL; |
| 155 |
} |
| 156 |
return ret; |
| 157 |
} |
| 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, ret, &google_protobuf_Int64Value_msginit, extreg, options, arena) != |
| 164 |
kUpb_DecodeStatus_Ok) { |
| 165 |
return NULL; |
| 166 |
} |
| 167 |
return ret; |
| 168 |
} |
| 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(msg, &google_protobuf_Int64Value_msginit, 0, arena, &ptr, len); |
| 172 |
return ptr; |
| 173 |
} |
| 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(msg, &google_protobuf_Int64Value_msginit, options, arena, &ptr, len); |
| 178 |
return ptr; |
| 179 |
} |
| 180 |
UPB_INLINE void google_protobuf_Int64Value_clear_value(const google_protobuf_Int64Value* msg) { |
| 181 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t) = 0; |
| 182 |
} |
| 183 |
UPB_INLINE int64_t google_protobuf_Int64Value_value(const google_protobuf_Int64Value* msg) { |
| 184 |
return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t); |
| 185 |
} |
| 186 |
|
| 187 |
UPB_INLINE void google_protobuf_Int64Value_set_value(google_protobuf_Int64Value *msg, int64_t value) { |
| 188 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t) = value; |
| 189 |
} |
| 190 |
|
| 191 |
/* google.protobuf.UInt64Value */ |
| 192 |
|
| 193 |
UPB_INLINE google_protobuf_UInt64Value* google_protobuf_UInt64Value_new(upb_Arena* arena) { |
| 194 |
return (google_protobuf_UInt64Value*)_upb_Message_New(&google_protobuf_UInt64Value_msginit, arena); |
| 195 |
} |
| 196 |
UPB_INLINE google_protobuf_UInt64Value* google_protobuf_UInt64Value_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 197 |
google_protobuf_UInt64Value* ret = google_protobuf_UInt64Value_new(arena); |
| 198 |
if (!ret) return NULL; |
| 199 |
if (upb_Decode(buf, size, ret, &google_protobuf_UInt64Value_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 200 |
return NULL; |
| 201 |
} |
| 202 |
return ret; |
| 203 |
} |
| 204 |
UPB_INLINE google_protobuf_UInt64Value* google_protobuf_UInt64Value_parse_ex(const char* buf, size_t size, |
| 205 |
const upb_ExtensionRegistry* extreg, |
| 206 |
int options, upb_Arena* arena) { |
| 207 |
google_protobuf_UInt64Value* ret = google_protobuf_UInt64Value_new(arena); |
| 208 |
if (!ret) return NULL; |
| 209 |
if (upb_Decode(buf, size, ret, &google_protobuf_UInt64Value_msginit, extreg, options, arena) != |
| 210 |
kUpb_DecodeStatus_Ok) { |
| 211 |
return NULL; |
| 212 |
} |
| 213 |
return ret; |
| 214 |
} |
| 215 |
UPB_INLINE char* google_protobuf_UInt64Value_serialize(const google_protobuf_UInt64Value* msg, upb_Arena* arena, size_t* len) { |
| 216 |
char* ptr; |
| 217 |
(void)upb_Encode(msg, &google_protobuf_UInt64Value_msginit, 0, arena, &ptr, len); |
| 218 |
return ptr; |
| 219 |
} |
| 220 |
UPB_INLINE char* google_protobuf_UInt64Value_serialize_ex(const google_protobuf_UInt64Value* msg, int options, |
| 221 |
upb_Arena* arena, size_t* len) { |
| 222 |
char* ptr; |
| 223 |
(void)upb_Encode(msg, &google_protobuf_UInt64Value_msginit, options, arena, &ptr, len); |
| 224 |
return ptr; |
| 225 |
} |
| 226 |
UPB_INLINE void google_protobuf_UInt64Value_clear_value(const google_protobuf_UInt64Value* msg) { |
| 227 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t) = 0; |
| 228 |
} |
| 229 |
UPB_INLINE uint64_t google_protobuf_UInt64Value_value(const google_protobuf_UInt64Value* msg) { |
| 230 |
return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t); |
| 231 |
} |
| 232 |
|
| 233 |
UPB_INLINE void google_protobuf_UInt64Value_set_value(google_protobuf_UInt64Value *msg, uint64_t value) { |
| 234 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t) = value; |
| 235 |
} |
| 236 |
|
| 237 |
/* google.protobuf.Int32Value */ |
| 238 |
|
| 239 |
UPB_INLINE google_protobuf_Int32Value* google_protobuf_Int32Value_new(upb_Arena* arena) { |
| 240 |
return (google_protobuf_Int32Value*)_upb_Message_New(&google_protobuf_Int32Value_msginit, arena); |
| 241 |
} |
| 242 |
UPB_INLINE google_protobuf_Int32Value* google_protobuf_Int32Value_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 243 |
google_protobuf_Int32Value* ret = google_protobuf_Int32Value_new(arena); |
| 244 |
if (!ret) return NULL; |
| 245 |
if (upb_Decode(buf, size, ret, &google_protobuf_Int32Value_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 246 |
return NULL; |
| 247 |
} |
| 248 |
return ret; |
| 249 |
} |
| 250 |
UPB_INLINE google_protobuf_Int32Value* google_protobuf_Int32Value_parse_ex(const char* buf, size_t size, |
| 251 |
const upb_ExtensionRegistry* extreg, |
| 252 |
int options, upb_Arena* arena) { |
| 253 |
google_protobuf_Int32Value* ret = google_protobuf_Int32Value_new(arena); |
| 254 |
if (!ret) return NULL; |
| 255 |
if (upb_Decode(buf, size, ret, &google_protobuf_Int32Value_msginit, extreg, options, arena) != |
| 256 |
kUpb_DecodeStatus_Ok) { |
| 257 |
return NULL; |
| 258 |
} |
| 259 |
return ret; |
| 260 |
} |
| 261 |
UPB_INLINE char* google_protobuf_Int32Value_serialize(const google_protobuf_Int32Value* msg, upb_Arena* arena, size_t* len) { |
| 262 |
char* ptr; |
| 263 |
(void)upb_Encode(msg, &google_protobuf_Int32Value_msginit, 0, arena, &ptr, len); |
| 264 |
return ptr; |
| 265 |
} |
| 266 |
UPB_INLINE char* google_protobuf_Int32Value_serialize_ex(const google_protobuf_Int32Value* msg, int options, |
| 267 |
upb_Arena* arena, size_t* len) { |
| 268 |
char* ptr; |
| 269 |
(void)upb_Encode(msg, &google_protobuf_Int32Value_msginit, options, arena, &ptr, len); |
| 270 |
return ptr; |
| 271 |
} |
| 272 |
UPB_INLINE void google_protobuf_Int32Value_clear_value(const google_protobuf_Int32Value* msg) { |
| 273 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = 0; |
| 274 |
} |
| 275 |
UPB_INLINE int32_t google_protobuf_Int32Value_value(const google_protobuf_Int32Value* msg) { |
| 276 |
return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); |
| 277 |
} |
| 278 |
|
| 279 |
UPB_INLINE void google_protobuf_Int32Value_set_value(google_protobuf_Int32Value *msg, int32_t value) { |
| 280 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; |
| 281 |
} |
| 282 |
|
| 283 |
/* google.protobuf.UInt32Value */ |
| 284 |
|
| 285 |
UPB_INLINE google_protobuf_UInt32Value* google_protobuf_UInt32Value_new(upb_Arena* arena) { |
| 286 |
return (google_protobuf_UInt32Value*)_upb_Message_New(&google_protobuf_UInt32Value_msginit, arena); |
| 287 |
} |
| 288 |
UPB_INLINE google_protobuf_UInt32Value* google_protobuf_UInt32Value_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 289 |
google_protobuf_UInt32Value* ret = google_protobuf_UInt32Value_new(arena); |
| 290 |
if (!ret) return NULL; |
| 291 |
if (upb_Decode(buf, size, ret, &google_protobuf_UInt32Value_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 292 |
return NULL; |
| 293 |
} |
| 294 |
return ret; |
| 295 |
} |
| 296 |
UPB_INLINE google_protobuf_UInt32Value* google_protobuf_UInt32Value_parse_ex(const char* buf, size_t size, |
| 297 |
const upb_ExtensionRegistry* extreg, |
| 298 |
int options, upb_Arena* arena) { |
| 299 |
google_protobuf_UInt32Value* ret = google_protobuf_UInt32Value_new(arena); |
| 300 |
if (!ret) return NULL; |
| 301 |
if (upb_Decode(buf, size, ret, &google_protobuf_UInt32Value_msginit, extreg, options, arena) != |
| 302 |
kUpb_DecodeStatus_Ok) { |
| 303 |
return NULL; |
| 304 |
} |
| 305 |
return ret; |
| 306 |
} |
| 307 |
UPB_INLINE char* google_protobuf_UInt32Value_serialize(const google_protobuf_UInt32Value* msg, upb_Arena* arena, size_t* len) { |
| 308 |
char* ptr; |
| 309 |
(void)upb_Encode(msg, &google_protobuf_UInt32Value_msginit, 0, arena, &ptr, len); |
| 310 |
return ptr; |
| 311 |
} |
| 312 |
UPB_INLINE char* google_protobuf_UInt32Value_serialize_ex(const google_protobuf_UInt32Value* msg, int options, |
| 313 |
upb_Arena* arena, size_t* len) { |
| 314 |
char* ptr; |
| 315 |
(void)upb_Encode(msg, &google_protobuf_UInt32Value_msginit, options, arena, &ptr, len); |
| 316 |
return ptr; |
| 317 |
} |
| 318 |
UPB_INLINE void google_protobuf_UInt32Value_clear_value(const google_protobuf_UInt32Value* msg) { |
| 319 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = 0; |
| 320 |
} |
| 321 |
UPB_INLINE uint32_t google_protobuf_UInt32Value_value(const google_protobuf_UInt32Value* msg) { |
| 322 |
return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); |
| 323 |
} |
| 324 |
|
| 325 |
UPB_INLINE void google_protobuf_UInt32Value_set_value(google_protobuf_UInt32Value *msg, uint32_t value) { |
| 326 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value; |
| 327 |
} |
| 328 |
|
| 329 |
/* google.protobuf.BoolValue */ |
| 330 |
|
| 331 |
UPB_INLINE google_protobuf_BoolValue* google_protobuf_BoolValue_new(upb_Arena* arena) { |
| 332 |
return (google_protobuf_BoolValue*)_upb_Message_New(&google_protobuf_BoolValue_msginit, arena); |
| 333 |
} |
| 334 |
UPB_INLINE google_protobuf_BoolValue* google_protobuf_BoolValue_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 335 |
google_protobuf_BoolValue* ret = google_protobuf_BoolValue_new(arena); |
| 336 |
if (!ret) return NULL; |
| 337 |
if (upb_Decode(buf, size, ret, &google_protobuf_BoolValue_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 338 |
return NULL; |
| 339 |
} |
| 340 |
return ret; |
| 341 |
} |
| 342 |
UPB_INLINE google_protobuf_BoolValue* google_protobuf_BoolValue_parse_ex(const char* buf, size_t size, |
| 343 |
const upb_ExtensionRegistry* extreg, |
| 344 |
int options, upb_Arena* arena) { |
| 345 |
google_protobuf_BoolValue* ret = google_protobuf_BoolValue_new(arena); |
| 346 |
if (!ret) return NULL; |
| 347 |
if (upb_Decode(buf, size, ret, &google_protobuf_BoolValue_msginit, extreg, options, arena) != |
| 348 |
kUpb_DecodeStatus_Ok) { |
| 349 |
return NULL; |
| 350 |
} |
| 351 |
return ret; |
| 352 |
} |
| 353 |
UPB_INLINE char* google_protobuf_BoolValue_serialize(const google_protobuf_BoolValue* msg, upb_Arena* arena, size_t* len) { |
| 354 |
char* ptr; |
| 355 |
(void)upb_Encode(msg, &google_protobuf_BoolValue_msginit, 0, arena, &ptr, len); |
| 356 |
return ptr; |
| 357 |
} |
| 358 |
UPB_INLINE char* google_protobuf_BoolValue_serialize_ex(const google_protobuf_BoolValue* msg, int options, |
| 359 |
upb_Arena* arena, size_t* len) { |
| 360 |
char* ptr; |
| 361 |
(void)upb_Encode(msg, &google_protobuf_BoolValue_msginit, options, arena, &ptr, len); |
| 362 |
return ptr; |
| 363 |
} |
| 364 |
UPB_INLINE void google_protobuf_BoolValue_clear_value(const google_protobuf_BoolValue* msg) { |
| 365 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = 0; |
| 366 |
} |
| 367 |
UPB_INLINE bool google_protobuf_BoolValue_value(const google_protobuf_BoolValue* msg) { |
| 368 |
return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); |
| 369 |
} |
| 370 |
|
| 371 |
UPB_INLINE void google_protobuf_BoolValue_set_value(google_protobuf_BoolValue *msg, bool value) { |
| 372 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; |
| 373 |
} |
| 374 |
|
| 375 |
/* google.protobuf.StringValue */ |
| 376 |
|
| 377 |
UPB_INLINE google_protobuf_StringValue* google_protobuf_StringValue_new(upb_Arena* arena) { |
| 378 |
return (google_protobuf_StringValue*)_upb_Message_New(&google_protobuf_StringValue_msginit, arena); |
| 379 |
} |
| 380 |
UPB_INLINE google_protobuf_StringValue* google_protobuf_StringValue_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 381 |
google_protobuf_StringValue* ret = google_protobuf_StringValue_new(arena); |
| 382 |
if (!ret) return NULL; |
| 383 |
if (upb_Decode(buf, size, ret, &google_protobuf_StringValue_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 384 |
return NULL; |
| 385 |
} |
| 386 |
return ret; |
| 387 |
} |
| 388 |
UPB_INLINE google_protobuf_StringValue* google_protobuf_StringValue_parse_ex(const char* buf, size_t size, |
| 389 |
const upb_ExtensionRegistry* extreg, |
| 390 |
int options, upb_Arena* arena) { |
| 391 |
google_protobuf_StringValue* ret = google_protobuf_StringValue_new(arena); |
| 392 |
if (!ret) return NULL; |
| 393 |
if (upb_Decode(buf, size, ret, &google_protobuf_StringValue_msginit, extreg, options, arena) != |
| 394 |
kUpb_DecodeStatus_Ok) { |
| 395 |
return NULL; |
| 396 |
} |
| 397 |
return ret; |
| 398 |
} |
| 399 |
UPB_INLINE char* google_protobuf_StringValue_serialize(const google_protobuf_StringValue* msg, upb_Arena* arena, size_t* len) { |
| 400 |
char* ptr; |
| 401 |
(void)upb_Encode(msg, &google_protobuf_StringValue_msginit, 0, arena, &ptr, len); |
| 402 |
return ptr; |
| 403 |
} |
| 404 |
UPB_INLINE char* google_protobuf_StringValue_serialize_ex(const google_protobuf_StringValue* msg, int options, |
| 405 |
upb_Arena* arena, size_t* len) { |
| 406 |
char* ptr; |
| 407 |
(void)upb_Encode(msg, &google_protobuf_StringValue_msginit, options, arena, &ptr, len); |
| 408 |
return ptr; |
| 409 |
} |
| 410 |
UPB_INLINE void google_protobuf_StringValue_clear_value(const google_protobuf_StringValue* msg) { |
| 411 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 412 |
} |
| 413 |
UPB_INLINE upb_StringView google_protobuf_StringValue_value(const google_protobuf_StringValue* msg) { |
| 414 |
return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView); |
| 415 |
} |
| 416 |
|
| 417 |
UPB_INLINE void google_protobuf_StringValue_set_value(google_protobuf_StringValue *msg, upb_StringView value) { |
| 418 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = value; |
| 419 |
} |
| 420 |
|
| 421 |
/* google.protobuf.BytesValue */ |
| 422 |
|
| 423 |
UPB_INLINE google_protobuf_BytesValue* google_protobuf_BytesValue_new(upb_Arena* arena) { |
| 424 |
return (google_protobuf_BytesValue*)_upb_Message_New(&google_protobuf_BytesValue_msginit, arena); |
| 425 |
} |
| 426 |
UPB_INLINE google_protobuf_BytesValue* google_protobuf_BytesValue_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 427 |
google_protobuf_BytesValue* ret = google_protobuf_BytesValue_new(arena); |
| 428 |
if (!ret) return NULL; |
| 429 |
if (upb_Decode(buf, size, ret, &google_protobuf_BytesValue_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 430 |
return NULL; |
| 431 |
} |
| 432 |
return ret; |
| 433 |
} |
| 434 |
UPB_INLINE google_protobuf_BytesValue* google_protobuf_BytesValue_parse_ex(const char* buf, size_t size, |
| 435 |
const upb_ExtensionRegistry* extreg, |
| 436 |
int options, upb_Arena* arena) { |
| 437 |
google_protobuf_BytesValue* ret = google_protobuf_BytesValue_new(arena); |
| 438 |
if (!ret) return NULL; |
| 439 |
if (upb_Decode(buf, size, ret, &google_protobuf_BytesValue_msginit, extreg, options, arena) != |
| 440 |
kUpb_DecodeStatus_Ok) { |
| 441 |
return NULL; |
| 442 |
} |
| 443 |
return ret; |
| 444 |
} |
| 445 |
UPB_INLINE char* google_protobuf_BytesValue_serialize(const google_protobuf_BytesValue* msg, upb_Arena* arena, size_t* len) { |
| 446 |
char* ptr; |
| 447 |
(void)upb_Encode(msg, &google_protobuf_BytesValue_msginit, 0, arena, &ptr, len); |
| 448 |
return ptr; |
| 449 |
} |
| 450 |
UPB_INLINE char* google_protobuf_BytesValue_serialize_ex(const google_protobuf_BytesValue* msg, int options, |
| 451 |
upb_Arena* arena, size_t* len) { |
| 452 |
char* ptr; |
| 453 |
(void)upb_Encode(msg, &google_protobuf_BytesValue_msginit, options, arena, &ptr, len); |
| 454 |
return ptr; |
| 455 |
} |
| 456 |
UPB_INLINE void google_protobuf_BytesValue_clear_value(const google_protobuf_BytesValue* msg) { |
| 457 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 458 |
} |
| 459 |
UPB_INLINE upb_StringView google_protobuf_BytesValue_value(const google_protobuf_BytesValue* msg) { |
| 460 |
return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView); |
| 461 |
} |
| 462 |
|
| 463 |
UPB_INLINE void google_protobuf_BytesValue_set_value(google_protobuf_BytesValue *msg, upb_StringView value) { |
| 464 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = value; |
| 465 |
} |
| 466 |
|
| 467 |
extern const upb_MiniTable_File google_protobuf_wrappers_proto_upb_file_layout; |
| 468 |
|
| 469 |
#ifdef __cplusplus |
| 470 |
} /* extern "C" */ |
| 471 |
#endif |
| 472 |
|
| 473 |
#include "upb/port_undef.inc" |
| 474 |
|
| 475 |
#endif /* GOOGLE_PROTOBUF_WRAPPERS_PROTO_UPB_H_ */ |