9 #ifndef GOOGLE_PROTOBUF_STRUCT_PROTO_UPB_H_
10 #define GOOGLE_PROTOBUF_STRUCT_PROTO_UPB_H_
13 #include "upb/decode.h"
14 #include "upb/decode_fast.h"
15 #include "upb/encode.h"
17 #include "upb/port_def.inc"
52 upb_arena *
arena,
int options) {
67 UPB_INLINE
bool google_protobuf_Struct_fields_set(
google_protobuf_Struct *msg, upb_strview key,
google_protobuf_Value* val, upb_arena *a) {
return _upb_msg_map_set(msg, UPB_SIZE(0, 0), &key, 0, &val,
sizeof(val), a); }
75 _upb_msg_map_key(msg, &ret, 0);
81 _upb_msg_map_value(msg, &ret,
sizeof(ret));
100 upb_arena *
arena,
int options) {
134 UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 1);
137 UPB_WRITE_ONEOF(msg,
double, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 2);
140 UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 3);
143 UPB_WRITE_ONEOF(msg,
bool, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 4);
152 if (!sub)
return NULL;
164 if (!sub)
return NULL;
181 upb_arena *
arena,
int options) {
201 bool ok = _upb_array_append_accessor2(
202 msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub,
arena);
203 if (!ok)
return NULL;
211 #include "upb/port_undef.inc"
UPB_INLINE double google_protobuf_Value_number_value(const google_protobuf_Value *msg)
Definition: struct.upb.h:123
UPB_INLINE const google_protobuf_Struct_FieldsEntry * google_protobuf_Struct_fields_next(const google_protobuf_Struct *msg, size_t *iter)
Definition: struct.upb.h:64
UPB_INLINE google_protobuf_Struct * google_protobuf_Struct_new(upb_arena *arena)
Definition: struct.upb.h:43
UPB_INLINE void google_protobuf_Value_set_string_value(google_protobuf_Value *msg, upb_strview value)
Definition: struct.upb.h:139
UPB_INLINE struct google_protobuf_Struct * google_protobuf_Value_mutable_struct_value(google_protobuf_Value *msg, upb_arena *arena)
Definition: struct.upb.h:148
UPB_INLINE google_protobuf_Struct * google_protobuf_Struct_parse_ex(const char *buf, size_t size, upb_arena *arena, int options)
Definition: struct.upb.h:51
UPB_INLINE void google_protobuf_Value_set_list_value(google_protobuf_Value *msg, google_protobuf_ListValue *value)
Definition: struct.upb.h:157
UPB_INLINE void google_protobuf_Value_set_bool_value(google_protobuf_Value *msg, bool value)
Definition: struct.upb.h:142
UPB_INLINE char * google_protobuf_Struct_serialize(const google_protobuf_Struct *msg, upb_arena *arena, size_t *len)
Definition: struct.upb.h:57
UPB_INLINE const google_protobuf_Value * google_protobuf_Struct_FieldsEntry_value(const google_protobuf_Struct_FieldsEntry *msg)
Definition: struct.upb.h:79
UPB_INLINE google_protobuf_Value * google_protobuf_Value_parse(const char *buf, size_t size, upb_arena *arena)
Definition: struct.upb.h:94
UPB_INLINE google_protobuf_Struct * google_protobuf_Struct_parse(const char *buf, size_t size, upb_arena *arena)
Definition: struct.upb.h:46
UPB_INLINE bool google_protobuf_Value_has_string_value(const google_protobuf_Value *msg)
Definition: struct.upb.h:124
UPB_INLINE bool google_protobuf_Value_has_bool_value(const google_protobuf_Value *msg)
Definition: struct.upb.h:126
UPB_INLINE google_protobuf_ListValue * google_protobuf_ListValue_parse(const char *buf, size_t size, upb_arena *arena)
Definition: struct.upb.h:175
UPB_INLINE struct google_protobuf_ListValue * google_protobuf_Value_mutable_list_value(google_protobuf_Value *msg, upb_arena *arena)
Definition: struct.upb.h:160
UPB_INLINE bool google_protobuf_Struct_fields_delete(google_protobuf_Struct *msg, upb_strview key)
Definition: struct.upb.h:68
UPB_INLINE struct google_protobuf_Value * google_protobuf_ListValue_add_values(google_protobuf_ListValue *msg, upb_arena *arena)
Definition: struct.upb.h:199
UPB_INLINE bool google_protobuf_Value_bool_value(const google_protobuf_Value *msg)
Definition: struct.upb.h:127
const upb_msglayout google_protobuf_Value_msginit
Definition: struct.upb.c:58
UPB_INLINE bool google_protobuf_Value_has_list_value(const google_protobuf_Value *msg)
Definition: struct.upb.h:130
UPB_INLINE upb_strview google_protobuf_Value_string_value(const google_protobuf_Value *msg)
Definition: struct.upb.h:125
UPB_INLINE int32_t google_protobuf_Value_null_value(const google_protobuf_Value *msg)
Definition: struct.upb.h:121
struct google_protobuf_ListValue google_protobuf_ListValue
Definition: struct.upb.h:30
const upb_msglayout google_protobuf_Struct_FieldsEntry_msginit
Definition: struct.upb.c:38
UPB_INLINE void google_protobuf_Value_set_number_value(google_protobuf_Value *msg, double value)
Definition: struct.upb.h:136
UPB_INLINE void google_protobuf_Struct_fields_clear(google_protobuf_Struct *msg)
Definition: struct.upb.h:66
const upb_msglayout google_protobuf_Struct_msginit
Definition: struct.upb.c:23
UPB_INLINE char * google_protobuf_ListValue_serialize(const google_protobuf_ListValue *msg, upb_arena *arena, size_t *len)
Definition: struct.upb.h:186
UPB_INLINE upb_strview google_protobuf_Struct_FieldsEntry_key(const google_protobuf_Struct_FieldsEntry *msg)
Definition: struct.upb.h:73
UPB_INLINE char * google_protobuf_Value_serialize(const google_protobuf_Value *msg, upb_arena *arena, size_t *len)
Definition: struct.upb.h:105
UPB_INLINE google_protobuf_Value ** google_protobuf_ListValue_resize_values(google_protobuf_ListValue *msg, size_t len, upb_arena *arena)
Definition: struct.upb.h:196
UPB_INLINE bool google_protobuf_ListValue_has_values(const google_protobuf_ListValue *msg)
Definition: struct.upb.h:190
UPB_INLINE google_protobuf_Value * google_protobuf_Value_parse_ex(const char *buf, size_t size, upb_arena *arena, int options)
Definition: struct.upb.h:99
google_protobuf_Value_kind_oneofcases
Definition: struct.upb.h:109
@ google_protobuf_Value_kind_struct_value
Definition: struct.upb.h:114
@ google_protobuf_Value_kind_null_value
Definition: struct.upb.h:110
@ google_protobuf_Value_kind_list_value
Definition: struct.upb.h:115
@ google_protobuf_Value_kind_bool_value
Definition: struct.upb.h:113
@ google_protobuf_Value_kind_number_value
Definition: struct.upb.h:111
@ google_protobuf_Value_kind_string_value
Definition: struct.upb.h:112
@ google_protobuf_Value_kind_NOT_SET
Definition: struct.upb.h:116
UPB_INLINE bool google_protobuf_Struct_has_fields(const google_protobuf_Struct *msg)
Definition: struct.upb.h:61
struct google_protobuf_Value google_protobuf_Value
Definition: struct.upb.h:29
UPB_INLINE bool google_protobuf_Struct_fields_get(const google_protobuf_Struct *msg, upb_strview key, google_protobuf_Value **val)
Definition: struct.upb.h:63
UPB_INLINE google_protobuf_Struct_FieldsEntry * google_protobuf_Struct_fields_nextmutable(google_protobuf_Struct *msg, size_t *iter)
Definition: struct.upb.h:69
UPB_INLINE google_protobuf_Value * google_protobuf_Value_new(upb_arena *arena)
Definition: struct.upb.h:91
UPB_INLINE google_protobuf_Value_kind_oneofcases google_protobuf_Value_kind_case(const google_protobuf_Value *msg)
Definition: struct.upb.h:118
const upb_msglayout google_protobuf_ListValue_msginit
Definition: struct.upb.c:72
UPB_INLINE void google_protobuf_Struct_FieldsEntry_set_value(google_protobuf_Struct_FieldsEntry *msg, google_protobuf_Value *value)
Definition: struct.upb.h:85
UPB_INLINE bool google_protobuf_Struct_fields_set(google_protobuf_Struct *msg, upb_strview key, google_protobuf_Value *val, upb_arena *a)
Definition: struct.upb.h:67
UPB_INLINE const google_protobuf_Struct * google_protobuf_Value_struct_value(const google_protobuf_Value *msg)
Definition: struct.upb.h:129
UPB_INLINE void google_protobuf_Value_set_null_value(google_protobuf_Value *msg, int32_t value)
Definition: struct.upb.h:133
UPB_INLINE const google_protobuf_ListValue * google_protobuf_Value_list_value(const google_protobuf_Value *msg)
Definition: struct.upb.h:131
UPB_INLINE google_protobuf_ListValue * google_protobuf_ListValue_parse_ex(const char *buf, size_t size, upb_arena *arena, int options)
Definition: struct.upb.h:180
struct google_protobuf_Struct_FieldsEntry google_protobuf_Struct_FieldsEntry
Definition: struct.upb.h:28
UPB_INLINE google_protobuf_ListValue * google_protobuf_ListValue_new(upb_arena *arena)
Definition: struct.upb.h:172
UPB_INLINE bool google_protobuf_Value_has_struct_value(const google_protobuf_Value *msg)
Definition: struct.upb.h:128
UPB_INLINE bool google_protobuf_Value_has_null_value(const google_protobuf_Value *msg)
Definition: struct.upb.h:120
UPB_INLINE bool google_protobuf_Struct_FieldsEntry_has_value(const google_protobuf_Struct_FieldsEntry *msg)
Definition: struct.upb.h:78
UPB_INLINE size_t google_protobuf_Struct_fields_size(const google_protobuf_Struct *msg)
Definition: struct.upb.h:62
UPB_INLINE bool google_protobuf_Value_has_number_value(const google_protobuf_Value *msg)
Definition: struct.upb.h:122
UPB_INLINE void google_protobuf_Value_set_struct_value(google_protobuf_Value *msg, google_protobuf_Struct *value)
Definition: struct.upb.h:145
google_protobuf_NullValue
Definition: struct.upb.h:36
@ google_protobuf_NULL_VALUE
Definition: struct.upb.h:37
UPB_INLINE google_protobuf_Value ** google_protobuf_ListValue_mutable_values(google_protobuf_ListValue *msg, size_t *len)
Definition: struct.upb.h:193
struct google_protobuf_Struct google_protobuf_Struct
Definition: struct.upb.h:27
UPB_INLINE const google_protobuf_Value *const * google_protobuf_ListValue_values(const google_protobuf_ListValue *msg, size_t *len)
Definition: struct.upb.h:191
upb_arena * arena
Definition: xds_api.cc:909