google-protobuf 3.6.1 → 3.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of google-protobuf might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/ext/google/protobuf_c/defs.c +553 -70
- data/ext/google/protobuf_c/encode_decode.c +281 -66
- data/ext/google/protobuf_c/extconf.rb +5 -1
- data/ext/google/protobuf_c/map.c +8 -3
- data/ext/google/protobuf_c/message.c +253 -72
- data/ext/google/protobuf_c/protobuf.c +4 -0
- data/ext/google/protobuf_c/protobuf.h +67 -5
- data/ext/google/protobuf_c/repeated_field.c +9 -3
- data/ext/google/protobuf_c/storage.c +265 -115
- data/ext/google/protobuf_c/upb.c +4329 -1745
- data/ext/google/protobuf_c/upb.h +2190 -518
- data/ext/google/protobuf_c/wrap_memcpy.c +1 -1
- data/lib/google/protobuf.rb +3 -2
- data/lib/google/protobuf/any_pb.rb +5 -3
- data/lib/google/protobuf/api_pb.rb +23 -21
- data/lib/google/protobuf/duration_pb.rb +5 -3
- data/lib/google/protobuf/empty_pb.rb +3 -1
- data/lib/google/protobuf/field_mask_pb.rb +4 -2
- data/lib/google/protobuf/repeated_field.rb +1 -1
- data/lib/google/protobuf/source_context_pb.rb +4 -2
- data/lib/google/protobuf/struct_pb.rb +19 -17
- data/lib/google/protobuf/timestamp_pb.rb +5 -3
- data/lib/google/protobuf/type_pb.rb +68 -66
- data/lib/google/protobuf/well_known_types.rb +12 -0
- data/lib/google/protobuf/wrappers_pb.rb +28 -26
- data/tests/basic.rb +174 -1192
- data/tests/generated_code_test.rb +5 -3
- metadata +4 -5
data/ext/google/protobuf_c/upb.h
CHANGED
@@ -1,4 +1,110 @@
|
|
1
|
-
|
1
|
+
/* Amalgamated source file */
|
2
|
+
|
3
|
+
#if UINTPTR_MAX == 0xffffffff
|
4
|
+
#define UPB_SIZE(size32, size64) size32
|
5
|
+
#else
|
6
|
+
#define UPB_SIZE(size32, size64) size64
|
7
|
+
#endif
|
8
|
+
|
9
|
+
#define UPB_FIELD_AT(msg, fieldtype, offset) \
|
10
|
+
*(fieldtype*)((const char*)(msg) + offset)
|
11
|
+
|
12
|
+
#define UPB_READ_ONEOF(msg, fieldtype, offset, case_offset, case_val, default) \
|
13
|
+
UPB_FIELD_AT(msg, int, case_offset) == case_val \
|
14
|
+
? UPB_FIELD_AT(msg, fieldtype, offset) \
|
15
|
+
: default
|
16
|
+
|
17
|
+
#define UPB_WRITE_ONEOF(msg, fieldtype, offset, value, case_offset, case_val) \
|
18
|
+
UPB_FIELD_AT(msg, int, case_offset) = case_val; \
|
19
|
+
UPB_FIELD_AT(msg, fieldtype, offset) = value;
|
20
|
+
/*
|
21
|
+
** upb::Message is a representation for protobuf messages.
|
22
|
+
**
|
23
|
+
** However it differs from other common representations like
|
24
|
+
** google::protobuf::Message in one key way: it does not prescribe any
|
25
|
+
** ownership between messages and submessages, and it relies on the
|
26
|
+
** client to ensure that each submessage/array/map outlives its parent.
|
27
|
+
**
|
28
|
+
** All messages, arrays, and maps live in an Arena. If the entire message
|
29
|
+
** tree is in the same arena, ensuring proper lifetimes is simple. However
|
30
|
+
** the client can mix arenas as long as they ensure that there are no
|
31
|
+
** dangling pointers.
|
32
|
+
**
|
33
|
+
** A client can access a upb::Message without knowing anything about
|
34
|
+
** ownership semantics, but to create or mutate a message a user needs
|
35
|
+
** to implement the memory management themselves.
|
36
|
+
**
|
37
|
+
** TODO: UTF-8 checking?
|
38
|
+
**/
|
39
|
+
|
40
|
+
#ifndef UPB_MSG_H_
|
41
|
+
#define UPB_MSG_H_
|
42
|
+
|
43
|
+
/*
|
44
|
+
** Defs are upb's internal representation of the constructs that can appear
|
45
|
+
** in a .proto file:
|
46
|
+
**
|
47
|
+
** - upb::MessageDef (upb_msgdef): describes a "message" construct.
|
48
|
+
** - upb::FieldDef (upb_fielddef): describes a message field.
|
49
|
+
** - upb::FileDef (upb_filedef): describes a .proto file and its defs.
|
50
|
+
** - upb::EnumDef (upb_enumdef): describes an enum.
|
51
|
+
** - upb::OneofDef (upb_oneofdef): describes a oneof.
|
52
|
+
** - upb::Def (upb_def): base class of all the others.
|
53
|
+
**
|
54
|
+
** TODO: definitions of services.
|
55
|
+
**
|
56
|
+
** Like upb_refcounted objects, defs are mutable only until frozen, and are
|
57
|
+
** only thread-safe once frozen.
|
58
|
+
**
|
59
|
+
** This is a mixed C/C++ interface that offers a full API to both languages.
|
60
|
+
** See the top-level README for more information.
|
61
|
+
*/
|
62
|
+
|
63
|
+
#ifndef UPB_DEF_H_
|
64
|
+
#define UPB_DEF_H_
|
65
|
+
|
66
|
+
/*
|
67
|
+
** upb::RefCounted (upb_refcounted)
|
68
|
+
**
|
69
|
+
** A refcounting scheme that supports circular refs. It accomplishes this by
|
70
|
+
** partitioning the set of objects into groups such that no cycle spans groups;
|
71
|
+
** we can then reference-count the group as a whole and ignore refs within the
|
72
|
+
** group. When objects are mutable, these groups are computed very
|
73
|
+
** conservatively; we group any objects that have ever had a link between them.
|
74
|
+
** When objects are frozen, we compute strongly-connected components which
|
75
|
+
** allows us to be precise and only group objects that are actually cyclic.
|
76
|
+
**
|
77
|
+
** This is a mixed C/C++ interface that offers a full API to both languages.
|
78
|
+
** See the top-level README for more information.
|
79
|
+
*/
|
80
|
+
|
81
|
+
#ifndef UPB_REFCOUNTED_H_
|
82
|
+
#define UPB_REFCOUNTED_H_
|
83
|
+
|
84
|
+
/*
|
85
|
+
** upb_table
|
86
|
+
**
|
87
|
+
** This header is INTERNAL-ONLY! Its interfaces are not public or stable!
|
88
|
+
** This file defines very fast int->upb_value (inttable) and string->upb_value
|
89
|
+
** (strtable) hash tables.
|
90
|
+
**
|
91
|
+
** The table uses chained scatter with Brent's variation (inspired by the Lua
|
92
|
+
** implementation of hash tables). The hash function for strings is Austin
|
93
|
+
** Appleby's "MurmurHash."
|
94
|
+
**
|
95
|
+
** The inttable uses uintptr_t as its key, which guarantees it can be used to
|
96
|
+
** store pointers or integers of at least 32 bits (upb isn't really useful on
|
97
|
+
** systems where sizeof(void*) < 4).
|
98
|
+
**
|
99
|
+
** The table must be homogenous (all values of the same type). In debug
|
100
|
+
** mode, we check this on insert and lookup.
|
101
|
+
*/
|
102
|
+
|
103
|
+
#ifndef UPB_TABLE_H_
|
104
|
+
#define UPB_TABLE_H_
|
105
|
+
|
106
|
+
#include <stdint.h>
|
107
|
+
#include <string.h>
|
2
108
|
/*
|
3
109
|
** This file contains shared definitions that are widely used across upb.
|
4
110
|
**
|
@@ -737,106 +843,6 @@ template
|
|
737
843
|
|
738
844
|
|
739
845
|
#endif /* UPB_H_ */
|
740
|
-
/*
|
741
|
-
** upb_decode: parsing into a upb_msg using a upb_msglayout.
|
742
|
-
*/
|
743
|
-
|
744
|
-
#ifndef UPB_DECODE_H_
|
745
|
-
#define UPB_DECODE_H_
|
746
|
-
|
747
|
-
/*
|
748
|
-
** upb::Message is a representation for protobuf messages.
|
749
|
-
**
|
750
|
-
** However it differs from other common representations like
|
751
|
-
** google::protobuf::Message in one key way: it does not prescribe any
|
752
|
-
** ownership between messages and submessages, and it relies on the
|
753
|
-
** client to delete each message/submessage/array/map at the appropriate
|
754
|
-
** time.
|
755
|
-
**
|
756
|
-
** A client can access a upb::Message without knowing anything about
|
757
|
-
** ownership semantics, but to create or mutate a message a user needs
|
758
|
-
** to implement the memory management themselves.
|
759
|
-
**
|
760
|
-
** Currently all messages, arrays, and maps store a upb_alloc* internally.
|
761
|
-
** Mutating operations use this when they require dynamically-allocated
|
762
|
-
** memory. We could potentially eliminate this size overhead later by
|
763
|
-
** letting the user flip a bit on the factory that prevents this from
|
764
|
-
** being stored. The user would then need to use separate functions where
|
765
|
-
** the upb_alloc* is passed explicitly. However for handlers to populate
|
766
|
-
** such structures, they would need a place to store this upb_alloc* during
|
767
|
-
** parsing; upb_handlers don't currently have a good way to accommodate this.
|
768
|
-
**
|
769
|
-
** TODO: UTF-8 checking?
|
770
|
-
**/
|
771
|
-
|
772
|
-
#ifndef UPB_MSG_H_
|
773
|
-
#define UPB_MSG_H_
|
774
|
-
|
775
|
-
/*
|
776
|
-
** Defs are upb's internal representation of the constructs that can appear
|
777
|
-
** in a .proto file:
|
778
|
-
**
|
779
|
-
** - upb::MessageDef (upb_msgdef): describes a "message" construct.
|
780
|
-
** - upb::FieldDef (upb_fielddef): describes a message field.
|
781
|
-
** - upb::FileDef (upb_filedef): describes a .proto file and its defs.
|
782
|
-
** - upb::EnumDef (upb_enumdef): describes an enum.
|
783
|
-
** - upb::OneofDef (upb_oneofdef): describes a oneof.
|
784
|
-
** - upb::Def (upb_def): base class of all the others.
|
785
|
-
**
|
786
|
-
** TODO: definitions of services.
|
787
|
-
**
|
788
|
-
** Like upb_refcounted objects, defs are mutable only until frozen, and are
|
789
|
-
** only thread-safe once frozen.
|
790
|
-
**
|
791
|
-
** This is a mixed C/C++ interface that offers a full API to both languages.
|
792
|
-
** See the top-level README for more information.
|
793
|
-
*/
|
794
|
-
|
795
|
-
#ifndef UPB_DEF_H_
|
796
|
-
#define UPB_DEF_H_
|
797
|
-
|
798
|
-
/*
|
799
|
-
** upb::RefCounted (upb_refcounted)
|
800
|
-
**
|
801
|
-
** A refcounting scheme that supports circular refs. It accomplishes this by
|
802
|
-
** partitioning the set of objects into groups such that no cycle spans groups;
|
803
|
-
** we can then reference-count the group as a whole and ignore refs within the
|
804
|
-
** group. When objects are mutable, these groups are computed very
|
805
|
-
** conservatively; we group any objects that have ever had a link between them.
|
806
|
-
** When objects are frozen, we compute strongly-connected components which
|
807
|
-
** allows us to be precise and only group objects that are actually cyclic.
|
808
|
-
**
|
809
|
-
** This is a mixed C/C++ interface that offers a full API to both languages.
|
810
|
-
** See the top-level README for more information.
|
811
|
-
*/
|
812
|
-
|
813
|
-
#ifndef UPB_REFCOUNTED_H_
|
814
|
-
#define UPB_REFCOUNTED_H_
|
815
|
-
|
816
|
-
/*
|
817
|
-
** upb_table
|
818
|
-
**
|
819
|
-
** This header is INTERNAL-ONLY! Its interfaces are not public or stable!
|
820
|
-
** This file defines very fast int->upb_value (inttable) and string->upb_value
|
821
|
-
** (strtable) hash tables.
|
822
|
-
**
|
823
|
-
** The table uses chained scatter with Brent's variation (inspired by the Lua
|
824
|
-
** implementation of hash tables). The hash function for strings is Austin
|
825
|
-
** Appleby's "MurmurHash."
|
826
|
-
**
|
827
|
-
** The inttable uses uintptr_t as its key, which guarantees it can be used to
|
828
|
-
** store pointers or integers of at least 32 bits (upb isn't really useful on
|
829
|
-
** systems where sizeof(void*) < 4).
|
830
|
-
**
|
831
|
-
** The table must be homogenous (all values of the same type). In debug
|
832
|
-
** mode, we check this on insert and lookup.
|
833
|
-
*/
|
834
|
-
|
835
|
-
#ifndef UPB_TABLE_H_
|
836
|
-
#define UPB_TABLE_H_
|
837
|
-
|
838
|
-
#include <stdint.h>
|
839
|
-
#include <string.h>
|
840
846
|
|
841
847
|
#ifdef __cplusplus
|
842
848
|
extern "C" {
|
@@ -1834,9 +1840,24 @@ class upb::Def {
|
|
1834
1840
|
|
1835
1841
|
private:
|
1836
1842
|
UPB_DISALLOW_POD_OPS(Def, upb::Def)
|
1843
|
+
#else
|
1844
|
+
struct upb_def {
|
1845
|
+
upb_refcounted base;
|
1846
|
+
|
1847
|
+
const char *fullname;
|
1848
|
+
const upb_filedef* file;
|
1849
|
+
char type; /* A upb_deftype_t (char to save space) */
|
1850
|
+
|
1851
|
+
/* Used as a flag during the def's mutable stage. Must be false unless
|
1852
|
+
* it is currently being used by a function on the stack. This allows
|
1853
|
+
* us to easily determine which defs were passed into the function's
|
1854
|
+
* current invocation. */
|
1855
|
+
bool came_from_user;
|
1856
|
+
#endif
|
1837
1857
|
};
|
1838
1858
|
|
1839
|
-
#
|
1859
|
+
#define UPB_DEF_INIT(name, type, vtbl, refs, ref2s) \
|
1860
|
+
{ UPB_REFCOUNT_INIT(vtbl, refs, ref2s), name, NULL, type, false }
|
1840
1861
|
|
1841
1862
|
UPB_BEGIN_EXTERN_C
|
1842
1863
|
|
@@ -1995,6 +2016,36 @@ typedef enum {
|
|
1995
2016
|
UPB_SYNTAX_PROTO3 = 3
|
1996
2017
|
} upb_syntax_t;
|
1997
2018
|
|
2019
|
+
/* All the different kind of well known type messages. For simplicity of check,
|
2020
|
+
* number wrappers and string wrappers are grouped together. Make sure the
|
2021
|
+
* order and merber of these groups are not changed.
|
2022
|
+
*/
|
2023
|
+
typedef enum {
|
2024
|
+
UPB_WELLKNOWN_UNSPECIFIED,
|
2025
|
+
UPB_WELLKNOWN_ANY,
|
2026
|
+
UPB_WELLKNOWN_FIELDMASK,
|
2027
|
+
UPB_WELLKNOWN_DURATION,
|
2028
|
+
UPB_WELLKNOWN_TIMESTAMP,
|
2029
|
+
/* number wrappers */
|
2030
|
+
UPB_WELLKNOWN_DOUBLEVALUE,
|
2031
|
+
UPB_WELLKNOWN_FLOATVALUE,
|
2032
|
+
UPB_WELLKNOWN_INT64VALUE,
|
2033
|
+
UPB_WELLKNOWN_UINT64VALUE,
|
2034
|
+
UPB_WELLKNOWN_INT32VALUE,
|
2035
|
+
UPB_WELLKNOWN_UINT32VALUE,
|
2036
|
+
/* string wrappers */
|
2037
|
+
UPB_WELLKNOWN_STRINGVALUE,
|
2038
|
+
UPB_WELLKNOWN_BYTESVALUE,
|
2039
|
+
UPB_WELLKNOWN_BOOLVALUE,
|
2040
|
+
UPB_WELLKNOWN_VALUE,
|
2041
|
+
UPB_WELLKNOWN_LISTVALUE,
|
2042
|
+
UPB_WELLKNOWN_STRUCT
|
2043
|
+
} upb_wellknowntype_t;
|
2044
|
+
|
2045
|
+
|
2046
|
+
/* Maps descriptor type -> upb field type. */
|
2047
|
+
extern const uint8_t upb_desctype_to_fieldtype[];
|
2048
|
+
|
1998
2049
|
/* Maximum field number allowed for FieldDefs. This is an inherent limit of the
|
1999
2050
|
* protobuf wire format. */
|
2000
2051
|
#define UPB_MAX_FIELDNUMBER ((1 << 29) - 1)
|
@@ -2269,12 +2320,57 @@ class upb::FieldDef {
|
|
2269
2320
|
|
2270
2321
|
private:
|
2271
2322
|
UPB_DISALLOW_POD_OPS(FieldDef, upb::FieldDef)
|
2272
|
-
|
2323
|
+
#else
|
2324
|
+
struct upb_fielddef {
|
2325
|
+
upb_def base;
|
2273
2326
|
|
2327
|
+
union {
|
2328
|
+
int64_t sint;
|
2329
|
+
uint64_t uint;
|
2330
|
+
double dbl;
|
2331
|
+
float flt;
|
2332
|
+
void *bytes;
|
2333
|
+
} defaultval;
|
2334
|
+
union {
|
2335
|
+
const upb_msgdef *def; /* If !msg_is_symbolic. */
|
2336
|
+
char *name; /* If msg_is_symbolic. */
|
2337
|
+
} msg;
|
2338
|
+
union {
|
2339
|
+
const upb_def *def; /* If !subdef_is_symbolic. */
|
2340
|
+
char *name; /* If subdef_is_symbolic. */
|
2341
|
+
} sub; /* The msgdef or enumdef for this field, if upb_hassubdef(f). */
|
2342
|
+
bool subdef_is_symbolic;
|
2343
|
+
bool msg_is_symbolic;
|
2344
|
+
const upb_oneofdef *oneof;
|
2345
|
+
bool default_is_string;
|
2346
|
+
bool type_is_set_; /* False until type is explicitly set. */
|
2347
|
+
bool is_extension_;
|
2348
|
+
bool lazy_;
|
2349
|
+
bool packed_;
|
2350
|
+
upb_intfmt_t intfmt;
|
2351
|
+
bool tagdelim;
|
2352
|
+
upb_fieldtype_t type_;
|
2353
|
+
upb_label_t label_;
|
2354
|
+
uint32_t number_;
|
2355
|
+
uint32_t selector_base; /* Used to index into a upb::Handlers table. */
|
2356
|
+
uint32_t index_;
|
2274
2357
|
# endif /* defined(__cplusplus) */
|
2358
|
+
};
|
2275
2359
|
|
2276
2360
|
UPB_BEGIN_EXTERN_C
|
2277
2361
|
|
2362
|
+
extern const struct upb_refcounted_vtbl upb_fielddef_vtbl;
|
2363
|
+
|
2364
|
+
#define UPB_FIELDDEF_INIT(label, type, intfmt, tagdelim, is_extension, lazy, \
|
2365
|
+
packed, name, num, msgdef, subdef, selector_base, \
|
2366
|
+
index, defaultval, refs, ref2s) \
|
2367
|
+
{ \
|
2368
|
+
UPB_DEF_INIT(name, UPB_DEF_FIELD, &upb_fielddef_vtbl, refs, ref2s), \
|
2369
|
+
defaultval, {msgdef}, {subdef}, NULL, false, false, \
|
2370
|
+
type == UPB_TYPE_STRING || type == UPB_TYPE_BYTES, true, is_extension, \
|
2371
|
+
lazy, packed, intfmt, tagdelim, type, label, num, selector_base, index \
|
2372
|
+
}
|
2373
|
+
|
2278
2374
|
/* Native C API. */
|
2279
2375
|
upb_fielddef *upb_fielddef_new(const void *owner);
|
2280
2376
|
|
@@ -2376,6 +2472,18 @@ typedef upb_strtable_iter upb_msg_oneof_iter;
|
|
2376
2472
|
#define UPB_MAPENTRY_KEY 1
|
2377
2473
|
#define UPB_MAPENTRY_VALUE 2
|
2378
2474
|
|
2475
|
+
/* Well-known field tag numbers for Any messages. */
|
2476
|
+
#define UPB_ANY_TYPE 1
|
2477
|
+
#define UPB_ANY_VALUE 2
|
2478
|
+
|
2479
|
+
/* Well-known field tag numbers for timestamp messages. */
|
2480
|
+
#define UPB_DURATION_SECONDS 1
|
2481
|
+
#define UPB_DURATION_NANOS 2
|
2482
|
+
|
2483
|
+
/* Well-known field tag numbers for duration messages. */
|
2484
|
+
#define UPB_TIMESTAMP_SECONDS 1
|
2485
|
+
#define UPB_TIMESTAMP_NANOS 2
|
2486
|
+
|
2379
2487
|
#ifdef __cplusplus
|
2380
2488
|
|
2381
2489
|
/* Structure that describes a single .proto message type.
|
@@ -2490,6 +2598,13 @@ class upb::MessageDef {
|
|
2490
2598
|
void setmapentry(bool map_entry);
|
2491
2599
|
bool mapentry() const;
|
2492
2600
|
|
2601
|
+
/* Return the type of well known type message. UPB_WELLKNOWN_UNSPECIFIED for
|
2602
|
+
* non-well-known message. */
|
2603
|
+
upb_wellknowntype_t wellknowntype() const;
|
2604
|
+
|
2605
|
+
/* Whether is a number wrapper. */
|
2606
|
+
bool isnumberwrapper() const;
|
2607
|
+
|
2493
2608
|
/* Iteration over fields. The order is undefined. */
|
2494
2609
|
class field_iterator
|
2495
2610
|
: public std::iterator<std::forward_iterator_tag, FieldDef*> {
|
@@ -2605,12 +2720,45 @@ class upb::MessageDef {
|
|
2605
2720
|
|
2606
2721
|
private:
|
2607
2722
|
UPB_DISALLOW_POD_OPS(MessageDef, upb::MessageDef)
|
2608
|
-
|
2723
|
+
#else
|
2724
|
+
struct upb_msgdef {
|
2725
|
+
upb_def base;
|
2609
2726
|
|
2610
|
-
|
2727
|
+
size_t selector_count;
|
2728
|
+
uint32_t submsg_field_count;
|
2729
|
+
|
2730
|
+
/* Tables for looking up fields by number and name. */
|
2731
|
+
upb_inttable itof; /* int to field */
|
2732
|
+
upb_strtable ntof; /* name to field/oneof */
|
2733
|
+
|
2734
|
+
/* Is this a map-entry message? */
|
2735
|
+
bool map_entry;
|
2736
|
+
|
2737
|
+
/* Whether this message has proto2 or proto3 semantics. */
|
2738
|
+
upb_syntax_t syntax;
|
2739
|
+
|
2740
|
+
/* Type of well known type message. UPB_WELLKNOWN_UNSPECIFIED for
|
2741
|
+
* non-well-known message. */
|
2742
|
+
upb_wellknowntype_t well_known_type;
|
2743
|
+
|
2744
|
+
/* TODO(haberman): proper extension ranges (there can be multiple). */
|
2745
|
+
#endif /* __cplusplus */
|
2746
|
+
};
|
2611
2747
|
|
2612
2748
|
UPB_BEGIN_EXTERN_C
|
2613
2749
|
|
2750
|
+
extern const struct upb_refcounted_vtbl upb_msgdef_vtbl;
|
2751
|
+
|
2752
|
+
/* TODO: also support static initialization of the oneofs table. This will be
|
2753
|
+
* needed if we compile in descriptors that contain oneofs. */
|
2754
|
+
#define UPB_MSGDEF_INIT(name, selector_count, submsg_field_count, itof, ntof, \
|
2755
|
+
map_entry, syntax, well_known_type, refs, ref2s) \
|
2756
|
+
{ \
|
2757
|
+
UPB_DEF_INIT(name, UPB_DEF_MSG, &upb_fielddef_vtbl, refs, ref2s), \
|
2758
|
+
selector_count, submsg_field_count, itof, ntof, map_entry, syntax, \
|
2759
|
+
well_known_type \
|
2760
|
+
}
|
2761
|
+
|
2614
2762
|
/* Returns NULL if memory allocation failed. */
|
2615
2763
|
upb_msgdef *upb_msgdef_new(const void *owner);
|
2616
2764
|
|
@@ -2631,6 +2779,8 @@ bool upb_msgdef_addoneof(upb_msgdef *m, upb_oneofdef *o, const void *ref_donor,
|
|
2631
2779
|
bool upb_msgdef_setfullname(upb_msgdef *m, const char *fullname, upb_status *s);
|
2632
2780
|
void upb_msgdef_setmapentry(upb_msgdef *m, bool map_entry);
|
2633
2781
|
bool upb_msgdef_mapentry(const upb_msgdef *m);
|
2782
|
+
upb_wellknowntype_t upb_msgdef_wellknowntype(const upb_msgdef *m);
|
2783
|
+
bool upb_msgdef_isnumberwrapper(const upb_msgdef *m);
|
2634
2784
|
bool upb_msgdef_setsyntax(upb_msgdef *m, upb_syntax_t syntax);
|
2635
2785
|
|
2636
2786
|
/* Field lookup in a couple of different variations:
|
@@ -2787,12 +2937,24 @@ class upb::EnumDef {
|
|
2787
2937
|
|
2788
2938
|
private:
|
2789
2939
|
UPB_DISALLOW_POD_OPS(EnumDef, upb::EnumDef)
|
2790
|
-
|
2940
|
+
#else
|
2941
|
+
struct upb_enumdef {
|
2942
|
+
upb_def base;
|
2791
2943
|
|
2944
|
+
upb_strtable ntoi;
|
2945
|
+
upb_inttable iton;
|
2946
|
+
int32_t defaultval;
|
2792
2947
|
#endif /* __cplusplus */
|
2948
|
+
};
|
2793
2949
|
|
2794
2950
|
UPB_BEGIN_EXTERN_C
|
2795
2951
|
|
2952
|
+
extern const struct upb_refcounted_vtbl upb_enumdef_vtbl;
|
2953
|
+
|
2954
|
+
#define UPB_ENUMDEF_INIT(name, ntoi, iton, defaultval, refs, ref2s) \
|
2955
|
+
{ UPB_DEF_INIT(name, UPB_DEF_ENUM, &upb_enumdef_vtbl, refs, ref2s), ntoi, \
|
2956
|
+
iton, defaultval }
|
2957
|
+
|
2796
2958
|
/* Native C API. */
|
2797
2959
|
upb_enumdef *upb_enumdef_new(const void *owner);
|
2798
2960
|
|
@@ -2941,12 +3103,25 @@ class upb::OneofDef {
|
|
2941
3103
|
|
2942
3104
|
private:
|
2943
3105
|
UPB_DISALLOW_POD_OPS(OneofDef, upb::OneofDef)
|
2944
|
-
|
3106
|
+
#else
|
3107
|
+
struct upb_oneofdef {
|
3108
|
+
upb_refcounted base;
|
2945
3109
|
|
3110
|
+
uint32_t index; /* Index within oneofs. */
|
3111
|
+
const char *name;
|
3112
|
+
upb_strtable ntof;
|
3113
|
+
upb_inttable itof;
|
3114
|
+
const upb_msgdef *parent;
|
2946
3115
|
#endif /* __cplusplus */
|
3116
|
+
};
|
2947
3117
|
|
2948
3118
|
UPB_BEGIN_EXTERN_C
|
2949
3119
|
|
3120
|
+
extern const struct upb_refcounted_vtbl upb_oneofdef_vtbl;
|
3121
|
+
|
3122
|
+
#define UPB_ONEOFDEF_INIT(name, ntof, itof, refs, ref2s) \
|
3123
|
+
{ UPB_REFCOUNT_INIT(&upb_oneofdef_vtbl, refs, ref2s), 0, name, ntof, itof }
|
3124
|
+
|
2950
3125
|
/* Native C API. */
|
2951
3126
|
upb_oneofdef *upb_oneofdef_new(const void *owner);
|
2952
3127
|
|
@@ -3065,12 +3240,25 @@ class upb::FileDef {
|
|
3065
3240
|
|
3066
3241
|
private:
|
3067
3242
|
UPB_DISALLOW_POD_OPS(FileDef, upb::FileDef)
|
3068
|
-
|
3243
|
+
#else
|
3244
|
+
struct upb_filedef {
|
3245
|
+
upb_refcounted base;
|
3246
|
+
|
3247
|
+
const char *name;
|
3248
|
+
const char *package;
|
3249
|
+
const char *phpprefix;
|
3250
|
+
const char *phpnamespace;
|
3251
|
+
upb_syntax_t syntax;
|
3069
3252
|
|
3253
|
+
upb_inttable defs;
|
3254
|
+
upb_inttable deps;
|
3070
3255
|
#endif
|
3256
|
+
};
|
3071
3257
|
|
3072
3258
|
UPB_BEGIN_EXTERN_C
|
3073
3259
|
|
3260
|
+
extern const struct upb_refcounted_vtbl upb_filedef_vtbl;
|
3261
|
+
|
3074
3262
|
upb_filedef *upb_filedef_new(const void *owner);
|
3075
3263
|
|
3076
3264
|
/* Include upb_refcounted methods like upb_msgdef_ref(). */
|
@@ -3200,9 +3388,13 @@ class upb::SymbolTable {
|
|
3200
3388
|
|
3201
3389
|
private:
|
3202
3390
|
UPB_DISALLOW_POD_OPS(SymbolTable, upb::SymbolTable)
|
3203
|
-
|
3391
|
+
#else
|
3392
|
+
struct upb_symtab {
|
3393
|
+
upb_refcounted base;
|
3204
3394
|
|
3395
|
+
upb_strtable symtab;
|
3205
3396
|
#endif /* __cplusplus */
|
3397
|
+
};
|
3206
3398
|
|
3207
3399
|
UPB_BEGIN_EXTERN_C
|
3208
3400
|
|
@@ -3214,6 +3406,8 @@ const upb_def *upb_symtab_resolve(const upb_symtab *s, const char *base,
|
|
3214
3406
|
const char *sym);
|
3215
3407
|
const upb_def *upb_symtab_lookup(const upb_symtab *s, const char *sym);
|
3216
3408
|
const upb_msgdef *upb_symtab_lookupmsg(const upb_symtab *s, const char *sym);
|
3409
|
+
const upb_msgdef *upb_symtab_lookupmsg2(
|
3410
|
+
const upb_symtab *s, const char *sym, size_t len);
|
3217
3411
|
const upb_enumdef *upb_symtab_lookupenum(const upb_symtab *s, const char *sym);
|
3218
3412
|
bool upb_symtab_add(upb_symtab *s, upb_def *const*defs, size_t n,
|
3219
3413
|
void *ref_donor, upb_status *status);
|
@@ -3570,6 +3764,12 @@ inline void MessageDef::setmapentry(bool map_entry) {
|
|
3570
3764
|
inline bool MessageDef::mapentry() const {
|
3571
3765
|
return upb_msgdef_mapentry(this);
|
3572
3766
|
}
|
3767
|
+
inline upb_wellknowntype_t MessageDef::wellknowntype() const {
|
3768
|
+
return upb_msgdef_wellknowntype(this);
|
3769
|
+
}
|
3770
|
+
inline bool MessageDef::isnumberwrapper() const {
|
3771
|
+
return upb_msgdef_isnumberwrapper(this);
|
3772
|
+
}
|
3573
3773
|
inline MessageDef::field_iterator MessageDef::field_begin() {
|
3574
3774
|
return field_iterator(this);
|
3575
3775
|
}
|
@@ -4697,6 +4897,34 @@ UPB_INLINE upb_selector_t upb_handlers_getendselector(upb_selector_t start) {
|
|
4697
4897
|
uint32_t upb_handlers_selectorbaseoffset(const upb_fielddef *f);
|
4698
4898
|
uint32_t upb_handlers_selectorcount(const upb_fielddef *f);
|
4699
4899
|
|
4900
|
+
|
4901
|
+
/** Message handlers ******************************************************************/
|
4902
|
+
|
4903
|
+
/* These are the handlers used internally by upb_msgfactory_getmergehandlers().
|
4904
|
+
* They write scalar data to a known offset from the message pointer.
|
4905
|
+
*
|
4906
|
+
* These would be trivial for anyone to implement themselves, but it's better
|
4907
|
+
* to use these because some JITs will recognize and specialize these instead
|
4908
|
+
* of actually calling the function. */
|
4909
|
+
|
4910
|
+
/* Sets a handler for the given primitive field that will write the data at the
|
4911
|
+
* given offset. If hasbit > 0, also sets a hasbit at the given bit offset
|
4912
|
+
* (addressing each byte low to high). */
|
4913
|
+
bool upb_msg_setscalarhandler(upb_handlers *h,
|
4914
|
+
const upb_fielddef *f,
|
4915
|
+
size_t offset,
|
4916
|
+
int32_t hasbit);
|
4917
|
+
|
4918
|
+
/* If the given handler is a msghandlers_primitive field, returns true and sets
|
4919
|
+
* *type, *offset and *hasbit. Otherwise returns false. */
|
4920
|
+
bool upb_msg_getscalarhandlerdata(const upb_handlers *h,
|
4921
|
+
upb_selector_t s,
|
4922
|
+
upb_fieldtype_t *type,
|
4923
|
+
size_t *offset,
|
4924
|
+
int32_t *hasbit);
|
4925
|
+
|
4926
|
+
|
4927
|
+
|
4700
4928
|
UPB_END_EXTERN_C
|
4701
4929
|
|
4702
4930
|
/*
|
@@ -6381,21 +6609,16 @@ namespace upb {
|
|
6381
6609
|
class Array;
|
6382
6610
|
class Map;
|
6383
6611
|
class MapIterator;
|
6384
|
-
class MessageFactory;
|
6385
6612
|
class MessageLayout;
|
6386
|
-
class Visitor;
|
6387
|
-
class VisitorPlan;
|
6388
6613
|
}
|
6389
6614
|
|
6390
6615
|
#endif
|
6391
6616
|
|
6392
|
-
UPB_DECLARE_TYPE(upb::MessageFactory, upb_msgfactory)
|
6393
|
-
UPB_DECLARE_TYPE(upb::MessageLayout, upb_msglayout)
|
6394
|
-
UPB_DECLARE_TYPE(upb::Array, upb_array)
|
6395
6617
|
UPB_DECLARE_TYPE(upb::Map, upb_map)
|
6396
6618
|
UPB_DECLARE_TYPE(upb::MapIterator, upb_mapiter)
|
6397
|
-
|
6398
|
-
|
6619
|
+
|
6620
|
+
struct upb_array;
|
6621
|
+
typedef struct upb_array upb_array;
|
6399
6622
|
|
6400
6623
|
/* TODO(haberman): C++ accessors */
|
6401
6624
|
|
@@ -6406,70 +6629,45 @@ typedef void upb_msg;
|
|
6406
6629
|
|
6407
6630
|
/** upb_msglayout *************************************************************/
|
6408
6631
|
|
6409
|
-
/* upb_msglayout represents the memory layout of a given upb_msgdef.
|
6410
|
-
*
|
6411
|
-
*
|
6412
|
-
|
6413
|
-
|
6414
|
-
/** upb_visitor ***************************************************************/
|
6415
|
-
|
6416
|
-
/* upb_visitor will visit all the fields of a message and its submessages. It
|
6417
|
-
* uses a upb_visitorplan which you can obtain from a upb_msgfactory. */
|
6418
|
-
|
6419
|
-
upb_visitor *upb_visitor_create(upb_env *e, const upb_visitorplan *vp,
|
6420
|
-
upb_sink *output);
|
6421
|
-
bool upb_visitor_visitmsg(upb_visitor *v, const upb_msg *msg);
|
6632
|
+
/* upb_msglayout represents the memory layout of a given upb_msgdef. The
|
6633
|
+
* members are public so generated code can initialize them, but users MUST NOT
|
6634
|
+
* read or write any of its members. */
|
6422
6635
|
|
6636
|
+
typedef struct {
|
6637
|
+
uint32_t number;
|
6638
|
+
uint16_t offset;
|
6639
|
+
int16_t presence; /* If >0, hasbit_index+1. If <0, oneof_index+1. */
|
6640
|
+
uint16_t submsg_index; /* undefined if descriptortype != MESSAGE or GROUP. */
|
6641
|
+
uint8_t descriptortype;
|
6642
|
+
uint8_t label;
|
6643
|
+
} upb_msglayout_field;
|
6423
6644
|
|
6424
|
-
|
6425
|
-
|
6426
|
-
|
6427
|
-
|
6428
|
-
|
6429
|
-
|
6430
|
-
|
6431
|
-
|
6432
|
-
|
6433
|
-
/* Creates and destroys a msgfactory, respectively. The messages for this
|
6434
|
-
* msgfactory must come from |symtab| (which should outlive the msgfactory). */
|
6435
|
-
upb_msgfactory *upb_msgfactory_new(const upb_symtab *symtab);
|
6436
|
-
void upb_msgfactory_free(upb_msgfactory *f);
|
6437
|
-
|
6438
|
-
const upb_symtab *upb_msgfactory_symtab(const upb_msgfactory *f);
|
6439
|
-
|
6440
|
-
/* The functions to get cached objects, lazily creating them on demand. These
|
6441
|
-
* all require:
|
6442
|
-
*
|
6443
|
-
* - m is in upb_msgfactory_symtab(f)
|
6444
|
-
* - upb_msgdef_mapentry(m) == false (since map messages can't have layouts).
|
6445
|
-
*
|
6446
|
-
* The returned objects will live for as long as the msgfactory does.
|
6447
|
-
*
|
6448
|
-
* TODO(haberman): consider making this thread-safe and take a const
|
6449
|
-
* upb_msgfactory. */
|
6450
|
-
const upb_msglayout *upb_msgfactory_getlayout(upb_msgfactory *f,
|
6451
|
-
const upb_msgdef *m);
|
6452
|
-
const upb_handlers *upb_msgfactory_getmergehandlers(upb_msgfactory *f,
|
6453
|
-
const upb_msgdef *m);
|
6454
|
-
const upb_visitorplan *upb_msgfactory_getvisitorplan(upb_msgfactory *f,
|
6455
|
-
const upb_handlers *h);
|
6645
|
+
typedef struct upb_msglayout {
|
6646
|
+
const struct upb_msglayout *const* submsgs;
|
6647
|
+
const upb_msglayout_field *fields;
|
6648
|
+
/* Must be aligned to sizeof(void*). Doesn't include internal members like
|
6649
|
+
* unknown fields, extension dict, pointer to msglayout, etc. */
|
6650
|
+
uint16_t size;
|
6651
|
+
uint16_t field_count;
|
6652
|
+
bool extendable;
|
6653
|
+
} upb_msglayout;
|
6456
6654
|
|
6457
6655
|
|
6458
|
-
/**
|
6656
|
+
/** upb_strview ************************************************************/
|
6459
6657
|
|
6460
6658
|
typedef struct {
|
6461
6659
|
const char *data;
|
6462
6660
|
size_t size;
|
6463
|
-
}
|
6661
|
+
} upb_strview;
|
6464
6662
|
|
6465
|
-
UPB_INLINE
|
6466
|
-
|
6663
|
+
UPB_INLINE upb_strview upb_strview_make(const char *data, size_t size) {
|
6664
|
+
upb_strview ret;
|
6467
6665
|
ret.data = data;
|
6468
6666
|
ret.size = size;
|
6469
6667
|
return ret;
|
6470
6668
|
}
|
6471
6669
|
|
6472
|
-
#define
|
6670
|
+
#define UPB_STRVIEW_INIT(ptr, len) {ptr, len}
|
6473
6671
|
|
6474
6672
|
|
6475
6673
|
/** upb_msgval ****************************************************************/
|
@@ -6489,7 +6687,7 @@ typedef union {
|
|
6489
6687
|
const upb_msg* msg;
|
6490
6688
|
const upb_array* arr;
|
6491
6689
|
const void* ptr;
|
6492
|
-
|
6690
|
+
upb_strview str;
|
6493
6691
|
} upb_msgval;
|
6494
6692
|
|
6495
6693
|
#define ACCESSORS(name, membername, ctype) \
|
@@ -6516,64 +6714,28 @@ ACCESSORS(map, map, const upb_map*)
|
|
6516
6714
|
ACCESSORS(msg, msg, const upb_msg*)
|
6517
6715
|
ACCESSORS(ptr, ptr, const void*)
|
6518
6716
|
ACCESSORS(arr, arr, const upb_array*)
|
6519
|
-
ACCESSORS(str, str,
|
6717
|
+
ACCESSORS(str, str, upb_strview)
|
6520
6718
|
|
6521
6719
|
#undef ACCESSORS
|
6522
6720
|
|
6523
6721
|
UPB_INLINE upb_msgval upb_msgval_makestr(const char *data, size_t size) {
|
6524
|
-
return upb_msgval_str(
|
6722
|
+
return upb_msgval_str(upb_strview_make(data, size));
|
6525
6723
|
}
|
6526
6724
|
|
6527
6725
|
|
6528
6726
|
/** upb_msg *******************************************************************/
|
6529
6727
|
|
6530
6728
|
/* A upb_msg represents a protobuf message. It always corresponds to a specific
|
6531
|
-
* upb_msglayout, which describes how it is laid out in memory.
|
6532
|
-
*
|
6533
|
-
* The message will have a fixed size, as returned by upb_msg_sizeof(), which
|
6534
|
-
* will be used to store fixed-length fields. The upb_msg may also allocate
|
6535
|
-
* dynamic memory internally to store data such as:
|
6536
|
-
*
|
6537
|
-
* - extensions
|
6538
|
-
* - unknown fields
|
6539
|
-
*/
|
6729
|
+
* upb_msglayout, which describes how it is laid out in memory. */
|
6540
6730
|
|
6541
|
-
/*
|
6542
|
-
|
6731
|
+
/* Creates a new message of the given type/layout in this arena. */
|
6732
|
+
upb_msg *upb_msg_new(const upb_msglayout *l, upb_arena *a);
|
6543
6733
|
|
6544
|
-
/*
|
6545
|
-
*
|
6546
|
-
|
6547
|
-
*
|
6548
|
-
*
|
6549
|
-
* Please note that upb_msg_init() may return a value that is different than
|
6550
|
-
* |msg|, so you must assign the return value and not cast your memory block
|
6551
|
-
* to upb_msg* directly!
|
6552
|
-
*
|
6553
|
-
* Please note that upb_msg_uninit() does *not* free any submessages, maps,
|
6554
|
-
* or arrays referred to by this message's fields. You must free them manually
|
6555
|
-
* yourself.
|
6556
|
-
*
|
6557
|
-
* upb_msg_uninit returns the original memory block, which may be useful if
|
6558
|
-
* you dynamically allocated it (though upb_msg_new() would normally be more
|
6559
|
-
* appropriate in this case). */
|
6560
|
-
upb_msg *upb_msg_init(void *msg, const upb_msglayout *l, upb_alloc *a);
|
6561
|
-
void *upb_msg_uninit(upb_msg *msg, const upb_msglayout *l);
|
6562
|
-
|
6563
|
-
/* Like upb_msg_init() / upb_msg_uninit(), except the message's memory is
|
6564
|
-
* allocated / freed from the given upb_alloc. */
|
6565
|
-
upb_msg *upb_msg_new(const upb_msglayout *l, upb_alloc *a);
|
6566
|
-
void upb_msg_free(upb_msg *msg, const upb_msglayout *l);
|
6567
|
-
|
6568
|
-
/* Returns the upb_alloc for the given message.
|
6569
|
-
* TODO(haberman): get rid of this? Not sure we want to be storing this
|
6570
|
-
* for every message. */
|
6571
|
-
upb_alloc *upb_msg_alloc(const upb_msg *msg);
|
6572
|
-
|
6573
|
-
/* Packs the tree of messages rooted at "msg" into a single hunk of memory,
|
6574
|
-
* allocated from the given allocator. */
|
6575
|
-
void *upb_msg_pack(const upb_msg *msg, const upb_msglayout *l,
|
6576
|
-
void *p, size_t *ofs, size_t size);
|
6734
|
+
/* Returns the arena for the given message. */
|
6735
|
+
upb_arena *upb_msg_arena(const upb_msg *msg);
|
6736
|
+
|
6737
|
+
void upb_msg_addunknown(upb_msg *msg, const char *data, size_t len);
|
6738
|
+
const char *upb_msg_getunknown(const upb_msg *msg, size_t *len);
|
6577
6739
|
|
6578
6740
|
/* Read-only message API. Can be safely called by anyone. */
|
6579
6741
|
|
@@ -6627,16 +6789,12 @@ bool upb_msg_clearfield(upb_msg *msg,
|
|
6627
6789
|
* semantics are the same as upb_msg. A upb_array allocates dynamic
|
6628
6790
|
* memory internally for the array elements. */
|
6629
6791
|
|
6630
|
-
|
6631
|
-
|
6632
|
-
void upb_array_uninit(upb_array *arr);
|
6633
|
-
upb_array *upb_array_new(upb_fieldtype_t type, upb_alloc *a);
|
6634
|
-
void upb_array_free(upb_array *arr);
|
6792
|
+
upb_array *upb_array_new(upb_fieldtype_t type, upb_arena *a);
|
6793
|
+
upb_fieldtype_t upb_array_type(const upb_array *arr);
|
6635
6794
|
|
6636
6795
|
/* Read-only interface. Safe for anyone to call. */
|
6637
6796
|
|
6638
6797
|
size_t upb_array_size(const upb_array *arr);
|
6639
|
-
upb_fieldtype_t upb_array_type(const upb_array *arr);
|
6640
6798
|
upb_msgval upb_array_get(const upb_array *arr, size_t i);
|
6641
6799
|
|
6642
6800
|
/* Write interface. May only be called by the message's owner who can enforce
|
@@ -6653,12 +6811,8 @@ bool upb_array_set(upb_array *arr, size_t i, upb_msgval val);
|
|
6653
6811
|
* So you must ensure that any string or message values outlive the map, and you
|
6654
6812
|
* must delete them manually when they are no longer required. */
|
6655
6813
|
|
6656
|
-
|
6657
|
-
|
6658
|
-
upb_alloc *a);
|
6659
|
-
void upb_map_uninit(upb_map *map);
|
6660
|
-
upb_map *upb_map_new(upb_fieldtype_t ktype, upb_fieldtype_t vtype, upb_alloc *a);
|
6661
|
-
void upb_map_free(upb_map *map);
|
6814
|
+
upb_map *upb_map_new(upb_fieldtype_t ktype, upb_fieldtype_t vtype,
|
6815
|
+
upb_arena *a);
|
6662
6816
|
|
6663
6817
|
/* Read-only interface. Safe for anyone to call. */
|
6664
6818
|
|
@@ -6702,90 +6856,29 @@ upb_msgval upb_mapiter_value(const upb_mapiter *i);
|
|
6702
6856
|
void upb_mapiter_setdone(upb_mapiter *i);
|
6703
6857
|
bool upb_mapiter_isequal(const upb_mapiter *i1, const upb_mapiter *i2);
|
6704
6858
|
|
6705
|
-
|
6706
|
-
/** Handlers ******************************************************************/
|
6707
|
-
|
6708
|
-
/* These are the handlers used internally by upb_msgfactory_getmergehandlers().
|
6709
|
-
* They write scalar data to a known offset from the message pointer.
|
6710
|
-
*
|
6711
|
-
* These would be trivial for anyone to implement themselves, but it's better
|
6712
|
-
* to use these because some JITs will recognize and specialize these instead
|
6713
|
-
* of actually calling the function. */
|
6714
|
-
|
6715
|
-
/* Sets a handler for the given primitive field that will write the data at the
|
6716
|
-
* given offset. If hasbit > 0, also sets a hasbit at the given bit offset
|
6717
|
-
* (addressing each byte low to high). */
|
6718
|
-
bool upb_msg_setscalarhandler(upb_handlers *h,
|
6719
|
-
const upb_fielddef *f,
|
6720
|
-
size_t offset,
|
6721
|
-
int32_t hasbit);
|
6722
|
-
|
6723
|
-
/* If the given handler is a msghandlers_primitive field, returns true and sets
|
6724
|
-
* *type, *offset and *hasbit. Otherwise returns false. */
|
6725
|
-
bool upb_msg_getscalarhandlerdata(const upb_handlers *h,
|
6726
|
-
upb_selector_t s,
|
6727
|
-
upb_fieldtype_t *type,
|
6728
|
-
size_t *offset,
|
6729
|
-
int32_t *hasbit);
|
6730
|
-
|
6731
|
-
|
6732
|
-
/** Interfaces for generated code *********************************************/
|
6733
|
-
|
6734
|
-
#define UPB_NOT_IN_ONEOF UINT16_MAX
|
6735
|
-
#define UPB_NO_HASBIT UINT16_MAX
|
6736
|
-
#define UPB_NO_SUBMSG UINT16_MAX
|
6737
|
-
|
6738
|
-
typedef struct {
|
6739
|
-
uint32_t number;
|
6740
|
-
uint32_t offset; /* If in a oneof, offset of default in default_msg below. */
|
6741
|
-
uint16_t hasbit; /* UPB_NO_HASBIT if no hasbit. */
|
6742
|
-
uint16_t oneof_index; /* UPB_NOT_IN_ONEOF if not in a oneof. */
|
6743
|
-
uint16_t submsg_index; /* UPB_NO_SUBMSG if no submsg. */
|
6744
|
-
uint8_t type;
|
6745
|
-
uint8_t label;
|
6746
|
-
} upb_msglayout_fieldinit_v1;
|
6747
|
-
|
6748
|
-
typedef struct {
|
6749
|
-
uint32_t data_offset;
|
6750
|
-
uint32_t case_offset;
|
6751
|
-
} upb_msglayout_oneofinit_v1;
|
6752
|
-
|
6753
|
-
typedef struct upb_msglayout_msginit_v1 {
|
6754
|
-
const struct upb_msglayout_msginit_v1 *const* submsgs;
|
6755
|
-
const upb_msglayout_fieldinit_v1 *fields;
|
6756
|
-
const upb_msglayout_oneofinit_v1 *oneofs;
|
6757
|
-
void *default_msg;
|
6758
|
-
/* Must be aligned to sizeof(void*). Doesn't include internal members like
|
6759
|
-
* unknown fields, extension dict, pointer to msglayout, etc. */
|
6760
|
-
uint32_t size;
|
6761
|
-
uint16_t field_count;
|
6762
|
-
uint16_t oneof_count;
|
6763
|
-
bool extendable;
|
6764
|
-
bool is_proto2;
|
6765
|
-
} upb_msglayout_msginit_v1;
|
6766
|
-
|
6767
|
-
#define UPB_ALIGN_UP_TO(val, align) ((val + (align - 1)) & -align)
|
6768
|
-
#define UPB_ALIGNED_SIZEOF(type) UPB_ALIGN_UP_TO(sizeof(type), sizeof(void*))
|
6769
|
-
|
6770
|
-
/* Initialize/uninitialize a msglayout from a msginit. If upb uses v1
|
6771
|
-
* internally, this will not allocate any memory. Should only be used by
|
6772
|
-
* generated code. */
|
6773
|
-
upb_msglayout *upb_msglayout_frominit_v1(
|
6774
|
-
const upb_msglayout_msginit_v1 *init, upb_alloc *a);
|
6775
|
-
void upb_msglayout_uninit_v1(upb_msglayout *layout, upb_alloc *a);
|
6776
|
-
|
6777
6859
|
UPB_END_EXTERN_C
|
6778
6860
|
|
6779
6861
|
#endif /* UPB_MSG_H_ */
|
6862
|
+
/* This file was generated by upbc (the upb compiler) from the input
|
6863
|
+
* file:
|
6864
|
+
*
|
6865
|
+
* google/protobuf/descriptor.proto
|
6866
|
+
*
|
6867
|
+
* Do not edit -- your changes will be discarded when the file is
|
6868
|
+
* regenerated. */
|
6780
6869
|
|
6781
|
-
|
6870
|
+
#ifndef GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_
|
6871
|
+
#define GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_
|
6782
6872
|
|
6783
|
-
|
6784
|
-
|
6873
|
+
/*
|
6874
|
+
** Functions for use by generated code. These are not public and users must
|
6875
|
+
** not call them directly.
|
6876
|
+
*/
|
6785
6877
|
|
6786
|
-
|
6878
|
+
#ifndef UPB_GENERATED_UTIL_H_
|
6879
|
+
#define UPB_GENERATED_UTIL_H_
|
6787
6880
|
|
6788
|
-
#
|
6881
|
+
#include <stdint.h>
|
6789
6882
|
/*
|
6790
6883
|
** structs.int.h: structures definitions that are internal to upb.
|
6791
6884
|
*/
|
@@ -6793,223 +6886,1843 @@ UPB_END_EXTERN_C
|
|
6793
6886
|
#ifndef UPB_STRUCTS_H_
|
6794
6887
|
#define UPB_STRUCTS_H_
|
6795
6888
|
|
6889
|
+
|
6796
6890
|
struct upb_array {
|
6797
6891
|
upb_fieldtype_t type;
|
6798
6892
|
uint8_t element_size;
|
6799
6893
|
void *data; /* Each element is element_size. */
|
6800
6894
|
size_t len; /* Measured in elements. */
|
6801
6895
|
size_t size; /* Measured in elements. */
|
6802
|
-
|
6896
|
+
upb_arena *arena;
|
6803
6897
|
};
|
6804
6898
|
|
6805
6899
|
#endif /* UPB_STRUCTS_H_ */
|
6806
6900
|
|
6807
|
-
/*
|
6808
|
-
** This file contains definitions of structs that should be considered private
|
6809
|
-
** and NOT stable across versions of upb.
|
6810
|
-
**
|
6811
|
-
** The only reason they are declared here and not in .c files is to allow upb
|
6812
|
-
** and the application (if desired) to embed statically-initialized instances
|
6813
|
-
** of structures like defs.
|
6814
|
-
**
|
6815
|
-
** If you include this file, all guarantees of ABI compatibility go out the
|
6816
|
-
** window! Any code that includes this file needs to recompile against the
|
6817
|
-
** exact same version of upb that they are linking against.
|
6818
|
-
**
|
6819
|
-
** You also need to recompile if you change the value of the UPB_DEBUG_REFS
|
6820
|
-
** flag.
|
6821
|
-
*/
|
6822
6901
|
|
6902
|
+
#define PTR_AT(msg, ofs, type) (type*)((const char*)msg + ofs)
|
6823
6903
|
|
6824
|
-
|
6825
|
-
|
6904
|
+
UPB_INLINE const void *_upb_array_accessor(const void *msg, size_t ofs,
|
6905
|
+
size_t *size) {
|
6906
|
+
const upb_array *arr = *PTR_AT(msg, ofs, const upb_array*);
|
6907
|
+
if (arr) {
|
6908
|
+
if (size) *size = arr->size;
|
6909
|
+
return arr->data;
|
6910
|
+
} else {
|
6911
|
+
if (size) *size = 0;
|
6912
|
+
return NULL;
|
6913
|
+
}
|
6914
|
+
}
|
6826
6915
|
|
6827
|
-
|
6828
|
-
|
6829
|
-
|
6830
|
-
|
6916
|
+
UPB_INLINE void *_upb_array_mutable_accessor(void *msg, size_t ofs,
|
6917
|
+
size_t *size) {
|
6918
|
+
upb_array *arr = *PTR_AT(msg, ofs, upb_array*);
|
6919
|
+
if (arr) {
|
6920
|
+
if (size) *size = arr->size;
|
6921
|
+
return arr->data;
|
6922
|
+
} else {
|
6923
|
+
if (size) *size = 0;
|
6924
|
+
return NULL;
|
6925
|
+
}
|
6926
|
+
}
|
6831
6927
|
|
6832
|
-
/*
|
6928
|
+
/* TODO(haberman): this is a mess. It will improve when upb_array no longer
|
6929
|
+
* carries reflective state (type, elem_size). */
|
6930
|
+
UPB_INLINE void *_upb_array_resize_accessor(void *msg, size_t ofs, size_t size,
|
6931
|
+
size_t elem_size,
|
6932
|
+
upb_fieldtype_t type,
|
6933
|
+
upb_arena *arena) {
|
6934
|
+
upb_array *arr = *PTR_AT(msg, ofs, upb_array*);
|
6833
6935
|
|
6936
|
+
if (!arr) {
|
6937
|
+
arr = upb_array_new(type, arena);
|
6938
|
+
if (!arr) return NULL;
|
6939
|
+
*PTR_AT(msg, ofs, upb_array*) = arr;
|
6940
|
+
}
|
6834
6941
|
|
6835
|
-
|
6942
|
+
if (size > arr->size) {
|
6943
|
+
size_t new_size = UPB_MAX(arr->size, 4);
|
6944
|
+
size_t old_bytes = arr->size * elem_size;
|
6945
|
+
size_t new_bytes;
|
6946
|
+
upb_alloc *alloc = upb_arena_alloc(arr->arena);
|
6947
|
+
while (new_size < size) new_size *= 2;
|
6948
|
+
new_bytes = new_size * elem_size;
|
6949
|
+
arr->data = upb_realloc(alloc, arr->data, old_bytes, new_bytes);
|
6950
|
+
if (!arr->data) {
|
6951
|
+
return NULL;
|
6952
|
+
}
|
6953
|
+
arr->size = new_size;
|
6954
|
+
}
|
6836
6955
|
|
6837
|
-
|
6838
|
-
|
6956
|
+
arr->len = size;
|
6957
|
+
return arr->data;
|
6958
|
+
}
|
6959
|
+
|
6960
|
+
UPB_INLINE bool _upb_array_append_accessor(void *msg, size_t ofs,
|
6961
|
+
size_t elem_size,
|
6962
|
+
upb_fieldtype_t type,
|
6963
|
+
const void *value,
|
6964
|
+
upb_arena *arena) {
|
6965
|
+
upb_array *arr = *PTR_AT(msg, ofs, upb_array*);
|
6966
|
+
size_t i = arr ? arr->len : 0;
|
6967
|
+
void *data =
|
6968
|
+
_upb_array_resize_accessor(msg, ofs, i + 1, elem_size, type, arena);
|
6969
|
+
if (!data) return false;
|
6970
|
+
memcpy(PTR_AT(data, i * elem_size, char), value, elem_size);
|
6971
|
+
return true;
|
6972
|
+
}
|
6839
6973
|
|
6840
|
-
|
6841
|
-
|
6842
|
-
|
6974
|
+
UPB_INLINE bool _upb_has_field(const void *msg, size_t idx) {
|
6975
|
+
return (*PTR_AT(msg, idx / 8, const char) & (idx % 8)) != 0;
|
6976
|
+
}
|
6843
6977
|
|
6844
|
-
|
6845
|
-
|
6846
|
-
|
6847
|
-
* current invocation. */
|
6848
|
-
bool came_from_user;
|
6849
|
-
};
|
6978
|
+
UPB_INLINE bool _upb_sethas(const void *msg, size_t idx) {
|
6979
|
+
return (*PTR_AT(msg, idx / 8, char)) |= (1 << (idx % 8));
|
6980
|
+
}
|
6850
6981
|
|
6851
|
-
|
6852
|
-
|
6982
|
+
UPB_INLINE bool _upb_clearhas(const void *msg, size_t idx) {
|
6983
|
+
return (*PTR_AT(msg, idx / 8, char)) &= ~(1 << (idx % 8));
|
6984
|
+
}
|
6853
6985
|
|
6986
|
+
UPB_INLINE bool _upb_has_oneof_field(const void *msg, size_t case_ofs, int32_t num) {
|
6987
|
+
return *PTR_AT(msg, case_ofs, int32_t) == num;
|
6988
|
+
}
|
6854
6989
|
|
6855
|
-
|
6990
|
+
#undef PTR_AT
|
6856
6991
|
|
6857
|
-
|
6858
|
-
upb_def base;
|
6992
|
+
#endif /* UPB_GENERATED_UTIL_H_ */
|
6859
6993
|
|
6860
|
-
union {
|
6861
|
-
int64_t sint;
|
6862
|
-
uint64_t uint;
|
6863
|
-
double dbl;
|
6864
|
-
float flt;
|
6865
|
-
void *bytes;
|
6866
|
-
} defaultval;
|
6867
|
-
union {
|
6868
|
-
const upb_msgdef *def; /* If !msg_is_symbolic. */
|
6869
|
-
char *name; /* If msg_is_symbolic. */
|
6870
|
-
} msg;
|
6871
|
-
union {
|
6872
|
-
const upb_def *def; /* If !subdef_is_symbolic. */
|
6873
|
-
char *name; /* If subdef_is_symbolic. */
|
6874
|
-
} sub; /* The msgdef or enumdef for this field, if upb_hassubdef(f). */
|
6875
|
-
bool subdef_is_symbolic;
|
6876
|
-
bool msg_is_symbolic;
|
6877
|
-
const upb_oneofdef *oneof;
|
6878
|
-
bool default_is_string;
|
6879
|
-
bool type_is_set_; /* False until type is explicitly set. */
|
6880
|
-
bool is_extension_;
|
6881
|
-
bool lazy_;
|
6882
|
-
bool packed_;
|
6883
|
-
upb_intfmt_t intfmt;
|
6884
|
-
bool tagdelim;
|
6885
|
-
upb_fieldtype_t type_;
|
6886
|
-
upb_label_t label_;
|
6887
|
-
uint32_t number_;
|
6888
|
-
uint32_t selector_base; /* Used to index into a upb::Handlers table. */
|
6889
|
-
uint32_t index_;
|
6890
|
-
};
|
6891
6994
|
|
6892
|
-
|
6995
|
+
/*
|
6996
|
+
** upb_decode: parsing into a upb_msg using a upb_msglayout.
|
6997
|
+
*/
|
6998
|
+
|
6999
|
+
#ifndef UPB_DECODE_H_
|
7000
|
+
#define UPB_DECODE_H_
|
7001
|
+
|
7002
|
+
|
7003
|
+
UPB_BEGIN_EXTERN_C
|
7004
|
+
|
7005
|
+
bool upb_decode(upb_strview buf, upb_msg *msg, const upb_msglayout *l);
|
7006
|
+
|
7007
|
+
UPB_END_EXTERN_C
|
7008
|
+
|
7009
|
+
#endif /* UPB_DECODE_H_ */
|
7010
|
+
/*
|
7011
|
+
** upb_encode: parsing into a upb_msg using a upb_msglayout.
|
7012
|
+
*/
|
7013
|
+
|
7014
|
+
#ifndef UPB_ENCODE_H_
|
7015
|
+
#define UPB_ENCODE_H_
|
7016
|
+
|
7017
|
+
|
7018
|
+
UPB_BEGIN_EXTERN_C
|
7019
|
+
|
7020
|
+
char *upb_encode(const void *msg, const upb_msglayout *l, upb_arena *arena,
|
7021
|
+
size_t *size);
|
7022
|
+
|
7023
|
+
UPB_END_EXTERN_C
|
7024
|
+
|
7025
|
+
#endif /* UPB_ENCODE_H_ */
|
7026
|
+
UPB_BEGIN_EXTERN_C
|
7027
|
+
|
7028
|
+
struct google_protobuf_FileDescriptorSet;
|
7029
|
+
struct google_protobuf_FileDescriptorProto;
|
7030
|
+
struct google_protobuf_DescriptorProto;
|
7031
|
+
struct google_protobuf_DescriptorProto_ExtensionRange;
|
7032
|
+
struct google_protobuf_DescriptorProto_ReservedRange;
|
7033
|
+
struct google_protobuf_ExtensionRangeOptions;
|
7034
|
+
struct google_protobuf_FieldDescriptorProto;
|
7035
|
+
struct google_protobuf_OneofDescriptorProto;
|
7036
|
+
struct google_protobuf_EnumDescriptorProto;
|
7037
|
+
struct google_protobuf_EnumDescriptorProto_EnumReservedRange;
|
7038
|
+
struct google_protobuf_EnumValueDescriptorProto;
|
7039
|
+
struct google_protobuf_ServiceDescriptorProto;
|
7040
|
+
struct google_protobuf_MethodDescriptorProto;
|
7041
|
+
struct google_protobuf_FileOptions;
|
7042
|
+
struct google_protobuf_MessageOptions;
|
7043
|
+
struct google_protobuf_FieldOptions;
|
7044
|
+
struct google_protobuf_OneofOptions;
|
7045
|
+
struct google_protobuf_EnumOptions;
|
7046
|
+
struct google_protobuf_EnumValueOptions;
|
7047
|
+
struct google_protobuf_ServiceOptions;
|
7048
|
+
struct google_protobuf_MethodOptions;
|
7049
|
+
struct google_protobuf_UninterpretedOption;
|
7050
|
+
struct google_protobuf_UninterpretedOption_NamePart;
|
7051
|
+
struct google_protobuf_SourceCodeInfo;
|
7052
|
+
struct google_protobuf_SourceCodeInfo_Location;
|
7053
|
+
struct google_protobuf_GeneratedCodeInfo;
|
7054
|
+
struct google_protobuf_GeneratedCodeInfo_Annotation;
|
7055
|
+
typedef struct google_protobuf_FileDescriptorSet google_protobuf_FileDescriptorSet;
|
7056
|
+
typedef struct google_protobuf_FileDescriptorProto google_protobuf_FileDescriptorProto;
|
7057
|
+
typedef struct google_protobuf_DescriptorProto google_protobuf_DescriptorProto;
|
7058
|
+
typedef struct google_protobuf_DescriptorProto_ExtensionRange google_protobuf_DescriptorProto_ExtensionRange;
|
7059
|
+
typedef struct google_protobuf_DescriptorProto_ReservedRange google_protobuf_DescriptorProto_ReservedRange;
|
7060
|
+
typedef struct google_protobuf_ExtensionRangeOptions google_protobuf_ExtensionRangeOptions;
|
7061
|
+
typedef struct google_protobuf_FieldDescriptorProto google_protobuf_FieldDescriptorProto;
|
7062
|
+
typedef struct google_protobuf_OneofDescriptorProto google_protobuf_OneofDescriptorProto;
|
7063
|
+
typedef struct google_protobuf_EnumDescriptorProto google_protobuf_EnumDescriptorProto;
|
7064
|
+
typedef struct google_protobuf_EnumDescriptorProto_EnumReservedRange google_protobuf_EnumDescriptorProto_EnumReservedRange;
|
7065
|
+
typedef struct google_protobuf_EnumValueDescriptorProto google_protobuf_EnumValueDescriptorProto;
|
7066
|
+
typedef struct google_protobuf_ServiceDescriptorProto google_protobuf_ServiceDescriptorProto;
|
7067
|
+
typedef struct google_protobuf_MethodDescriptorProto google_protobuf_MethodDescriptorProto;
|
7068
|
+
typedef struct google_protobuf_FileOptions google_protobuf_FileOptions;
|
7069
|
+
typedef struct google_protobuf_MessageOptions google_protobuf_MessageOptions;
|
7070
|
+
typedef struct google_protobuf_FieldOptions google_protobuf_FieldOptions;
|
7071
|
+
typedef struct google_protobuf_OneofOptions google_protobuf_OneofOptions;
|
7072
|
+
typedef struct google_protobuf_EnumOptions google_protobuf_EnumOptions;
|
7073
|
+
typedef struct google_protobuf_EnumValueOptions google_protobuf_EnumValueOptions;
|
7074
|
+
typedef struct google_protobuf_ServiceOptions google_protobuf_ServiceOptions;
|
7075
|
+
typedef struct google_protobuf_MethodOptions google_protobuf_MethodOptions;
|
7076
|
+
typedef struct google_protobuf_UninterpretedOption google_protobuf_UninterpretedOption;
|
7077
|
+
typedef struct google_protobuf_UninterpretedOption_NamePart google_protobuf_UninterpretedOption_NamePart;
|
7078
|
+
typedef struct google_protobuf_SourceCodeInfo google_protobuf_SourceCodeInfo;
|
7079
|
+
typedef struct google_protobuf_SourceCodeInfo_Location google_protobuf_SourceCodeInfo_Location;
|
7080
|
+
typedef struct google_protobuf_GeneratedCodeInfo google_protobuf_GeneratedCodeInfo;
|
7081
|
+
typedef struct google_protobuf_GeneratedCodeInfo_Annotation google_protobuf_GeneratedCodeInfo_Annotation;
|
7082
|
+
extern const upb_msglayout google_protobuf_FileDescriptorSet_msginit;
|
7083
|
+
extern const upb_msglayout google_protobuf_FileDescriptorProto_msginit;
|
7084
|
+
extern const upb_msglayout google_protobuf_DescriptorProto_msginit;
|
7085
|
+
extern const upb_msglayout google_protobuf_DescriptorProto_ExtensionRange_msginit;
|
7086
|
+
extern const upb_msglayout google_protobuf_DescriptorProto_ReservedRange_msginit;
|
7087
|
+
extern const upb_msglayout google_protobuf_ExtensionRangeOptions_msginit;
|
7088
|
+
extern const upb_msglayout google_protobuf_FieldDescriptorProto_msginit;
|
7089
|
+
extern const upb_msglayout google_protobuf_OneofDescriptorProto_msginit;
|
7090
|
+
extern const upb_msglayout google_protobuf_EnumDescriptorProto_msginit;
|
7091
|
+
extern const upb_msglayout google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit;
|
7092
|
+
extern const upb_msglayout google_protobuf_EnumValueDescriptorProto_msginit;
|
7093
|
+
extern const upb_msglayout google_protobuf_ServiceDescriptorProto_msginit;
|
7094
|
+
extern const upb_msglayout google_protobuf_MethodDescriptorProto_msginit;
|
7095
|
+
extern const upb_msglayout google_protobuf_FileOptions_msginit;
|
7096
|
+
extern const upb_msglayout google_protobuf_MessageOptions_msginit;
|
7097
|
+
extern const upb_msglayout google_protobuf_FieldOptions_msginit;
|
7098
|
+
extern const upb_msglayout google_protobuf_OneofOptions_msginit;
|
7099
|
+
extern const upb_msglayout google_protobuf_EnumOptions_msginit;
|
7100
|
+
extern const upb_msglayout google_protobuf_EnumValueOptions_msginit;
|
7101
|
+
extern const upb_msglayout google_protobuf_ServiceOptions_msginit;
|
7102
|
+
extern const upb_msglayout google_protobuf_MethodOptions_msginit;
|
7103
|
+
extern const upb_msglayout google_protobuf_UninterpretedOption_msginit;
|
7104
|
+
extern const upb_msglayout google_protobuf_UninterpretedOption_NamePart_msginit;
|
7105
|
+
extern const upb_msglayout google_protobuf_SourceCodeInfo_msginit;
|
7106
|
+
extern const upb_msglayout google_protobuf_SourceCodeInfo_Location_msginit;
|
7107
|
+
extern const upb_msglayout google_protobuf_GeneratedCodeInfo_msginit;
|
7108
|
+
extern const upb_msglayout google_protobuf_GeneratedCodeInfo_Annotation_msginit;
|
7109
|
+
|
7110
|
+
/* Enums */
|
7111
|
+
|
7112
|
+
typedef enum {
|
7113
|
+
google_protobuf_FieldDescriptorProto_LABEL_OPTIONAL = 1,
|
7114
|
+
google_protobuf_FieldDescriptorProto_LABEL_REQUIRED = 2,
|
7115
|
+
google_protobuf_FieldDescriptorProto_LABEL_REPEATED = 3
|
7116
|
+
} google_protobuf_FieldDescriptorProto_Label;
|
7117
|
+
|
7118
|
+
typedef enum {
|
7119
|
+
google_protobuf_FieldDescriptorProto_TYPE_DOUBLE = 1,
|
7120
|
+
google_protobuf_FieldDescriptorProto_TYPE_FLOAT = 2,
|
7121
|
+
google_protobuf_FieldDescriptorProto_TYPE_INT64 = 3,
|
7122
|
+
google_protobuf_FieldDescriptorProto_TYPE_UINT64 = 4,
|
7123
|
+
google_protobuf_FieldDescriptorProto_TYPE_INT32 = 5,
|
7124
|
+
google_protobuf_FieldDescriptorProto_TYPE_FIXED64 = 6,
|
7125
|
+
google_protobuf_FieldDescriptorProto_TYPE_FIXED32 = 7,
|
7126
|
+
google_protobuf_FieldDescriptorProto_TYPE_BOOL = 8,
|
7127
|
+
google_protobuf_FieldDescriptorProto_TYPE_STRING = 9,
|
7128
|
+
google_protobuf_FieldDescriptorProto_TYPE_GROUP = 10,
|
7129
|
+
google_protobuf_FieldDescriptorProto_TYPE_MESSAGE = 11,
|
7130
|
+
google_protobuf_FieldDescriptorProto_TYPE_BYTES = 12,
|
7131
|
+
google_protobuf_FieldDescriptorProto_TYPE_UINT32 = 13,
|
7132
|
+
google_protobuf_FieldDescriptorProto_TYPE_ENUM = 14,
|
7133
|
+
google_protobuf_FieldDescriptorProto_TYPE_SFIXED32 = 15,
|
7134
|
+
google_protobuf_FieldDescriptorProto_TYPE_SFIXED64 = 16,
|
7135
|
+
google_protobuf_FieldDescriptorProto_TYPE_SINT32 = 17,
|
7136
|
+
google_protobuf_FieldDescriptorProto_TYPE_SINT64 = 18
|
7137
|
+
} google_protobuf_FieldDescriptorProto_Type;
|
7138
|
+
|
7139
|
+
typedef enum {
|
7140
|
+
google_protobuf_FieldOptions_STRING = 0,
|
7141
|
+
google_protobuf_FieldOptions_CORD = 1,
|
7142
|
+
google_protobuf_FieldOptions_STRING_PIECE = 2
|
7143
|
+
} google_protobuf_FieldOptions_CType;
|
7144
|
+
|
7145
|
+
typedef enum {
|
7146
|
+
google_protobuf_FieldOptions_JS_NORMAL = 0,
|
7147
|
+
google_protobuf_FieldOptions_JS_STRING = 1,
|
7148
|
+
google_protobuf_FieldOptions_JS_NUMBER = 2
|
7149
|
+
} google_protobuf_FieldOptions_JSType;
|
7150
|
+
|
7151
|
+
typedef enum {
|
7152
|
+
google_protobuf_FileOptions_SPEED = 1,
|
7153
|
+
google_protobuf_FileOptions_CODE_SIZE = 2,
|
7154
|
+
google_protobuf_FileOptions_LITE_RUNTIME = 3
|
7155
|
+
} google_protobuf_FileOptions_OptimizeMode;
|
7156
|
+
|
7157
|
+
typedef enum {
|
7158
|
+
google_protobuf_MethodOptions_IDEMPOTENCY_UNKNOWN = 0,
|
7159
|
+
google_protobuf_MethodOptions_NO_SIDE_EFFECTS = 1,
|
7160
|
+
google_protobuf_MethodOptions_IDEMPOTENT = 2
|
7161
|
+
} google_protobuf_MethodOptions_IdempotencyLevel;
|
7162
|
+
|
7163
|
+
/* google.protobuf.FileDescriptorSet */
|
7164
|
+
|
7165
|
+
UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_new(upb_arena *arena) {
|
7166
|
+
return (google_protobuf_FileDescriptorSet *)upb_msg_new(&google_protobuf_FileDescriptorSet_msginit, arena);
|
7167
|
+
}
|
7168
|
+
UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_parsenew(upb_strview buf, upb_arena *arena) {
|
7169
|
+
google_protobuf_FileDescriptorSet *ret = google_protobuf_FileDescriptorSet_new(arena);
|
7170
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_FileDescriptorSet_msginit)) ? ret : NULL;
|
7171
|
+
}
|
7172
|
+
UPB_INLINE char *google_protobuf_FileDescriptorSet_serialize(const google_protobuf_FileDescriptorSet *msg, upb_arena *arena, size_t *len) {
|
7173
|
+
return upb_encode(msg, &google_protobuf_FileDescriptorSet_msginit, arena, len);
|
7174
|
+
}
|
7175
|
+
|
7176
|
+
UPB_INLINE const google_protobuf_FileDescriptorProto* const* google_protobuf_FileDescriptorSet_file(const google_protobuf_FileDescriptorSet *msg, size_t *len) { return (const google_protobuf_FileDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
|
7177
|
+
|
7178
|
+
UPB_INLINE google_protobuf_FileDescriptorProto** google_protobuf_FileDescriptorSet_mutable_file(google_protobuf_FileDescriptorSet *msg, size_t *len) {
|
7179
|
+
return (google_protobuf_FileDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
|
7180
|
+
}
|
7181
|
+
UPB_INLINE google_protobuf_FileDescriptorProto** google_protobuf_FileDescriptorSet_resize_file(google_protobuf_FileDescriptorSet *msg, size_t len, upb_arena *arena) {
|
7182
|
+
return (google_protobuf_FileDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
7183
|
+
}
|
7184
|
+
UPB_INLINE struct google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorSet_add_file(google_protobuf_FileDescriptorSet *msg, upb_arena *arena) {
|
7185
|
+
struct google_protobuf_FileDescriptorProto* sub = (struct google_protobuf_FileDescriptorProto*)upb_msg_new(&google_protobuf_FileDescriptorProto_msginit, arena);
|
7186
|
+
bool ok = _upb_array_append_accessor(
|
7187
|
+
msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
7188
|
+
if (!ok) return NULL;
|
7189
|
+
return sub;
|
7190
|
+
}
|
7191
|
+
|
7192
|
+
|
7193
|
+
/* google.protobuf.FileDescriptorProto */
|
7194
|
+
|
7195
|
+
UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_new(upb_arena *arena) {
|
7196
|
+
return (google_protobuf_FileDescriptorProto *)upb_msg_new(&google_protobuf_FileDescriptorProto_msginit, arena);
|
7197
|
+
}
|
7198
|
+
UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_parsenew(upb_strview buf, upb_arena *arena) {
|
7199
|
+
google_protobuf_FileDescriptorProto *ret = google_protobuf_FileDescriptorProto_new(arena);
|
7200
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_FileDescriptorProto_msginit)) ? ret : NULL;
|
7201
|
+
}
|
7202
|
+
UPB_INLINE char *google_protobuf_FileDescriptorProto_serialize(const google_protobuf_FileDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
7203
|
+
return upb_encode(msg, &google_protobuf_FileDescriptorProto_msginit, arena, len);
|
7204
|
+
}
|
7205
|
+
|
7206
|
+
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_name(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_field(msg, 0); }
|
7207
|
+
UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_name(const google_protobuf_FileDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); }
|
7208
|
+
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_package(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_field(msg, 1); }
|
7209
|
+
UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_package(const google_protobuf_FileDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)); }
|
7210
|
+
UPB_INLINE upb_strview const* google_protobuf_FileDescriptorProto_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); }
|
7211
|
+
UPB_INLINE const google_protobuf_DescriptorProto* const* google_protobuf_FileDescriptorProto_message_type(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (const google_protobuf_DescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); }
|
7212
|
+
UPB_INLINE const google_protobuf_EnumDescriptorProto* const* google_protobuf_FileDescriptorProto_enum_type(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (const google_protobuf_EnumDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(44, 88), len); }
|
7213
|
+
UPB_INLINE const google_protobuf_ServiceDescriptorProto* const* google_protobuf_FileDescriptorProto_service(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (const google_protobuf_ServiceDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(48, 96), len); }
|
7214
|
+
UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_FileDescriptorProto_extension(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(52, 104), len); }
|
7215
|
+
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_options(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_field(msg, 3); }
|
7216
|
+
UPB_INLINE const google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_options(const google_protobuf_FileDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_FileOptions*, UPB_SIZE(28, 56)); }
|
7217
|
+
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_source_code_info(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_field(msg, 4); }
|
7218
|
+
UPB_INLINE const google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_source_code_info(const google_protobuf_FileDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_SourceCodeInfo*, UPB_SIZE(32, 64)); }
|
7219
|
+
UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_public_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(56, 112), len); }
|
7220
|
+
UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_weak_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(60, 120), len); }
|
7221
|
+
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_syntax(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_field(msg, 2); }
|
7222
|
+
UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_syntax(const google_protobuf_FileDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 40)); }
|
7223
|
+
|
7224
|
+
UPB_INLINE void google_protobuf_FileDescriptorProto_set_name(google_protobuf_FileDescriptorProto *msg, upb_strview value) {
|
7225
|
+
_upb_sethas(msg, 0);
|
7226
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value;
|
7227
|
+
}
|
7228
|
+
UPB_INLINE void google_protobuf_FileDescriptorProto_set_package(google_protobuf_FileDescriptorProto *msg, upb_strview value) {
|
7229
|
+
_upb_sethas(msg, 1);
|
7230
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)) = value;
|
7231
|
+
}
|
7232
|
+
UPB_INLINE upb_strview* google_protobuf_FileDescriptorProto_mutable_dependency(google_protobuf_FileDescriptorProto *msg, size_t *len) {
|
7233
|
+
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len);
|
7234
|
+
}
|
7235
|
+
UPB_INLINE upb_strview* google_protobuf_FileDescriptorProto_resize_dependency(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) {
|
7236
|
+
return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(36, 72), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena);
|
7237
|
+
}
|
7238
|
+
UPB_INLINE bool google_protobuf_FileDescriptorProto_add_dependency(google_protobuf_FileDescriptorProto *msg, upb_strview val, upb_arena *arena) {
|
7239
|
+
return _upb_array_append_accessor(
|
7240
|
+
msg, UPB_SIZE(36, 72), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena);
|
7241
|
+
}
|
7242
|
+
UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_FileDescriptorProto_mutable_message_type(google_protobuf_FileDescriptorProto *msg, size_t *len) {
|
7243
|
+
return (google_protobuf_DescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len);
|
7244
|
+
}
|
7245
|
+
UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_FileDescriptorProto_resize_message_type(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) {
|
7246
|
+
return (google_protobuf_DescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
7247
|
+
}
|
7248
|
+
UPB_INLINE struct google_protobuf_DescriptorProto* google_protobuf_FileDescriptorProto_add_message_type(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) {
|
7249
|
+
struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)upb_msg_new(&google_protobuf_DescriptorProto_msginit, arena);
|
7250
|
+
bool ok = _upb_array_append_accessor(
|
7251
|
+
msg, UPB_SIZE(40, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
7252
|
+
if (!ok) return NULL;
|
7253
|
+
return sub;
|
7254
|
+
}
|
7255
|
+
UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_FileDescriptorProto_mutable_enum_type(google_protobuf_FileDescriptorProto *msg, size_t *len) {
|
7256
|
+
return (google_protobuf_EnumDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 88), len);
|
7257
|
+
}
|
7258
|
+
UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_FileDescriptorProto_resize_enum_type(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) {
|
7259
|
+
return (google_protobuf_EnumDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(44, 88), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
7260
|
+
}
|
7261
|
+
UPB_INLINE struct google_protobuf_EnumDescriptorProto* google_protobuf_FileDescriptorProto_add_enum_type(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) {
|
7262
|
+
struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)upb_msg_new(&google_protobuf_EnumDescriptorProto_msginit, arena);
|
7263
|
+
bool ok = _upb_array_append_accessor(
|
7264
|
+
msg, UPB_SIZE(44, 88), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
7265
|
+
if (!ok) return NULL;
|
7266
|
+
return sub;
|
7267
|
+
}
|
7268
|
+
UPB_INLINE google_protobuf_ServiceDescriptorProto** google_protobuf_FileDescriptorProto_mutable_service(google_protobuf_FileDescriptorProto *msg, size_t *len) {
|
7269
|
+
return (google_protobuf_ServiceDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 96), len);
|
7270
|
+
}
|
7271
|
+
UPB_INLINE google_protobuf_ServiceDescriptorProto** google_protobuf_FileDescriptorProto_resize_service(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) {
|
7272
|
+
return (google_protobuf_ServiceDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(48, 96), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
7273
|
+
}
|
7274
|
+
UPB_INLINE struct google_protobuf_ServiceDescriptorProto* google_protobuf_FileDescriptorProto_add_service(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) {
|
7275
|
+
struct google_protobuf_ServiceDescriptorProto* sub = (struct google_protobuf_ServiceDescriptorProto*)upb_msg_new(&google_protobuf_ServiceDescriptorProto_msginit, arena);
|
7276
|
+
bool ok = _upb_array_append_accessor(
|
7277
|
+
msg, UPB_SIZE(48, 96), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
7278
|
+
if (!ok) return NULL;
|
7279
|
+
return sub;
|
7280
|
+
}
|
7281
|
+
UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_FileDescriptorProto_mutable_extension(google_protobuf_FileDescriptorProto *msg, size_t *len) {
|
7282
|
+
return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 104), len);
|
7283
|
+
}
|
7284
|
+
UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_FileDescriptorProto_resize_extension(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) {
|
7285
|
+
return (google_protobuf_FieldDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(52, 104), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
7286
|
+
}
|
7287
|
+
UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_FileDescriptorProto_add_extension(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) {
|
7288
|
+
struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena);
|
7289
|
+
bool ok = _upb_array_append_accessor(
|
7290
|
+
msg, UPB_SIZE(52, 104), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
7291
|
+
if (!ok) return NULL;
|
7292
|
+
return sub;
|
7293
|
+
}
|
7294
|
+
UPB_INLINE void google_protobuf_FileDescriptorProto_set_options(google_protobuf_FileDescriptorProto *msg, google_protobuf_FileOptions* value) {
|
7295
|
+
_upb_sethas(msg, 3);
|
7296
|
+
UPB_FIELD_AT(msg, google_protobuf_FileOptions*, UPB_SIZE(28, 56)) = value;
|
7297
|
+
}
|
7298
|
+
UPB_INLINE struct google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_mutable_options(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) {
|
7299
|
+
struct google_protobuf_FileOptions* sub = (struct google_protobuf_FileOptions*)google_protobuf_FileDescriptorProto_options(msg);
|
7300
|
+
if (sub == NULL) {
|
7301
|
+
sub = (struct google_protobuf_FileOptions*)upb_msg_new(&google_protobuf_FileOptions_msginit, arena);
|
7302
|
+
if (!sub) return NULL;
|
7303
|
+
google_protobuf_FileDescriptorProto_set_options(msg, sub);
|
7304
|
+
}
|
7305
|
+
return sub;
|
7306
|
+
}
|
7307
|
+
UPB_INLINE void google_protobuf_FileDescriptorProto_set_source_code_info(google_protobuf_FileDescriptorProto *msg, google_protobuf_SourceCodeInfo* value) {
|
7308
|
+
_upb_sethas(msg, 4);
|
7309
|
+
UPB_FIELD_AT(msg, google_protobuf_SourceCodeInfo*, UPB_SIZE(32, 64)) = value;
|
7310
|
+
}
|
7311
|
+
UPB_INLINE struct google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_mutable_source_code_info(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) {
|
7312
|
+
struct google_protobuf_SourceCodeInfo* sub = (struct google_protobuf_SourceCodeInfo*)google_protobuf_FileDescriptorProto_source_code_info(msg);
|
7313
|
+
if (sub == NULL) {
|
7314
|
+
sub = (struct google_protobuf_SourceCodeInfo*)upb_msg_new(&google_protobuf_SourceCodeInfo_msginit, arena);
|
7315
|
+
if (!sub) return NULL;
|
7316
|
+
google_protobuf_FileDescriptorProto_set_source_code_info(msg, sub);
|
7317
|
+
}
|
7318
|
+
return sub;
|
7319
|
+
}
|
7320
|
+
UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_mutable_public_dependency(google_protobuf_FileDescriptorProto *msg, size_t *len) {
|
7321
|
+
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(56, 112), len);
|
7322
|
+
}
|
7323
|
+
UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_resize_public_dependency(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) {
|
7324
|
+
return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(56, 112), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena);
|
7325
|
+
}
|
7326
|
+
UPB_INLINE bool google_protobuf_FileDescriptorProto_add_public_dependency(google_protobuf_FileDescriptorProto *msg, int32_t val, upb_arena *arena) {
|
7327
|
+
return _upb_array_append_accessor(
|
7328
|
+
msg, UPB_SIZE(56, 112), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena);
|
7329
|
+
}
|
7330
|
+
UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_mutable_weak_dependency(google_protobuf_FileDescriptorProto *msg, size_t *len) {
|
7331
|
+
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(60, 120), len);
|
7332
|
+
}
|
7333
|
+
UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_resize_weak_dependency(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) {
|
7334
|
+
return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(60, 120), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena);
|
7335
|
+
}
|
7336
|
+
UPB_INLINE bool google_protobuf_FileDescriptorProto_add_weak_dependency(google_protobuf_FileDescriptorProto *msg, int32_t val, upb_arena *arena) {
|
7337
|
+
return _upb_array_append_accessor(
|
7338
|
+
msg, UPB_SIZE(60, 120), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena);
|
7339
|
+
}
|
7340
|
+
UPB_INLINE void google_protobuf_FileDescriptorProto_set_syntax(google_protobuf_FileDescriptorProto *msg, upb_strview value) {
|
7341
|
+
_upb_sethas(msg, 2);
|
7342
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 40)) = value;
|
7343
|
+
}
|
7344
|
+
|
7345
|
+
|
7346
|
+
/* google.protobuf.DescriptorProto */
|
7347
|
+
|
7348
|
+
UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_new(upb_arena *arena) {
|
7349
|
+
return (google_protobuf_DescriptorProto *)upb_msg_new(&google_protobuf_DescriptorProto_msginit, arena);
|
7350
|
+
}
|
7351
|
+
UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_parsenew(upb_strview buf, upb_arena *arena) {
|
7352
|
+
google_protobuf_DescriptorProto *ret = google_protobuf_DescriptorProto_new(arena);
|
7353
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_DescriptorProto_msginit)) ? ret : NULL;
|
7354
|
+
}
|
7355
|
+
UPB_INLINE char *google_protobuf_DescriptorProto_serialize(const google_protobuf_DescriptorProto *msg, upb_arena *arena, size_t *len) {
|
7356
|
+
return upb_encode(msg, &google_protobuf_DescriptorProto_msginit, arena, len);
|
7357
|
+
}
|
7358
|
+
|
7359
|
+
UPB_INLINE bool google_protobuf_DescriptorProto_has_name(const google_protobuf_DescriptorProto *msg) { return _upb_has_field(msg, 0); }
|
7360
|
+
UPB_INLINE upb_strview google_protobuf_DescriptorProto_name(const google_protobuf_DescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); }
|
7361
|
+
UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_DescriptorProto_field(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
|
7362
|
+
UPB_INLINE const google_protobuf_DescriptorProto* const* google_protobuf_DescriptorProto_nested_type(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_DescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); }
|
7363
|
+
UPB_INLINE const google_protobuf_EnumDescriptorProto* const* google_protobuf_DescriptorProto_enum_type(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_EnumDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); }
|
7364
|
+
UPB_INLINE const google_protobuf_DescriptorProto_ExtensionRange* const* google_protobuf_DescriptorProto_extension_range(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_DescriptorProto_ExtensionRange* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); }
|
7365
|
+
UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_DescriptorProto_extension(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); }
|
7366
|
+
UPB_INLINE bool google_protobuf_DescriptorProto_has_options(const google_protobuf_DescriptorProto *msg) { return _upb_has_field(msg, 1); }
|
7367
|
+
UPB_INLINE const google_protobuf_MessageOptions* google_protobuf_DescriptorProto_options(const google_protobuf_DescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_MessageOptions*, UPB_SIZE(12, 24)); }
|
7368
|
+
UPB_INLINE const google_protobuf_OneofDescriptorProto* const* google_protobuf_DescriptorProto_oneof_decl(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_OneofDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); }
|
7369
|
+
UPB_INLINE const google_protobuf_DescriptorProto_ReservedRange* const* google_protobuf_DescriptorProto_reserved_range(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_DescriptorProto_ReservedRange* const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); }
|
7370
|
+
UPB_INLINE upb_strview const* google_protobuf_DescriptorProto_reserved_name(const google_protobuf_DescriptorProto *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(44, 88), len); }
|
7371
|
+
|
7372
|
+
UPB_INLINE void google_protobuf_DescriptorProto_set_name(google_protobuf_DescriptorProto *msg, upb_strview value) {
|
7373
|
+
_upb_sethas(msg, 0);
|
7374
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value;
|
7375
|
+
}
|
7376
|
+
UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_mutable_field(google_protobuf_DescriptorProto *msg, size_t *len) {
|
7377
|
+
return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
|
7378
|
+
}
|
7379
|
+
UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_resize_field(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) {
|
7380
|
+
return (google_protobuf_FieldDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
7381
|
+
}
|
7382
|
+
UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_DescriptorProto_add_field(google_protobuf_DescriptorProto *msg, upb_arena *arena) {
|
7383
|
+
struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena);
|
7384
|
+
bool ok = _upb_array_append_accessor(
|
7385
|
+
msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
7386
|
+
if (!ok) return NULL;
|
7387
|
+
return sub;
|
7388
|
+
}
|
7389
|
+
UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_DescriptorProto_mutable_nested_type(google_protobuf_DescriptorProto *msg, size_t *len) {
|
7390
|
+
return (google_protobuf_DescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
|
7391
|
+
}
|
7392
|
+
UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_DescriptorProto_resize_nested_type(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) {
|
7393
|
+
return (google_protobuf_DescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
7394
|
+
}
|
7395
|
+
UPB_INLINE struct google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_add_nested_type(google_protobuf_DescriptorProto *msg, upb_arena *arena) {
|
7396
|
+
struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)upb_msg_new(&google_protobuf_DescriptorProto_msginit, arena);
|
7397
|
+
bool ok = _upb_array_append_accessor(
|
7398
|
+
msg, UPB_SIZE(20, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
7399
|
+
if (!ok) return NULL;
|
7400
|
+
return sub;
|
7401
|
+
}
|
7402
|
+
UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_DescriptorProto_mutable_enum_type(google_protobuf_DescriptorProto *msg, size_t *len) {
|
7403
|
+
return (google_protobuf_EnumDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
|
7404
|
+
}
|
7405
|
+
UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_DescriptorProto_resize_enum_type(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) {
|
7406
|
+
return (google_protobuf_EnumDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
7407
|
+
}
|
7408
|
+
UPB_INLINE struct google_protobuf_EnumDescriptorProto* google_protobuf_DescriptorProto_add_enum_type(google_protobuf_DescriptorProto *msg, upb_arena *arena) {
|
7409
|
+
struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)upb_msg_new(&google_protobuf_EnumDescriptorProto_msginit, arena);
|
7410
|
+
bool ok = _upb_array_append_accessor(
|
7411
|
+
msg, UPB_SIZE(24, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
7412
|
+
if (!ok) return NULL;
|
7413
|
+
return sub;
|
7414
|
+
}
|
7415
|
+
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange** google_protobuf_DescriptorProto_mutable_extension_range(google_protobuf_DescriptorProto *msg, size_t *len) {
|
7416
|
+
return (google_protobuf_DescriptorProto_ExtensionRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
|
7417
|
+
}
|
7418
|
+
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange** google_protobuf_DescriptorProto_resize_extension_range(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) {
|
7419
|
+
return (google_protobuf_DescriptorProto_ExtensionRange**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
7420
|
+
}
|
7421
|
+
UPB_INLINE struct google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_add_extension_range(google_protobuf_DescriptorProto *msg, upb_arena *arena) {
|
7422
|
+
struct google_protobuf_DescriptorProto_ExtensionRange* sub = (struct google_protobuf_DescriptorProto_ExtensionRange*)upb_msg_new(&google_protobuf_DescriptorProto_ExtensionRange_msginit, arena);
|
7423
|
+
bool ok = _upb_array_append_accessor(
|
7424
|
+
msg, UPB_SIZE(28, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
7425
|
+
if (!ok) return NULL;
|
7426
|
+
return sub;
|
7427
|
+
}
|
7428
|
+
UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_mutable_extension(google_protobuf_DescriptorProto *msg, size_t *len) {
|
7429
|
+
return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len);
|
7430
|
+
}
|
7431
|
+
UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_resize_extension(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) {
|
7432
|
+
return (google_protobuf_FieldDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
7433
|
+
}
|
7434
|
+
UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_DescriptorProto_add_extension(google_protobuf_DescriptorProto *msg, upb_arena *arena) {
|
7435
|
+
struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena);
|
7436
|
+
bool ok = _upb_array_append_accessor(
|
7437
|
+
msg, UPB_SIZE(32, 64), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
7438
|
+
if (!ok) return NULL;
|
7439
|
+
return sub;
|
7440
|
+
}
|
7441
|
+
UPB_INLINE void google_protobuf_DescriptorProto_set_options(google_protobuf_DescriptorProto *msg, google_protobuf_MessageOptions* value) {
|
7442
|
+
_upb_sethas(msg, 1);
|
7443
|
+
UPB_FIELD_AT(msg, google_protobuf_MessageOptions*, UPB_SIZE(12, 24)) = value;
|
7444
|
+
}
|
7445
|
+
UPB_INLINE struct google_protobuf_MessageOptions* google_protobuf_DescriptorProto_mutable_options(google_protobuf_DescriptorProto *msg, upb_arena *arena) {
|
7446
|
+
struct google_protobuf_MessageOptions* sub = (struct google_protobuf_MessageOptions*)google_protobuf_DescriptorProto_options(msg);
|
7447
|
+
if (sub == NULL) {
|
7448
|
+
sub = (struct google_protobuf_MessageOptions*)upb_msg_new(&google_protobuf_MessageOptions_msginit, arena);
|
7449
|
+
if (!sub) return NULL;
|
7450
|
+
google_protobuf_DescriptorProto_set_options(msg, sub);
|
7451
|
+
}
|
7452
|
+
return sub;
|
7453
|
+
}
|
7454
|
+
UPB_INLINE google_protobuf_OneofDescriptorProto** google_protobuf_DescriptorProto_mutable_oneof_decl(google_protobuf_DescriptorProto *msg, size_t *len) {
|
7455
|
+
return (google_protobuf_OneofDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len);
|
7456
|
+
}
|
7457
|
+
UPB_INLINE google_protobuf_OneofDescriptorProto** google_protobuf_DescriptorProto_resize_oneof_decl(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) {
|
7458
|
+
return (google_protobuf_OneofDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 72), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
7459
|
+
}
|
7460
|
+
UPB_INLINE struct google_protobuf_OneofDescriptorProto* google_protobuf_DescriptorProto_add_oneof_decl(google_protobuf_DescriptorProto *msg, upb_arena *arena) {
|
7461
|
+
struct google_protobuf_OneofDescriptorProto* sub = (struct google_protobuf_OneofDescriptorProto*)upb_msg_new(&google_protobuf_OneofDescriptorProto_msginit, arena);
|
7462
|
+
bool ok = _upb_array_append_accessor(
|
7463
|
+
msg, UPB_SIZE(36, 72), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
7464
|
+
if (!ok) return NULL;
|
7465
|
+
return sub;
|
7466
|
+
}
|
7467
|
+
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange** google_protobuf_DescriptorProto_mutable_reserved_range(google_protobuf_DescriptorProto *msg, size_t *len) {
|
7468
|
+
return (google_protobuf_DescriptorProto_ReservedRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len);
|
7469
|
+
}
|
7470
|
+
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange** google_protobuf_DescriptorProto_resize_reserved_range(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) {
|
7471
|
+
return (google_protobuf_DescriptorProto_ReservedRange**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
7472
|
+
}
|
7473
|
+
UPB_INLINE struct google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_add_reserved_range(google_protobuf_DescriptorProto *msg, upb_arena *arena) {
|
7474
|
+
struct google_protobuf_DescriptorProto_ReservedRange* sub = (struct google_protobuf_DescriptorProto_ReservedRange*)upb_msg_new(&google_protobuf_DescriptorProto_ReservedRange_msginit, arena);
|
7475
|
+
bool ok = _upb_array_append_accessor(
|
7476
|
+
msg, UPB_SIZE(40, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
7477
|
+
if (!ok) return NULL;
|
7478
|
+
return sub;
|
7479
|
+
}
|
7480
|
+
UPB_INLINE upb_strview* google_protobuf_DescriptorProto_mutable_reserved_name(google_protobuf_DescriptorProto *msg, size_t *len) {
|
7481
|
+
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 88), len);
|
7482
|
+
}
|
7483
|
+
UPB_INLINE upb_strview* google_protobuf_DescriptorProto_resize_reserved_name(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) {
|
7484
|
+
return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(44, 88), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena);
|
7485
|
+
}
|
7486
|
+
UPB_INLINE bool google_protobuf_DescriptorProto_add_reserved_name(google_protobuf_DescriptorProto *msg, upb_strview val, upb_arena *arena) {
|
7487
|
+
return _upb_array_append_accessor(
|
7488
|
+
msg, UPB_SIZE(44, 88), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena);
|
7489
|
+
}
|
7490
|
+
|
7491
|
+
|
7492
|
+
/* google.protobuf.DescriptorProto.ExtensionRange */
|
7493
|
+
|
7494
|
+
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_new(upb_arena *arena) {
|
7495
|
+
return (google_protobuf_DescriptorProto_ExtensionRange *)upb_msg_new(&google_protobuf_DescriptorProto_ExtensionRange_msginit, arena);
|
7496
|
+
}
|
7497
|
+
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_parsenew(upb_strview buf, upb_arena *arena) {
|
7498
|
+
google_protobuf_DescriptorProto_ExtensionRange *ret = google_protobuf_DescriptorProto_ExtensionRange_new(arena);
|
7499
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_DescriptorProto_ExtensionRange_msginit)) ? ret : NULL;
|
7500
|
+
}
|
7501
|
+
UPB_INLINE char *google_protobuf_DescriptorProto_ExtensionRange_serialize(const google_protobuf_DescriptorProto_ExtensionRange *msg, upb_arena *arena, size_t *len) {
|
7502
|
+
return upb_encode(msg, &google_protobuf_DescriptorProto_ExtensionRange_msginit, arena, len);
|
7503
|
+
}
|
7504
|
+
|
7505
|
+
UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_start(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_has_field(msg, 0); }
|
7506
|
+
UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_start(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); }
|
7507
|
+
UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_end(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_has_field(msg, 1); }
|
7508
|
+
UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_end(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); }
|
7509
|
+
UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_options(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_has_field(msg, 2); }
|
7510
|
+
UPB_INLINE const google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_options(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return UPB_FIELD_AT(msg, const google_protobuf_ExtensionRangeOptions*, UPB_SIZE(12, 16)); }
|
7511
|
+
|
7512
|
+
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_start(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) {
|
7513
|
+
_upb_sethas(msg, 0);
|
7514
|
+
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value;
|
7515
|
+
}
|
7516
|
+
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_end(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) {
|
7517
|
+
_upb_sethas(msg, 1);
|
7518
|
+
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value;
|
7519
|
+
}
|
7520
|
+
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_options(google_protobuf_DescriptorProto_ExtensionRange *msg, google_protobuf_ExtensionRangeOptions* value) {
|
7521
|
+
_upb_sethas(msg, 2);
|
7522
|
+
UPB_FIELD_AT(msg, google_protobuf_ExtensionRangeOptions*, UPB_SIZE(12, 16)) = value;
|
7523
|
+
}
|
7524
|
+
UPB_INLINE struct google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_mutable_options(google_protobuf_DescriptorProto_ExtensionRange *msg, upb_arena *arena) {
|
7525
|
+
struct google_protobuf_ExtensionRangeOptions* sub = (struct google_protobuf_ExtensionRangeOptions*)google_protobuf_DescriptorProto_ExtensionRange_options(msg);
|
7526
|
+
if (sub == NULL) {
|
7527
|
+
sub = (struct google_protobuf_ExtensionRangeOptions*)upb_msg_new(&google_protobuf_ExtensionRangeOptions_msginit, arena);
|
7528
|
+
if (!sub) return NULL;
|
7529
|
+
google_protobuf_DescriptorProto_ExtensionRange_set_options(msg, sub);
|
7530
|
+
}
|
7531
|
+
return sub;
|
7532
|
+
}
|
7533
|
+
|
7534
|
+
|
7535
|
+
/* google.protobuf.DescriptorProto.ReservedRange */
|
7536
|
+
|
7537
|
+
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_new(upb_arena *arena) {
|
7538
|
+
return (google_protobuf_DescriptorProto_ReservedRange *)upb_msg_new(&google_protobuf_DescriptorProto_ReservedRange_msginit, arena);
|
7539
|
+
}
|
7540
|
+
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_parsenew(upb_strview buf, upb_arena *arena) {
|
7541
|
+
google_protobuf_DescriptorProto_ReservedRange *ret = google_protobuf_DescriptorProto_ReservedRange_new(arena);
|
7542
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_DescriptorProto_ReservedRange_msginit)) ? ret : NULL;
|
7543
|
+
}
|
7544
|
+
UPB_INLINE char *google_protobuf_DescriptorProto_ReservedRange_serialize(const google_protobuf_DescriptorProto_ReservedRange *msg, upb_arena *arena, size_t *len) {
|
7545
|
+
return upb_encode(msg, &google_protobuf_DescriptorProto_ReservedRange_msginit, arena, len);
|
7546
|
+
}
|
7547
|
+
|
7548
|
+
UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_start(const google_protobuf_DescriptorProto_ReservedRange *msg) { return _upb_has_field(msg, 0); }
|
7549
|
+
UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_start(const google_protobuf_DescriptorProto_ReservedRange *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); }
|
7550
|
+
UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_end(const google_protobuf_DescriptorProto_ReservedRange *msg) { return _upb_has_field(msg, 1); }
|
7551
|
+
UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_end(const google_protobuf_DescriptorProto_ReservedRange *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); }
|
7552
|
+
|
7553
|
+
UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_start(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) {
|
7554
|
+
_upb_sethas(msg, 0);
|
7555
|
+
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value;
|
7556
|
+
}
|
7557
|
+
UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_end(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) {
|
7558
|
+
_upb_sethas(msg, 1);
|
7559
|
+
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value;
|
7560
|
+
}
|
7561
|
+
|
7562
|
+
|
7563
|
+
/* google.protobuf.ExtensionRangeOptions */
|
7564
|
+
|
7565
|
+
UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_new(upb_arena *arena) {
|
7566
|
+
return (google_protobuf_ExtensionRangeOptions *)upb_msg_new(&google_protobuf_ExtensionRangeOptions_msginit, arena);
|
7567
|
+
}
|
7568
|
+
UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_parsenew(upb_strview buf, upb_arena *arena) {
|
7569
|
+
google_protobuf_ExtensionRangeOptions *ret = google_protobuf_ExtensionRangeOptions_new(arena);
|
7570
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_ExtensionRangeOptions_msginit)) ? ret : NULL;
|
7571
|
+
}
|
7572
|
+
UPB_INLINE char *google_protobuf_ExtensionRangeOptions_serialize(const google_protobuf_ExtensionRangeOptions *msg, upb_arena *arena, size_t *len) {
|
7573
|
+
return upb_encode(msg, &google_protobuf_ExtensionRangeOptions_msginit, arena, len);
|
7574
|
+
}
|
7575
|
+
|
7576
|
+
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_ExtensionRangeOptions_uninterpreted_option(const google_protobuf_ExtensionRangeOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
|
7577
|
+
|
7578
|
+
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ExtensionRangeOptions_mutable_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, size_t *len) {
|
7579
|
+
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
|
7580
|
+
}
|
7581
|
+
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ExtensionRangeOptions_resize_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, size_t len, upb_arena *arena) {
|
7582
|
+
return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
7583
|
+
}
|
7584
|
+
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ExtensionRangeOptions_add_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, upb_arena *arena) {
|
7585
|
+
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
|
7586
|
+
bool ok = _upb_array_append_accessor(
|
7587
|
+
msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
7588
|
+
if (!ok) return NULL;
|
7589
|
+
return sub;
|
7590
|
+
}
|
7591
|
+
|
7592
|
+
|
7593
|
+
/* google.protobuf.FieldDescriptorProto */
|
7594
|
+
|
7595
|
+
UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_new(upb_arena *arena) {
|
7596
|
+
return (google_protobuf_FieldDescriptorProto *)upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena);
|
7597
|
+
}
|
7598
|
+
UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_parsenew(upb_strview buf, upb_arena *arena) {
|
7599
|
+
google_protobuf_FieldDescriptorProto *ret = google_protobuf_FieldDescriptorProto_new(arena);
|
7600
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_FieldDescriptorProto_msginit)) ? ret : NULL;
|
7601
|
+
}
|
7602
|
+
UPB_INLINE char *google_protobuf_FieldDescriptorProto_serialize(const google_protobuf_FieldDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
7603
|
+
return upb_encode(msg, &google_protobuf_FieldDescriptorProto_msginit, arena, len);
|
7604
|
+
}
|
7605
|
+
|
7606
|
+
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 4); }
|
7607
|
+
UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_name(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 32)); }
|
7608
|
+
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_extendee(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 5); }
|
7609
|
+
UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_extendee(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(40, 48)); }
|
7610
|
+
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_number(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 2); }
|
7611
|
+
UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_number(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(24, 24)); }
|
7612
|
+
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_label(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 0); }
|
7613
|
+
UPB_INLINE google_protobuf_FieldDescriptorProto_Label google_protobuf_FieldDescriptorProto_label(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, google_protobuf_FieldDescriptorProto_Label, UPB_SIZE(8, 8)); }
|
7614
|
+
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 1); }
|
7615
|
+
UPB_INLINE google_protobuf_FieldDescriptorProto_Type google_protobuf_FieldDescriptorProto_type(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, google_protobuf_FieldDescriptorProto_Type, UPB_SIZE(16, 16)); }
|
7616
|
+
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 6); }
|
7617
|
+
UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(48, 64)); }
|
7618
|
+
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_default_value(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 7); }
|
7619
|
+
UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_default_value(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(56, 80)); }
|
7620
|
+
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_options(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 9); }
|
7621
|
+
UPB_INLINE const google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_options(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_FieldOptions*, UPB_SIZE(72, 112)); }
|
7622
|
+
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_oneof_index(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 3); }
|
7623
|
+
UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_oneof_index(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(28, 28)); }
|
7624
|
+
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_json_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 8); }
|
7625
|
+
UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_json_name(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(64, 96)); }
|
7626
|
+
|
7627
|
+
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value) {
|
7628
|
+
_upb_sethas(msg, 4);
|
7629
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 32)) = value;
|
7630
|
+
}
|
7631
|
+
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_extendee(google_protobuf_FieldDescriptorProto *msg, upb_strview value) {
|
7632
|
+
_upb_sethas(msg, 5);
|
7633
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(40, 48)) = value;
|
7634
|
+
}
|
7635
|
+
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_number(google_protobuf_FieldDescriptorProto *msg, int32_t value) {
|
7636
|
+
_upb_sethas(msg, 2);
|
7637
|
+
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(24, 24)) = value;
|
7638
|
+
}
|
7639
|
+
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_label(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldDescriptorProto_Label value) {
|
7640
|
+
_upb_sethas(msg, 0);
|
7641
|
+
UPB_FIELD_AT(msg, google_protobuf_FieldDescriptorProto_Label, UPB_SIZE(8, 8)) = value;
|
7642
|
+
}
|
7643
|
+
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldDescriptorProto_Type value) {
|
7644
|
+
_upb_sethas(msg, 1);
|
7645
|
+
UPB_FIELD_AT(msg, google_protobuf_FieldDescriptorProto_Type, UPB_SIZE(16, 16)) = value;
|
7646
|
+
}
|
7647
|
+
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value) {
|
7648
|
+
_upb_sethas(msg, 6);
|
7649
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(48, 64)) = value;
|
7650
|
+
}
|
7651
|
+
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_default_value(google_protobuf_FieldDescriptorProto *msg, upb_strview value) {
|
7652
|
+
_upb_sethas(msg, 7);
|
7653
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(56, 80)) = value;
|
7654
|
+
}
|
7655
|
+
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_options(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldOptions* value) {
|
7656
|
+
_upb_sethas(msg, 9);
|
7657
|
+
UPB_FIELD_AT(msg, google_protobuf_FieldOptions*, UPB_SIZE(72, 112)) = value;
|
7658
|
+
}
|
7659
|
+
UPB_INLINE struct google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_mutable_options(google_protobuf_FieldDescriptorProto *msg, upb_arena *arena) {
|
7660
|
+
struct google_protobuf_FieldOptions* sub = (struct google_protobuf_FieldOptions*)google_protobuf_FieldDescriptorProto_options(msg);
|
7661
|
+
if (sub == NULL) {
|
7662
|
+
sub = (struct google_protobuf_FieldOptions*)upb_msg_new(&google_protobuf_FieldOptions_msginit, arena);
|
7663
|
+
if (!sub) return NULL;
|
7664
|
+
google_protobuf_FieldDescriptorProto_set_options(msg, sub);
|
7665
|
+
}
|
7666
|
+
return sub;
|
7667
|
+
}
|
7668
|
+
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_oneof_index(google_protobuf_FieldDescriptorProto *msg, int32_t value) {
|
7669
|
+
_upb_sethas(msg, 3);
|
7670
|
+
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(28, 28)) = value;
|
7671
|
+
}
|
7672
|
+
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_json_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value) {
|
7673
|
+
_upb_sethas(msg, 8);
|
7674
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(64, 96)) = value;
|
7675
|
+
}
|
7676
|
+
|
7677
|
+
|
7678
|
+
/* google.protobuf.OneofDescriptorProto */
|
7679
|
+
|
7680
|
+
UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_new(upb_arena *arena) {
|
7681
|
+
return (google_protobuf_OneofDescriptorProto *)upb_msg_new(&google_protobuf_OneofDescriptorProto_msginit, arena);
|
7682
|
+
}
|
7683
|
+
UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_parsenew(upb_strview buf, upb_arena *arena) {
|
7684
|
+
google_protobuf_OneofDescriptorProto *ret = google_protobuf_OneofDescriptorProto_new(arena);
|
7685
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_OneofDescriptorProto_msginit)) ? ret : NULL;
|
7686
|
+
}
|
7687
|
+
UPB_INLINE char *google_protobuf_OneofDescriptorProto_serialize(const google_protobuf_OneofDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
7688
|
+
return upb_encode(msg, &google_protobuf_OneofDescriptorProto_msginit, arena, len);
|
7689
|
+
}
|
7690
|
+
|
7691
|
+
UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_name(const google_protobuf_OneofDescriptorProto *msg) { return _upb_has_field(msg, 0); }
|
7692
|
+
UPB_INLINE upb_strview google_protobuf_OneofDescriptorProto_name(const google_protobuf_OneofDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); }
|
7693
|
+
UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_options(const google_protobuf_OneofDescriptorProto *msg) { return _upb_has_field(msg, 1); }
|
7694
|
+
UPB_INLINE const google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_options(const google_protobuf_OneofDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_OneofOptions*, UPB_SIZE(12, 24)); }
|
7695
|
+
|
7696
|
+
UPB_INLINE void google_protobuf_OneofDescriptorProto_set_name(google_protobuf_OneofDescriptorProto *msg, upb_strview value) {
|
7697
|
+
_upb_sethas(msg, 0);
|
7698
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value;
|
7699
|
+
}
|
7700
|
+
UPB_INLINE void google_protobuf_OneofDescriptorProto_set_options(google_protobuf_OneofDescriptorProto *msg, google_protobuf_OneofOptions* value) {
|
7701
|
+
_upb_sethas(msg, 1);
|
7702
|
+
UPB_FIELD_AT(msg, google_protobuf_OneofOptions*, UPB_SIZE(12, 24)) = value;
|
7703
|
+
}
|
7704
|
+
UPB_INLINE struct google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_mutable_options(google_protobuf_OneofDescriptorProto *msg, upb_arena *arena) {
|
7705
|
+
struct google_protobuf_OneofOptions* sub = (struct google_protobuf_OneofOptions*)google_protobuf_OneofDescriptorProto_options(msg);
|
7706
|
+
if (sub == NULL) {
|
7707
|
+
sub = (struct google_protobuf_OneofOptions*)upb_msg_new(&google_protobuf_OneofOptions_msginit, arena);
|
7708
|
+
if (!sub) return NULL;
|
7709
|
+
google_protobuf_OneofDescriptorProto_set_options(msg, sub);
|
7710
|
+
}
|
7711
|
+
return sub;
|
7712
|
+
}
|
7713
|
+
|
7714
|
+
|
7715
|
+
/* google.protobuf.EnumDescriptorProto */
|
7716
|
+
|
7717
|
+
UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_new(upb_arena *arena) {
|
7718
|
+
return (google_protobuf_EnumDescriptorProto *)upb_msg_new(&google_protobuf_EnumDescriptorProto_msginit, arena);
|
7719
|
+
}
|
7720
|
+
UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_parsenew(upb_strview buf, upb_arena *arena) {
|
7721
|
+
google_protobuf_EnumDescriptorProto *ret = google_protobuf_EnumDescriptorProto_new(arena);
|
7722
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_EnumDescriptorProto_msginit)) ? ret : NULL;
|
7723
|
+
}
|
7724
|
+
UPB_INLINE char *google_protobuf_EnumDescriptorProto_serialize(const google_protobuf_EnumDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
7725
|
+
return upb_encode(msg, &google_protobuf_EnumDescriptorProto_msginit, arena, len);
|
7726
|
+
}
|
7727
|
+
|
7728
|
+
UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_name(const google_protobuf_EnumDescriptorProto *msg) { return _upb_has_field(msg, 0); }
|
7729
|
+
UPB_INLINE upb_strview google_protobuf_EnumDescriptorProto_name(const google_protobuf_EnumDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); }
|
7730
|
+
UPB_INLINE const google_protobuf_EnumValueDescriptorProto* const* google_protobuf_EnumDescriptorProto_value(const google_protobuf_EnumDescriptorProto *msg, size_t *len) { return (const google_protobuf_EnumValueDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
|
7731
|
+
UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_options(const google_protobuf_EnumDescriptorProto *msg) { return _upb_has_field(msg, 1); }
|
7732
|
+
UPB_INLINE const google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_options(const google_protobuf_EnumDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_EnumOptions*, UPB_SIZE(12, 24)); }
|
7733
|
+
UPB_INLINE const google_protobuf_EnumDescriptorProto_EnumReservedRange* const* google_protobuf_EnumDescriptorProto_reserved_range(const google_protobuf_EnumDescriptorProto *msg, size_t *len) { return (const google_protobuf_EnumDescriptorProto_EnumReservedRange* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); }
|
7734
|
+
UPB_INLINE upb_strview const* google_protobuf_EnumDescriptorProto_reserved_name(const google_protobuf_EnumDescriptorProto *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); }
|
7735
|
+
|
7736
|
+
UPB_INLINE void google_protobuf_EnumDescriptorProto_set_name(google_protobuf_EnumDescriptorProto *msg, upb_strview value) {
|
7737
|
+
_upb_sethas(msg, 0);
|
7738
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value;
|
7739
|
+
}
|
7740
|
+
UPB_INLINE google_protobuf_EnumValueDescriptorProto** google_protobuf_EnumDescriptorProto_mutable_value(google_protobuf_EnumDescriptorProto *msg, size_t *len) {
|
7741
|
+
return (google_protobuf_EnumValueDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
|
7742
|
+
}
|
7743
|
+
UPB_INLINE google_protobuf_EnumValueDescriptorProto** google_protobuf_EnumDescriptorProto_resize_value(google_protobuf_EnumDescriptorProto *msg, size_t len, upb_arena *arena) {
|
7744
|
+
return (google_protobuf_EnumValueDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
7745
|
+
}
|
7746
|
+
UPB_INLINE struct google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumDescriptorProto_add_value(google_protobuf_EnumDescriptorProto *msg, upb_arena *arena) {
|
7747
|
+
struct google_protobuf_EnumValueDescriptorProto* sub = (struct google_protobuf_EnumValueDescriptorProto*)upb_msg_new(&google_protobuf_EnumValueDescriptorProto_msginit, arena);
|
7748
|
+
bool ok = _upb_array_append_accessor(
|
7749
|
+
msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
7750
|
+
if (!ok) return NULL;
|
7751
|
+
return sub;
|
7752
|
+
}
|
7753
|
+
UPB_INLINE void google_protobuf_EnumDescriptorProto_set_options(google_protobuf_EnumDescriptorProto *msg, google_protobuf_EnumOptions* value) {
|
7754
|
+
_upb_sethas(msg, 1);
|
7755
|
+
UPB_FIELD_AT(msg, google_protobuf_EnumOptions*, UPB_SIZE(12, 24)) = value;
|
7756
|
+
}
|
7757
|
+
UPB_INLINE struct google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_mutable_options(google_protobuf_EnumDescriptorProto *msg, upb_arena *arena) {
|
7758
|
+
struct google_protobuf_EnumOptions* sub = (struct google_protobuf_EnumOptions*)google_protobuf_EnumDescriptorProto_options(msg);
|
7759
|
+
if (sub == NULL) {
|
7760
|
+
sub = (struct google_protobuf_EnumOptions*)upb_msg_new(&google_protobuf_EnumOptions_msginit, arena);
|
7761
|
+
if (!sub) return NULL;
|
7762
|
+
google_protobuf_EnumDescriptorProto_set_options(msg, sub);
|
7763
|
+
}
|
7764
|
+
return sub;
|
7765
|
+
}
|
7766
|
+
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange** google_protobuf_EnumDescriptorProto_mutable_reserved_range(google_protobuf_EnumDescriptorProto *msg, size_t *len) {
|
7767
|
+
return (google_protobuf_EnumDescriptorProto_EnumReservedRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
|
7768
|
+
}
|
7769
|
+
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange** google_protobuf_EnumDescriptorProto_resize_reserved_range(google_protobuf_EnumDescriptorProto *msg, size_t len, upb_arena *arena) {
|
7770
|
+
return (google_protobuf_EnumDescriptorProto_EnumReservedRange**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
7771
|
+
}
|
7772
|
+
UPB_INLINE struct google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_add_reserved_range(google_protobuf_EnumDescriptorProto *msg, upb_arena *arena) {
|
7773
|
+
struct google_protobuf_EnumDescriptorProto_EnumReservedRange* sub = (struct google_protobuf_EnumDescriptorProto_EnumReservedRange*)upb_msg_new(&google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena);
|
7774
|
+
bool ok = _upb_array_append_accessor(
|
7775
|
+
msg, UPB_SIZE(20, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
7776
|
+
if (!ok) return NULL;
|
7777
|
+
return sub;
|
7778
|
+
}
|
7779
|
+
UPB_INLINE upb_strview* google_protobuf_EnumDescriptorProto_mutable_reserved_name(google_protobuf_EnumDescriptorProto *msg, size_t *len) {
|
7780
|
+
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
|
7781
|
+
}
|
7782
|
+
UPB_INLINE upb_strview* google_protobuf_EnumDescriptorProto_resize_reserved_name(google_protobuf_EnumDescriptorProto *msg, size_t len, upb_arena *arena) {
|
7783
|
+
return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena);
|
7784
|
+
}
|
7785
|
+
UPB_INLINE bool google_protobuf_EnumDescriptorProto_add_reserved_name(google_protobuf_EnumDescriptorProto *msg, upb_strview val, upb_arena *arena) {
|
7786
|
+
return _upb_array_append_accessor(
|
7787
|
+
msg, UPB_SIZE(24, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena);
|
7788
|
+
}
|
7789
|
+
|
7790
|
+
|
7791
|
+
/* google.protobuf.EnumDescriptorProto.EnumReservedRange */
|
7792
|
+
|
7793
|
+
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_new(upb_arena *arena) {
|
7794
|
+
return (google_protobuf_EnumDescriptorProto_EnumReservedRange *)upb_msg_new(&google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena);
|
7795
|
+
}
|
7796
|
+
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_parsenew(upb_strview buf, upb_arena *arena) {
|
7797
|
+
google_protobuf_EnumDescriptorProto_EnumReservedRange *ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena);
|
7798
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit)) ? ret : NULL;
|
7799
|
+
}
|
7800
|
+
UPB_INLINE char *google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, upb_arena *arena, size_t *len) {
|
7801
|
+
return upb_encode(msg, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena, len);
|
7802
|
+
}
|
7803
|
+
|
7804
|
+
UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return _upb_has_field(msg, 0); }
|
7805
|
+
UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); }
|
7806
|
+
UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return _upb_has_field(msg, 1); }
|
7807
|
+
UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); }
|
7808
|
+
|
7809
|
+
UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_start(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) {
|
7810
|
+
_upb_sethas(msg, 0);
|
7811
|
+
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value;
|
7812
|
+
}
|
7813
|
+
UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_end(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) {
|
7814
|
+
_upb_sethas(msg, 1);
|
7815
|
+
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value;
|
7816
|
+
}
|
7817
|
+
|
7818
|
+
|
7819
|
+
/* google.protobuf.EnumValueDescriptorProto */
|
7820
|
+
|
7821
|
+
UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_new(upb_arena *arena) {
|
7822
|
+
return (google_protobuf_EnumValueDescriptorProto *)upb_msg_new(&google_protobuf_EnumValueDescriptorProto_msginit, arena);
|
7823
|
+
}
|
7824
|
+
UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_parsenew(upb_strview buf, upb_arena *arena) {
|
7825
|
+
google_protobuf_EnumValueDescriptorProto *ret = google_protobuf_EnumValueDescriptorProto_new(arena);
|
7826
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_EnumValueDescriptorProto_msginit)) ? ret : NULL;
|
7827
|
+
}
|
7828
|
+
UPB_INLINE char *google_protobuf_EnumValueDescriptorProto_serialize(const google_protobuf_EnumValueDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
7829
|
+
return upb_encode(msg, &google_protobuf_EnumValueDescriptorProto_msginit, arena, len);
|
7830
|
+
}
|
7831
|
+
|
7832
|
+
UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_name(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_has_field(msg, 1); }
|
7833
|
+
UPB_INLINE upb_strview google_protobuf_EnumValueDescriptorProto_name(const google_protobuf_EnumValueDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)); }
|
7834
|
+
UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_number(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_has_field(msg, 0); }
|
7835
|
+
UPB_INLINE int32_t google_protobuf_EnumValueDescriptorProto_number(const google_protobuf_EnumValueDescriptorProto *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); }
|
7836
|
+
UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_options(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_has_field(msg, 2); }
|
7837
|
+
UPB_INLINE const google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_options(const google_protobuf_EnumValueDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_EnumValueOptions*, UPB_SIZE(16, 24)); }
|
7838
|
+
|
7839
|
+
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_name(google_protobuf_EnumValueDescriptorProto *msg, upb_strview value) {
|
7840
|
+
_upb_sethas(msg, 1);
|
7841
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value;
|
7842
|
+
}
|
7843
|
+
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_number(google_protobuf_EnumValueDescriptorProto *msg, int32_t value) {
|
7844
|
+
_upb_sethas(msg, 0);
|
7845
|
+
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value;
|
7846
|
+
}
|
7847
|
+
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_options(google_protobuf_EnumValueDescriptorProto *msg, google_protobuf_EnumValueOptions* value) {
|
7848
|
+
_upb_sethas(msg, 2);
|
7849
|
+
UPB_FIELD_AT(msg, google_protobuf_EnumValueOptions*, UPB_SIZE(16, 24)) = value;
|
7850
|
+
}
|
7851
|
+
UPB_INLINE struct google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_mutable_options(google_protobuf_EnumValueDescriptorProto *msg, upb_arena *arena) {
|
7852
|
+
struct google_protobuf_EnumValueOptions* sub = (struct google_protobuf_EnumValueOptions*)google_protobuf_EnumValueDescriptorProto_options(msg);
|
7853
|
+
if (sub == NULL) {
|
7854
|
+
sub = (struct google_protobuf_EnumValueOptions*)upb_msg_new(&google_protobuf_EnumValueOptions_msginit, arena);
|
7855
|
+
if (!sub) return NULL;
|
7856
|
+
google_protobuf_EnumValueDescriptorProto_set_options(msg, sub);
|
7857
|
+
}
|
7858
|
+
return sub;
|
7859
|
+
}
|
7860
|
+
|
7861
|
+
|
7862
|
+
/* google.protobuf.ServiceDescriptorProto */
|
7863
|
+
|
7864
|
+
UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_new(upb_arena *arena) {
|
7865
|
+
return (google_protobuf_ServiceDescriptorProto *)upb_msg_new(&google_protobuf_ServiceDescriptorProto_msginit, arena);
|
7866
|
+
}
|
7867
|
+
UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_parsenew(upb_strview buf, upb_arena *arena) {
|
7868
|
+
google_protobuf_ServiceDescriptorProto *ret = google_protobuf_ServiceDescriptorProto_new(arena);
|
7869
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_ServiceDescriptorProto_msginit)) ? ret : NULL;
|
7870
|
+
}
|
7871
|
+
UPB_INLINE char *google_protobuf_ServiceDescriptorProto_serialize(const google_protobuf_ServiceDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
7872
|
+
return upb_encode(msg, &google_protobuf_ServiceDescriptorProto_msginit, arena, len);
|
7873
|
+
}
|
7874
|
+
|
7875
|
+
UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_name(const google_protobuf_ServiceDescriptorProto *msg) { return _upb_has_field(msg, 0); }
|
7876
|
+
UPB_INLINE upb_strview google_protobuf_ServiceDescriptorProto_name(const google_protobuf_ServiceDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); }
|
7877
|
+
UPB_INLINE const google_protobuf_MethodDescriptorProto* const* google_protobuf_ServiceDescriptorProto_method(const google_protobuf_ServiceDescriptorProto *msg, size_t *len) { return (const google_protobuf_MethodDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
|
7878
|
+
UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_options(const google_protobuf_ServiceDescriptorProto *msg) { return _upb_has_field(msg, 1); }
|
7879
|
+
UPB_INLINE const google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_options(const google_protobuf_ServiceDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_ServiceOptions*, UPB_SIZE(12, 24)); }
|
7880
|
+
|
7881
|
+
UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_name(google_protobuf_ServiceDescriptorProto *msg, upb_strview value) {
|
7882
|
+
_upb_sethas(msg, 0);
|
7883
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value;
|
7884
|
+
}
|
7885
|
+
UPB_INLINE google_protobuf_MethodDescriptorProto** google_protobuf_ServiceDescriptorProto_mutable_method(google_protobuf_ServiceDescriptorProto *msg, size_t *len) {
|
7886
|
+
return (google_protobuf_MethodDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
|
7887
|
+
}
|
7888
|
+
UPB_INLINE google_protobuf_MethodDescriptorProto** google_protobuf_ServiceDescriptorProto_resize_method(google_protobuf_ServiceDescriptorProto *msg, size_t len, upb_arena *arena) {
|
7889
|
+
return (google_protobuf_MethodDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
7890
|
+
}
|
7891
|
+
UPB_INLINE struct google_protobuf_MethodDescriptorProto* google_protobuf_ServiceDescriptorProto_add_method(google_protobuf_ServiceDescriptorProto *msg, upb_arena *arena) {
|
7892
|
+
struct google_protobuf_MethodDescriptorProto* sub = (struct google_protobuf_MethodDescriptorProto*)upb_msg_new(&google_protobuf_MethodDescriptorProto_msginit, arena);
|
7893
|
+
bool ok = _upb_array_append_accessor(
|
7894
|
+
msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
7895
|
+
if (!ok) return NULL;
|
7896
|
+
return sub;
|
7897
|
+
}
|
7898
|
+
UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_options(google_protobuf_ServiceDescriptorProto *msg, google_protobuf_ServiceOptions* value) {
|
7899
|
+
_upb_sethas(msg, 1);
|
7900
|
+
UPB_FIELD_AT(msg, google_protobuf_ServiceOptions*, UPB_SIZE(12, 24)) = value;
|
7901
|
+
}
|
7902
|
+
UPB_INLINE struct google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_mutable_options(google_protobuf_ServiceDescriptorProto *msg, upb_arena *arena) {
|
7903
|
+
struct google_protobuf_ServiceOptions* sub = (struct google_protobuf_ServiceOptions*)google_protobuf_ServiceDescriptorProto_options(msg);
|
7904
|
+
if (sub == NULL) {
|
7905
|
+
sub = (struct google_protobuf_ServiceOptions*)upb_msg_new(&google_protobuf_ServiceOptions_msginit, arena);
|
7906
|
+
if (!sub) return NULL;
|
7907
|
+
google_protobuf_ServiceDescriptorProto_set_options(msg, sub);
|
7908
|
+
}
|
7909
|
+
return sub;
|
7910
|
+
}
|
7911
|
+
|
7912
|
+
|
7913
|
+
/* google.protobuf.MethodDescriptorProto */
|
7914
|
+
|
7915
|
+
UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_new(upb_arena *arena) {
|
7916
|
+
return (google_protobuf_MethodDescriptorProto *)upb_msg_new(&google_protobuf_MethodDescriptorProto_msginit, arena);
|
7917
|
+
}
|
7918
|
+
UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_parsenew(upb_strview buf, upb_arena *arena) {
|
7919
|
+
google_protobuf_MethodDescriptorProto *ret = google_protobuf_MethodDescriptorProto_new(arena);
|
7920
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_MethodDescriptorProto_msginit)) ? ret : NULL;
|
7921
|
+
}
|
7922
|
+
UPB_INLINE char *google_protobuf_MethodDescriptorProto_serialize(const google_protobuf_MethodDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
7923
|
+
return upb_encode(msg, &google_protobuf_MethodDescriptorProto_msginit, arena, len);
|
7924
|
+
}
|
7925
|
+
|
7926
|
+
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_name(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 2); }
|
7927
|
+
UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_name(const google_protobuf_MethodDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); }
|
7928
|
+
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_input_type(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 3); }
|
7929
|
+
UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_input_type(const google_protobuf_MethodDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)); }
|
7930
|
+
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_output_type(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 4); }
|
7931
|
+
UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_output_type(const google_protobuf_MethodDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 40)); }
|
7932
|
+
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_options(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 5); }
|
7933
|
+
UPB_INLINE const google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_options(const google_protobuf_MethodDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_MethodOptions*, UPB_SIZE(28, 56)); }
|
7934
|
+
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_client_streaming(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 0); }
|
7935
|
+
UPB_INLINE bool google_protobuf_MethodDescriptorProto_client_streaming(const google_protobuf_MethodDescriptorProto *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); }
|
7936
|
+
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_server_streaming(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 1); }
|
7937
|
+
UPB_INLINE bool google_protobuf_MethodDescriptorProto_server_streaming(const google_protobuf_MethodDescriptorProto *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)); }
|
7938
|
+
|
7939
|
+
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_name(google_protobuf_MethodDescriptorProto *msg, upb_strview value) {
|
7940
|
+
_upb_sethas(msg, 2);
|
7941
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value;
|
7942
|
+
}
|
7943
|
+
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_input_type(google_protobuf_MethodDescriptorProto *msg, upb_strview value) {
|
7944
|
+
_upb_sethas(msg, 3);
|
7945
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)) = value;
|
7946
|
+
}
|
7947
|
+
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_output_type(google_protobuf_MethodDescriptorProto *msg, upb_strview value) {
|
7948
|
+
_upb_sethas(msg, 4);
|
7949
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 40)) = value;
|
7950
|
+
}
|
7951
|
+
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_options(google_protobuf_MethodDescriptorProto *msg, google_protobuf_MethodOptions* value) {
|
7952
|
+
_upb_sethas(msg, 5);
|
7953
|
+
UPB_FIELD_AT(msg, google_protobuf_MethodOptions*, UPB_SIZE(28, 56)) = value;
|
7954
|
+
}
|
7955
|
+
UPB_INLINE struct google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_mutable_options(google_protobuf_MethodDescriptorProto *msg, upb_arena *arena) {
|
7956
|
+
struct google_protobuf_MethodOptions* sub = (struct google_protobuf_MethodOptions*)google_protobuf_MethodDescriptorProto_options(msg);
|
7957
|
+
if (sub == NULL) {
|
7958
|
+
sub = (struct google_protobuf_MethodOptions*)upb_msg_new(&google_protobuf_MethodOptions_msginit, arena);
|
7959
|
+
if (!sub) return NULL;
|
7960
|
+
google_protobuf_MethodDescriptorProto_set_options(msg, sub);
|
7961
|
+
}
|
7962
|
+
return sub;
|
7963
|
+
}
|
7964
|
+
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_client_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) {
|
7965
|
+
_upb_sethas(msg, 0);
|
7966
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value;
|
7967
|
+
}
|
7968
|
+
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_server_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) {
|
7969
|
+
_upb_sethas(msg, 1);
|
7970
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value;
|
7971
|
+
}
|
7972
|
+
|
7973
|
+
|
7974
|
+
/* google.protobuf.FileOptions */
|
7975
|
+
|
7976
|
+
UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_new(upb_arena *arena) {
|
7977
|
+
return (google_protobuf_FileOptions *)upb_msg_new(&google_protobuf_FileOptions_msginit, arena);
|
7978
|
+
}
|
7979
|
+
UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_parsenew(upb_strview buf, upb_arena *arena) {
|
7980
|
+
google_protobuf_FileOptions *ret = google_protobuf_FileOptions_new(arena);
|
7981
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_FileOptions_msginit)) ? ret : NULL;
|
7982
|
+
}
|
7983
|
+
UPB_INLINE char *google_protobuf_FileOptions_serialize(const google_protobuf_FileOptions *msg, upb_arena *arena, size_t *len) {
|
7984
|
+
return upb_encode(msg, &google_protobuf_FileOptions_msginit, arena, len);
|
7985
|
+
}
|
7986
|
+
|
7987
|
+
UPB_INLINE bool google_protobuf_FileOptions_has_java_package(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 10); }
|
7988
|
+
UPB_INLINE upb_strview google_protobuf_FileOptions_java_package(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(28, 32)); }
|
7989
|
+
UPB_INLINE bool google_protobuf_FileOptions_has_java_outer_classname(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 11); }
|
7990
|
+
UPB_INLINE upb_strview google_protobuf_FileOptions_java_outer_classname(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(36, 48)); }
|
7991
|
+
UPB_INLINE bool google_protobuf_FileOptions_has_optimize_for(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 0); }
|
7992
|
+
UPB_INLINE google_protobuf_FileOptions_OptimizeMode google_protobuf_FileOptions_optimize_for(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, google_protobuf_FileOptions_OptimizeMode, UPB_SIZE(8, 8)); }
|
7993
|
+
UPB_INLINE bool google_protobuf_FileOptions_has_java_multiple_files(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 1); }
|
7994
|
+
UPB_INLINE bool google_protobuf_FileOptions_java_multiple_files(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)); }
|
7995
|
+
UPB_INLINE bool google_protobuf_FileOptions_has_go_package(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 12); }
|
7996
|
+
UPB_INLINE upb_strview google_protobuf_FileOptions_go_package(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(44, 64)); }
|
7997
|
+
UPB_INLINE bool google_protobuf_FileOptions_has_cc_generic_services(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 2); }
|
7998
|
+
UPB_INLINE bool google_protobuf_FileOptions_cc_generic_services(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(17, 17)); }
|
7999
|
+
UPB_INLINE bool google_protobuf_FileOptions_has_java_generic_services(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 3); }
|
8000
|
+
UPB_INLINE bool google_protobuf_FileOptions_java_generic_services(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(18, 18)); }
|
8001
|
+
UPB_INLINE bool google_protobuf_FileOptions_has_py_generic_services(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 4); }
|
8002
|
+
UPB_INLINE bool google_protobuf_FileOptions_py_generic_services(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(19, 19)); }
|
8003
|
+
UPB_INLINE bool google_protobuf_FileOptions_has_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 5); }
|
8004
|
+
UPB_INLINE bool google_protobuf_FileOptions_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(20, 20)); }
|
8005
|
+
UPB_INLINE bool google_protobuf_FileOptions_has_deprecated(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 6); }
|
8006
|
+
UPB_INLINE bool google_protobuf_FileOptions_deprecated(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(21, 21)); }
|
8007
|
+
UPB_INLINE bool google_protobuf_FileOptions_has_java_string_check_utf8(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 7); }
|
8008
|
+
UPB_INLINE bool google_protobuf_FileOptions_java_string_check_utf8(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(22, 22)); }
|
8009
|
+
UPB_INLINE bool google_protobuf_FileOptions_has_cc_enable_arenas(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 8); }
|
8010
|
+
UPB_INLINE bool google_protobuf_FileOptions_cc_enable_arenas(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(23, 23)); }
|
8011
|
+
UPB_INLINE bool google_protobuf_FileOptions_has_objc_class_prefix(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 13); }
|
8012
|
+
UPB_INLINE upb_strview google_protobuf_FileOptions_objc_class_prefix(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(52, 80)); }
|
8013
|
+
UPB_INLINE bool google_protobuf_FileOptions_has_csharp_namespace(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 14); }
|
8014
|
+
UPB_INLINE upb_strview google_protobuf_FileOptions_csharp_namespace(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(60, 96)); }
|
8015
|
+
UPB_INLINE bool google_protobuf_FileOptions_has_swift_prefix(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 15); }
|
8016
|
+
UPB_INLINE upb_strview google_protobuf_FileOptions_swift_prefix(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(68, 112)); }
|
8017
|
+
UPB_INLINE bool google_protobuf_FileOptions_has_php_class_prefix(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 16); }
|
8018
|
+
UPB_INLINE upb_strview google_protobuf_FileOptions_php_class_prefix(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(76, 128)); }
|
8019
|
+
UPB_INLINE bool google_protobuf_FileOptions_has_php_namespace(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 17); }
|
8020
|
+
UPB_INLINE upb_strview google_protobuf_FileOptions_php_namespace(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(84, 144)); }
|
8021
|
+
UPB_INLINE bool google_protobuf_FileOptions_has_php_generic_services(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 9); }
|
8022
|
+
UPB_INLINE bool google_protobuf_FileOptions_php_generic_services(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)); }
|
8023
|
+
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FileOptions_uninterpreted_option(const google_protobuf_FileOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(92, 160), len); }
|
8024
|
+
|
8025
|
+
UPB_INLINE void google_protobuf_FileOptions_set_java_package(google_protobuf_FileOptions *msg, upb_strview value) {
|
8026
|
+
_upb_sethas(msg, 10);
|
8027
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(28, 32)) = value;
|
8028
|
+
}
|
8029
|
+
UPB_INLINE void google_protobuf_FileOptions_set_java_outer_classname(google_protobuf_FileOptions *msg, upb_strview value) {
|
8030
|
+
_upb_sethas(msg, 11);
|
8031
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(36, 48)) = value;
|
8032
|
+
}
|
8033
|
+
UPB_INLINE void google_protobuf_FileOptions_set_optimize_for(google_protobuf_FileOptions *msg, google_protobuf_FileOptions_OptimizeMode value) {
|
8034
|
+
_upb_sethas(msg, 0);
|
8035
|
+
UPB_FIELD_AT(msg, google_protobuf_FileOptions_OptimizeMode, UPB_SIZE(8, 8)) = value;
|
8036
|
+
}
|
8037
|
+
UPB_INLINE void google_protobuf_FileOptions_set_java_multiple_files(google_protobuf_FileOptions *msg, bool value) {
|
8038
|
+
_upb_sethas(msg, 1);
|
8039
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)) = value;
|
8040
|
+
}
|
8041
|
+
UPB_INLINE void google_protobuf_FileOptions_set_go_package(google_protobuf_FileOptions *msg, upb_strview value) {
|
8042
|
+
_upb_sethas(msg, 12);
|
8043
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(44, 64)) = value;
|
8044
|
+
}
|
8045
|
+
UPB_INLINE void google_protobuf_FileOptions_set_cc_generic_services(google_protobuf_FileOptions *msg, bool value) {
|
8046
|
+
_upb_sethas(msg, 2);
|
8047
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(17, 17)) = value;
|
8048
|
+
}
|
8049
|
+
UPB_INLINE void google_protobuf_FileOptions_set_java_generic_services(google_protobuf_FileOptions *msg, bool value) {
|
8050
|
+
_upb_sethas(msg, 3);
|
8051
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(18, 18)) = value;
|
8052
|
+
}
|
8053
|
+
UPB_INLINE void google_protobuf_FileOptions_set_py_generic_services(google_protobuf_FileOptions *msg, bool value) {
|
8054
|
+
_upb_sethas(msg, 4);
|
8055
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(19, 19)) = value;
|
8056
|
+
}
|
8057
|
+
UPB_INLINE void google_protobuf_FileOptions_set_java_generate_equals_and_hash(google_protobuf_FileOptions *msg, bool value) {
|
8058
|
+
_upb_sethas(msg, 5);
|
8059
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(20, 20)) = value;
|
8060
|
+
}
|
8061
|
+
UPB_INLINE void google_protobuf_FileOptions_set_deprecated(google_protobuf_FileOptions *msg, bool value) {
|
8062
|
+
_upb_sethas(msg, 6);
|
8063
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(21, 21)) = value;
|
8064
|
+
}
|
8065
|
+
UPB_INLINE void google_protobuf_FileOptions_set_java_string_check_utf8(google_protobuf_FileOptions *msg, bool value) {
|
8066
|
+
_upb_sethas(msg, 7);
|
8067
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(22, 22)) = value;
|
8068
|
+
}
|
8069
|
+
UPB_INLINE void google_protobuf_FileOptions_set_cc_enable_arenas(google_protobuf_FileOptions *msg, bool value) {
|
8070
|
+
_upb_sethas(msg, 8);
|
8071
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(23, 23)) = value;
|
8072
|
+
}
|
8073
|
+
UPB_INLINE void google_protobuf_FileOptions_set_objc_class_prefix(google_protobuf_FileOptions *msg, upb_strview value) {
|
8074
|
+
_upb_sethas(msg, 13);
|
8075
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(52, 80)) = value;
|
8076
|
+
}
|
8077
|
+
UPB_INLINE void google_protobuf_FileOptions_set_csharp_namespace(google_protobuf_FileOptions *msg, upb_strview value) {
|
8078
|
+
_upb_sethas(msg, 14);
|
8079
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(60, 96)) = value;
|
8080
|
+
}
|
8081
|
+
UPB_INLINE void google_protobuf_FileOptions_set_swift_prefix(google_protobuf_FileOptions *msg, upb_strview value) {
|
8082
|
+
_upb_sethas(msg, 15);
|
8083
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(68, 112)) = value;
|
8084
|
+
}
|
8085
|
+
UPB_INLINE void google_protobuf_FileOptions_set_php_class_prefix(google_protobuf_FileOptions *msg, upb_strview value) {
|
8086
|
+
_upb_sethas(msg, 16);
|
8087
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(76, 128)) = value;
|
8088
|
+
}
|
8089
|
+
UPB_INLINE void google_protobuf_FileOptions_set_php_namespace(google_protobuf_FileOptions *msg, upb_strview value) {
|
8090
|
+
_upb_sethas(msg, 17);
|
8091
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(84, 144)) = value;
|
8092
|
+
}
|
8093
|
+
UPB_INLINE void google_protobuf_FileOptions_set_php_generic_services(google_protobuf_FileOptions *msg, bool value) {
|
8094
|
+
_upb_sethas(msg, 9);
|
8095
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)) = value;
|
8096
|
+
}
|
8097
|
+
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FileOptions_mutable_uninterpreted_option(google_protobuf_FileOptions *msg, size_t *len) {
|
8098
|
+
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(92, 160), len);
|
8099
|
+
}
|
8100
|
+
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FileOptions_resize_uninterpreted_option(google_protobuf_FileOptions *msg, size_t len, upb_arena *arena) {
|
8101
|
+
return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(92, 160), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
8102
|
+
}
|
8103
|
+
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FileOptions_add_uninterpreted_option(google_protobuf_FileOptions *msg, upb_arena *arena) {
|
8104
|
+
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
|
8105
|
+
bool ok = _upb_array_append_accessor(
|
8106
|
+
msg, UPB_SIZE(92, 160), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
8107
|
+
if (!ok) return NULL;
|
8108
|
+
return sub;
|
8109
|
+
}
|
8110
|
+
|
8111
|
+
|
8112
|
+
/* google.protobuf.MessageOptions */
|
8113
|
+
|
8114
|
+
UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_new(upb_arena *arena) {
|
8115
|
+
return (google_protobuf_MessageOptions *)upb_msg_new(&google_protobuf_MessageOptions_msginit, arena);
|
8116
|
+
}
|
8117
|
+
UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_parsenew(upb_strview buf, upb_arena *arena) {
|
8118
|
+
google_protobuf_MessageOptions *ret = google_protobuf_MessageOptions_new(arena);
|
8119
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_MessageOptions_msginit)) ? ret : NULL;
|
8120
|
+
}
|
8121
|
+
UPB_INLINE char *google_protobuf_MessageOptions_serialize(const google_protobuf_MessageOptions *msg, upb_arena *arena, size_t *len) {
|
8122
|
+
return upb_encode(msg, &google_protobuf_MessageOptions_msginit, arena, len);
|
8123
|
+
}
|
8124
|
+
|
8125
|
+
UPB_INLINE bool google_protobuf_MessageOptions_has_message_set_wire_format(const google_protobuf_MessageOptions *msg) { return _upb_has_field(msg, 0); }
|
8126
|
+
UPB_INLINE bool google_protobuf_MessageOptions_message_set_wire_format(const google_protobuf_MessageOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); }
|
8127
|
+
UPB_INLINE bool google_protobuf_MessageOptions_has_no_standard_descriptor_accessor(const google_protobuf_MessageOptions *msg) { return _upb_has_field(msg, 1); }
|
8128
|
+
UPB_INLINE bool google_protobuf_MessageOptions_no_standard_descriptor_accessor(const google_protobuf_MessageOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)); }
|
8129
|
+
UPB_INLINE bool google_protobuf_MessageOptions_has_deprecated(const google_protobuf_MessageOptions *msg) { return _upb_has_field(msg, 2); }
|
8130
|
+
UPB_INLINE bool google_protobuf_MessageOptions_deprecated(const google_protobuf_MessageOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(3, 3)); }
|
8131
|
+
UPB_INLINE bool google_protobuf_MessageOptions_has_map_entry(const google_protobuf_MessageOptions *msg) { return _upb_has_field(msg, 3); }
|
8132
|
+
UPB_INLINE bool google_protobuf_MessageOptions_map_entry(const google_protobuf_MessageOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(4, 4)); }
|
8133
|
+
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MessageOptions_uninterpreted_option(const google_protobuf_MessageOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(8, 8), len); }
|
8134
|
+
|
8135
|
+
UPB_INLINE void google_protobuf_MessageOptions_set_message_set_wire_format(google_protobuf_MessageOptions *msg, bool value) {
|
8136
|
+
_upb_sethas(msg, 0);
|
8137
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value;
|
8138
|
+
}
|
8139
|
+
UPB_INLINE void google_protobuf_MessageOptions_set_no_standard_descriptor_accessor(google_protobuf_MessageOptions *msg, bool value) {
|
8140
|
+
_upb_sethas(msg, 1);
|
8141
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value;
|
8142
|
+
}
|
8143
|
+
UPB_INLINE void google_protobuf_MessageOptions_set_deprecated(google_protobuf_MessageOptions *msg, bool value) {
|
8144
|
+
_upb_sethas(msg, 2);
|
8145
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(3, 3)) = value;
|
8146
|
+
}
|
8147
|
+
UPB_INLINE void google_protobuf_MessageOptions_set_map_entry(google_protobuf_MessageOptions *msg, bool value) {
|
8148
|
+
_upb_sethas(msg, 3);
|
8149
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(4, 4)) = value;
|
8150
|
+
}
|
8151
|
+
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MessageOptions_mutable_uninterpreted_option(google_protobuf_MessageOptions *msg, size_t *len) {
|
8152
|
+
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 8), len);
|
8153
|
+
}
|
8154
|
+
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MessageOptions_resize_uninterpreted_option(google_protobuf_MessageOptions *msg, size_t len, upb_arena *arena) {
|
8155
|
+
return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 8), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
8156
|
+
}
|
8157
|
+
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MessageOptions_add_uninterpreted_option(google_protobuf_MessageOptions *msg, upb_arena *arena) {
|
8158
|
+
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
|
8159
|
+
bool ok = _upb_array_append_accessor(
|
8160
|
+
msg, UPB_SIZE(8, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
8161
|
+
if (!ok) return NULL;
|
8162
|
+
return sub;
|
8163
|
+
}
|
8164
|
+
|
8165
|
+
|
8166
|
+
/* google.protobuf.FieldOptions */
|
8167
|
+
|
8168
|
+
UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_new(upb_arena *arena) {
|
8169
|
+
return (google_protobuf_FieldOptions *)upb_msg_new(&google_protobuf_FieldOptions_msginit, arena);
|
8170
|
+
}
|
8171
|
+
UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_parsenew(upb_strview buf, upb_arena *arena) {
|
8172
|
+
google_protobuf_FieldOptions *ret = google_protobuf_FieldOptions_new(arena);
|
8173
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_FieldOptions_msginit)) ? ret : NULL;
|
8174
|
+
}
|
8175
|
+
UPB_INLINE char *google_protobuf_FieldOptions_serialize(const google_protobuf_FieldOptions *msg, upb_arena *arena, size_t *len) {
|
8176
|
+
return upb_encode(msg, &google_protobuf_FieldOptions_msginit, arena, len);
|
8177
|
+
}
|
8178
|
+
|
8179
|
+
UPB_INLINE bool google_protobuf_FieldOptions_has_ctype(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 0); }
|
8180
|
+
UPB_INLINE google_protobuf_FieldOptions_CType google_protobuf_FieldOptions_ctype(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, google_protobuf_FieldOptions_CType, UPB_SIZE(8, 8)); }
|
8181
|
+
UPB_INLINE bool google_protobuf_FieldOptions_has_packed(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 2); }
|
8182
|
+
UPB_INLINE bool google_protobuf_FieldOptions_packed(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)); }
|
8183
|
+
UPB_INLINE bool google_protobuf_FieldOptions_has_deprecated(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 3); }
|
8184
|
+
UPB_INLINE bool google_protobuf_FieldOptions_deprecated(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(25, 25)); }
|
8185
|
+
UPB_INLINE bool google_protobuf_FieldOptions_has_lazy(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 4); }
|
8186
|
+
UPB_INLINE bool google_protobuf_FieldOptions_lazy(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(26, 26)); }
|
8187
|
+
UPB_INLINE bool google_protobuf_FieldOptions_has_jstype(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 1); }
|
8188
|
+
UPB_INLINE google_protobuf_FieldOptions_JSType google_protobuf_FieldOptions_jstype(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, google_protobuf_FieldOptions_JSType, UPB_SIZE(16, 16)); }
|
8189
|
+
UPB_INLINE bool google_protobuf_FieldOptions_has_weak(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 5); }
|
8190
|
+
UPB_INLINE bool google_protobuf_FieldOptions_weak(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(27, 27)); }
|
8191
|
+
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FieldOptions_uninterpreted_option(const google_protobuf_FieldOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); }
|
8192
|
+
|
8193
|
+
UPB_INLINE void google_protobuf_FieldOptions_set_ctype(google_protobuf_FieldOptions *msg, google_protobuf_FieldOptions_CType value) {
|
8194
|
+
_upb_sethas(msg, 0);
|
8195
|
+
UPB_FIELD_AT(msg, google_protobuf_FieldOptions_CType, UPB_SIZE(8, 8)) = value;
|
8196
|
+
}
|
8197
|
+
UPB_INLINE void google_protobuf_FieldOptions_set_packed(google_protobuf_FieldOptions *msg, bool value) {
|
8198
|
+
_upb_sethas(msg, 2);
|
8199
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)) = value;
|
8200
|
+
}
|
8201
|
+
UPB_INLINE void google_protobuf_FieldOptions_set_deprecated(google_protobuf_FieldOptions *msg, bool value) {
|
8202
|
+
_upb_sethas(msg, 3);
|
8203
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(25, 25)) = value;
|
8204
|
+
}
|
8205
|
+
UPB_INLINE void google_protobuf_FieldOptions_set_lazy(google_protobuf_FieldOptions *msg, bool value) {
|
8206
|
+
_upb_sethas(msg, 4);
|
8207
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(26, 26)) = value;
|
8208
|
+
}
|
8209
|
+
UPB_INLINE void google_protobuf_FieldOptions_set_jstype(google_protobuf_FieldOptions *msg, google_protobuf_FieldOptions_JSType value) {
|
8210
|
+
_upb_sethas(msg, 1);
|
8211
|
+
UPB_FIELD_AT(msg, google_protobuf_FieldOptions_JSType, UPB_SIZE(16, 16)) = value;
|
8212
|
+
}
|
8213
|
+
UPB_INLINE void google_protobuf_FieldOptions_set_weak(google_protobuf_FieldOptions *msg, bool value) {
|
8214
|
+
_upb_sethas(msg, 5);
|
8215
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(27, 27)) = value;
|
8216
|
+
}
|
8217
|
+
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FieldOptions_mutable_uninterpreted_option(google_protobuf_FieldOptions *msg, size_t *len) {
|
8218
|
+
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len);
|
8219
|
+
}
|
8220
|
+
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FieldOptions_resize_uninterpreted_option(google_protobuf_FieldOptions *msg, size_t len, upb_arena *arena) {
|
8221
|
+
return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
8222
|
+
}
|
8223
|
+
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FieldOptions_add_uninterpreted_option(google_protobuf_FieldOptions *msg, upb_arena *arena) {
|
8224
|
+
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
|
8225
|
+
bool ok = _upb_array_append_accessor(
|
8226
|
+
msg, UPB_SIZE(28, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
8227
|
+
if (!ok) return NULL;
|
8228
|
+
return sub;
|
8229
|
+
}
|
8230
|
+
|
8231
|
+
|
8232
|
+
/* google.protobuf.OneofOptions */
|
8233
|
+
|
8234
|
+
UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_new(upb_arena *arena) {
|
8235
|
+
return (google_protobuf_OneofOptions *)upb_msg_new(&google_protobuf_OneofOptions_msginit, arena);
|
8236
|
+
}
|
8237
|
+
UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_parsenew(upb_strview buf, upb_arena *arena) {
|
8238
|
+
google_protobuf_OneofOptions *ret = google_protobuf_OneofOptions_new(arena);
|
8239
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_OneofOptions_msginit)) ? ret : NULL;
|
8240
|
+
}
|
8241
|
+
UPB_INLINE char *google_protobuf_OneofOptions_serialize(const google_protobuf_OneofOptions *msg, upb_arena *arena, size_t *len) {
|
8242
|
+
return upb_encode(msg, &google_protobuf_OneofOptions_msginit, arena, len);
|
8243
|
+
}
|
8244
|
+
|
8245
|
+
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_OneofOptions_uninterpreted_option(const google_protobuf_OneofOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
|
8246
|
+
|
8247
|
+
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_OneofOptions_mutable_uninterpreted_option(google_protobuf_OneofOptions *msg, size_t *len) {
|
8248
|
+
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
|
8249
|
+
}
|
8250
|
+
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_OneofOptions_resize_uninterpreted_option(google_protobuf_OneofOptions *msg, size_t len, upb_arena *arena) {
|
8251
|
+
return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
8252
|
+
}
|
8253
|
+
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_OneofOptions_add_uninterpreted_option(google_protobuf_OneofOptions *msg, upb_arena *arena) {
|
8254
|
+
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
|
8255
|
+
bool ok = _upb_array_append_accessor(
|
8256
|
+
msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
8257
|
+
if (!ok) return NULL;
|
8258
|
+
return sub;
|
8259
|
+
}
|
8260
|
+
|
8261
|
+
|
8262
|
+
/* google.protobuf.EnumOptions */
|
8263
|
+
|
8264
|
+
UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_new(upb_arena *arena) {
|
8265
|
+
return (google_protobuf_EnumOptions *)upb_msg_new(&google_protobuf_EnumOptions_msginit, arena);
|
8266
|
+
}
|
8267
|
+
UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_parsenew(upb_strview buf, upb_arena *arena) {
|
8268
|
+
google_protobuf_EnumOptions *ret = google_protobuf_EnumOptions_new(arena);
|
8269
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_EnumOptions_msginit)) ? ret : NULL;
|
8270
|
+
}
|
8271
|
+
UPB_INLINE char *google_protobuf_EnumOptions_serialize(const google_protobuf_EnumOptions *msg, upb_arena *arena, size_t *len) {
|
8272
|
+
return upb_encode(msg, &google_protobuf_EnumOptions_msginit, arena, len);
|
8273
|
+
}
|
8274
|
+
|
8275
|
+
UPB_INLINE bool google_protobuf_EnumOptions_has_allow_alias(const google_protobuf_EnumOptions *msg) { return _upb_has_field(msg, 0); }
|
8276
|
+
UPB_INLINE bool google_protobuf_EnumOptions_allow_alias(const google_protobuf_EnumOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); }
|
8277
|
+
UPB_INLINE bool google_protobuf_EnumOptions_has_deprecated(const google_protobuf_EnumOptions *msg) { return _upb_has_field(msg, 1); }
|
8278
|
+
UPB_INLINE bool google_protobuf_EnumOptions_deprecated(const google_protobuf_EnumOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)); }
|
8279
|
+
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_EnumOptions_uninterpreted_option(const google_protobuf_EnumOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); }
|
8280
|
+
|
8281
|
+
UPB_INLINE void google_protobuf_EnumOptions_set_allow_alias(google_protobuf_EnumOptions *msg, bool value) {
|
8282
|
+
_upb_sethas(msg, 0);
|
8283
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value;
|
8284
|
+
}
|
8285
|
+
UPB_INLINE void google_protobuf_EnumOptions_set_deprecated(google_protobuf_EnumOptions *msg, bool value) {
|
8286
|
+
_upb_sethas(msg, 1);
|
8287
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value;
|
8288
|
+
}
|
8289
|
+
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumOptions_mutable_uninterpreted_option(google_protobuf_EnumOptions *msg, size_t *len) {
|
8290
|
+
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
|
8291
|
+
}
|
8292
|
+
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumOptions_resize_uninterpreted_option(google_protobuf_EnumOptions *msg, size_t len, upb_arena *arena) {
|
8293
|
+
return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
8294
|
+
}
|
8295
|
+
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumOptions_add_uninterpreted_option(google_protobuf_EnumOptions *msg, upb_arena *arena) {
|
8296
|
+
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
|
8297
|
+
bool ok = _upb_array_append_accessor(
|
8298
|
+
msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
8299
|
+
if (!ok) return NULL;
|
8300
|
+
return sub;
|
8301
|
+
}
|
8302
|
+
|
6893
8303
|
|
6894
|
-
|
6895
|
-
packed, name, num, msgdef, subdef, selector_base, \
|
6896
|
-
index, defaultval, refs, ref2s) \
|
6897
|
-
{ \
|
6898
|
-
UPB_DEF_INIT(name, UPB_DEF_FIELD, &upb_fielddef_vtbl, refs, ref2s), \
|
6899
|
-
defaultval, {msgdef}, {subdef}, NULL, false, false, \
|
6900
|
-
type == UPB_TYPE_STRING || type == UPB_TYPE_BYTES, true, is_extension, \
|
6901
|
-
lazy, packed, intfmt, tagdelim, type, label, num, selector_base, index \
|
6902
|
-
}
|
8304
|
+
/* google.protobuf.EnumValueOptions */
|
6903
8305
|
|
8306
|
+
UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_new(upb_arena *arena) {
|
8307
|
+
return (google_protobuf_EnumValueOptions *)upb_msg_new(&google_protobuf_EnumValueOptions_msginit, arena);
|
8308
|
+
}
|
8309
|
+
UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_parsenew(upb_strview buf, upb_arena *arena) {
|
8310
|
+
google_protobuf_EnumValueOptions *ret = google_protobuf_EnumValueOptions_new(arena);
|
8311
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_EnumValueOptions_msginit)) ? ret : NULL;
|
8312
|
+
}
|
8313
|
+
UPB_INLINE char *google_protobuf_EnumValueOptions_serialize(const google_protobuf_EnumValueOptions *msg, upb_arena *arena, size_t *len) {
|
8314
|
+
return upb_encode(msg, &google_protobuf_EnumValueOptions_msginit, arena, len);
|
8315
|
+
}
|
6904
8316
|
|
6905
|
-
|
8317
|
+
UPB_INLINE bool google_protobuf_EnumValueOptions_has_deprecated(const google_protobuf_EnumValueOptions *msg) { return _upb_has_field(msg, 0); }
|
8318
|
+
UPB_INLINE bool google_protobuf_EnumValueOptions_deprecated(const google_protobuf_EnumValueOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); }
|
8319
|
+
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_EnumValueOptions_uninterpreted_option(const google_protobuf_EnumValueOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); }
|
6906
8320
|
|
6907
|
-
|
6908
|
-
|
8321
|
+
UPB_INLINE void google_protobuf_EnumValueOptions_set_deprecated(google_protobuf_EnumValueOptions *msg, bool value) {
|
8322
|
+
_upb_sethas(msg, 0);
|
8323
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value;
|
8324
|
+
}
|
8325
|
+
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumValueOptions_mutable_uninterpreted_option(google_protobuf_EnumValueOptions *msg, size_t *len) {
|
8326
|
+
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
|
8327
|
+
}
|
8328
|
+
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumValueOptions_resize_uninterpreted_option(google_protobuf_EnumValueOptions *msg, size_t len, upb_arena *arena) {
|
8329
|
+
return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
8330
|
+
}
|
8331
|
+
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumValueOptions_add_uninterpreted_option(google_protobuf_EnumValueOptions *msg, upb_arena *arena) {
|
8332
|
+
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
|
8333
|
+
bool ok = _upb_array_append_accessor(
|
8334
|
+
msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
8335
|
+
if (!ok) return NULL;
|
8336
|
+
return sub;
|
8337
|
+
}
|
6909
8338
|
|
6910
|
-
size_t selector_count;
|
6911
|
-
uint32_t submsg_field_count;
|
6912
8339
|
|
6913
|
-
|
6914
|
-
upb_inttable itof; /* int to field */
|
6915
|
-
upb_strtable ntof; /* name to field/oneof */
|
8340
|
+
/* google.protobuf.ServiceOptions */
|
6916
8341
|
|
6917
|
-
|
6918
|
-
|
8342
|
+
UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_new(upb_arena *arena) {
|
8343
|
+
return (google_protobuf_ServiceOptions *)upb_msg_new(&google_protobuf_ServiceOptions_msginit, arena);
|
8344
|
+
}
|
8345
|
+
UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_parsenew(upb_strview buf, upb_arena *arena) {
|
8346
|
+
google_protobuf_ServiceOptions *ret = google_protobuf_ServiceOptions_new(arena);
|
8347
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_ServiceOptions_msginit)) ? ret : NULL;
|
8348
|
+
}
|
8349
|
+
UPB_INLINE char *google_protobuf_ServiceOptions_serialize(const google_protobuf_ServiceOptions *msg, upb_arena *arena, size_t *len) {
|
8350
|
+
return upb_encode(msg, &google_protobuf_ServiceOptions_msginit, arena, len);
|
8351
|
+
}
|
6919
8352
|
|
6920
|
-
|
6921
|
-
|
8353
|
+
UPB_INLINE bool google_protobuf_ServiceOptions_has_deprecated(const google_protobuf_ServiceOptions *msg) { return _upb_has_field(msg, 0); }
|
8354
|
+
UPB_INLINE bool google_protobuf_ServiceOptions_deprecated(const google_protobuf_ServiceOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); }
|
8355
|
+
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_ServiceOptions_uninterpreted_option(const google_protobuf_ServiceOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); }
|
6922
8356
|
|
6923
|
-
|
6924
|
-
|
8357
|
+
UPB_INLINE void google_protobuf_ServiceOptions_set_deprecated(google_protobuf_ServiceOptions *msg, bool value) {
|
8358
|
+
_upb_sethas(msg, 0);
|
8359
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value;
|
8360
|
+
}
|
8361
|
+
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ServiceOptions_mutable_uninterpreted_option(google_protobuf_ServiceOptions *msg, size_t *len) {
|
8362
|
+
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
|
8363
|
+
}
|
8364
|
+
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ServiceOptions_resize_uninterpreted_option(google_protobuf_ServiceOptions *msg, size_t len, upb_arena *arena) {
|
8365
|
+
return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
8366
|
+
}
|
8367
|
+
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ServiceOptions_add_uninterpreted_option(google_protobuf_ServiceOptions *msg, upb_arena *arena) {
|
8368
|
+
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
|
8369
|
+
bool ok = _upb_array_append_accessor(
|
8370
|
+
msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
8371
|
+
if (!ok) return NULL;
|
8372
|
+
return sub;
|
8373
|
+
}
|
6925
8374
|
|
6926
|
-
extern const struct upb_refcounted_vtbl upb_msgdef_vtbl;
|
6927
8375
|
|
6928
|
-
/*
|
6929
|
-
* needed if we compile in descriptors that contain oneofs. */
|
6930
|
-
#define UPB_MSGDEF_INIT(name, selector_count, submsg_field_count, itof, ntof, \
|
6931
|
-
map_entry, syntax, refs, ref2s) \
|
6932
|
-
{ \
|
6933
|
-
UPB_DEF_INIT(name, UPB_DEF_MSG, &upb_fielddef_vtbl, refs, ref2s), \
|
6934
|
-
selector_count, submsg_field_count, itof, ntof, map_entry, syntax \
|
6935
|
-
}
|
8376
|
+
/* google.protobuf.MethodOptions */
|
6936
8377
|
|
8378
|
+
UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_new(upb_arena *arena) {
|
8379
|
+
return (google_protobuf_MethodOptions *)upb_msg_new(&google_protobuf_MethodOptions_msginit, arena);
|
8380
|
+
}
|
8381
|
+
UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_parsenew(upb_strview buf, upb_arena *arena) {
|
8382
|
+
google_protobuf_MethodOptions *ret = google_protobuf_MethodOptions_new(arena);
|
8383
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_MethodOptions_msginit)) ? ret : NULL;
|
8384
|
+
}
|
8385
|
+
UPB_INLINE char *google_protobuf_MethodOptions_serialize(const google_protobuf_MethodOptions *msg, upb_arena *arena, size_t *len) {
|
8386
|
+
return upb_encode(msg, &google_protobuf_MethodOptions_msginit, arena, len);
|
8387
|
+
}
|
6937
8388
|
|
6938
|
-
|
8389
|
+
UPB_INLINE bool google_protobuf_MethodOptions_has_deprecated(const google_protobuf_MethodOptions *msg) { return _upb_has_field(msg, 1); }
|
8390
|
+
UPB_INLINE bool google_protobuf_MethodOptions_deprecated(const google_protobuf_MethodOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)); }
|
8391
|
+
UPB_INLINE bool google_protobuf_MethodOptions_has_idempotency_level(const google_protobuf_MethodOptions *msg) { return _upb_has_field(msg, 0); }
|
8392
|
+
UPB_INLINE google_protobuf_MethodOptions_IdempotencyLevel google_protobuf_MethodOptions_idempotency_level(const google_protobuf_MethodOptions *msg) { return UPB_FIELD_AT(msg, google_protobuf_MethodOptions_IdempotencyLevel, UPB_SIZE(8, 8)); }
|
8393
|
+
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MethodOptions_uninterpreted_option(const google_protobuf_MethodOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(20, 24), len); }
|
6939
8394
|
|
6940
|
-
|
6941
|
-
|
8395
|
+
UPB_INLINE void google_protobuf_MethodOptions_set_deprecated(google_protobuf_MethodOptions *msg, bool value) {
|
8396
|
+
_upb_sethas(msg, 1);
|
8397
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)) = value;
|
8398
|
+
}
|
8399
|
+
UPB_INLINE void google_protobuf_MethodOptions_set_idempotency_level(google_protobuf_MethodOptions *msg, google_protobuf_MethodOptions_IdempotencyLevel value) {
|
8400
|
+
_upb_sethas(msg, 0);
|
8401
|
+
UPB_FIELD_AT(msg, google_protobuf_MethodOptions_IdempotencyLevel, UPB_SIZE(8, 8)) = value;
|
8402
|
+
}
|
8403
|
+
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MethodOptions_mutable_uninterpreted_option(google_protobuf_MethodOptions *msg, size_t *len) {
|
8404
|
+
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 24), len);
|
8405
|
+
}
|
8406
|
+
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MethodOptions_resize_uninterpreted_option(google_protobuf_MethodOptions *msg, size_t len, upb_arena *arena) {
|
8407
|
+
return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 24), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
8408
|
+
}
|
8409
|
+
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MethodOptions_add_uninterpreted_option(google_protobuf_MethodOptions *msg, upb_arena *arena) {
|
8410
|
+
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
|
8411
|
+
bool ok = _upb_array_append_accessor(
|
8412
|
+
msg, UPB_SIZE(20, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
8413
|
+
if (!ok) return NULL;
|
8414
|
+
return sub;
|
8415
|
+
}
|
6942
8416
|
|
6943
|
-
upb_strtable ntoi;
|
6944
|
-
upb_inttable iton;
|
6945
|
-
int32_t defaultval;
|
6946
|
-
};
|
6947
8417
|
|
6948
|
-
|
8418
|
+
/* google.protobuf.UninterpretedOption */
|
6949
8419
|
|
6950
|
-
|
6951
|
-
|
6952
|
-
|
8420
|
+
UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_new(upb_arena *arena) {
|
8421
|
+
return (google_protobuf_UninterpretedOption *)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
|
8422
|
+
}
|
8423
|
+
UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_parsenew(upb_strview buf, upb_arena *arena) {
|
8424
|
+
google_protobuf_UninterpretedOption *ret = google_protobuf_UninterpretedOption_new(arena);
|
8425
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_UninterpretedOption_msginit)) ? ret : NULL;
|
8426
|
+
}
|
8427
|
+
UPB_INLINE char *google_protobuf_UninterpretedOption_serialize(const google_protobuf_UninterpretedOption *msg, upb_arena *arena, size_t *len) {
|
8428
|
+
return upb_encode(msg, &google_protobuf_UninterpretedOption_msginit, arena, len);
|
8429
|
+
}
|
6953
8430
|
|
8431
|
+
UPB_INLINE const google_protobuf_UninterpretedOption_NamePart* const* google_protobuf_UninterpretedOption_name(const google_protobuf_UninterpretedOption *msg, size_t *len) { return (const google_protobuf_UninterpretedOption_NamePart* const*)_upb_array_accessor(msg, UPB_SIZE(56, 80), len); }
|
8432
|
+
UPB_INLINE bool google_protobuf_UninterpretedOption_has_identifier_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 3); }
|
8433
|
+
UPB_INLINE upb_strview google_protobuf_UninterpretedOption_identifier_value(const google_protobuf_UninterpretedOption *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 32)); }
|
8434
|
+
UPB_INLINE bool google_protobuf_UninterpretedOption_has_positive_int_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 0); }
|
8435
|
+
UPB_INLINE uint64_t google_protobuf_UninterpretedOption_positive_int_value(const google_protobuf_UninterpretedOption *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)); }
|
8436
|
+
UPB_INLINE bool google_protobuf_UninterpretedOption_has_negative_int_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 1); }
|
8437
|
+
UPB_INLINE int64_t google_protobuf_UninterpretedOption_negative_int_value(const google_protobuf_UninterpretedOption *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)); }
|
8438
|
+
UPB_INLINE bool google_protobuf_UninterpretedOption_has_double_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 2); }
|
8439
|
+
UPB_INLINE double google_protobuf_UninterpretedOption_double_value(const google_protobuf_UninterpretedOption *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(24, 24)); }
|
8440
|
+
UPB_INLINE bool google_protobuf_UninterpretedOption_has_string_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 4); }
|
8441
|
+
UPB_INLINE upb_strview google_protobuf_UninterpretedOption_string_value(const google_protobuf_UninterpretedOption *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(40, 48)); }
|
8442
|
+
UPB_INLINE bool google_protobuf_UninterpretedOption_has_aggregate_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 5); }
|
8443
|
+
UPB_INLINE upb_strview google_protobuf_UninterpretedOption_aggregate_value(const google_protobuf_UninterpretedOption *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(48, 64)); }
|
6954
8444
|
|
6955
|
-
|
8445
|
+
UPB_INLINE google_protobuf_UninterpretedOption_NamePart** google_protobuf_UninterpretedOption_mutable_name(google_protobuf_UninterpretedOption *msg, size_t *len) {
|
8446
|
+
return (google_protobuf_UninterpretedOption_NamePart**)_upb_array_mutable_accessor(msg, UPB_SIZE(56, 80), len);
|
8447
|
+
}
|
8448
|
+
UPB_INLINE google_protobuf_UninterpretedOption_NamePart** google_protobuf_UninterpretedOption_resize_name(google_protobuf_UninterpretedOption *msg, size_t len, upb_arena *arena) {
|
8449
|
+
return (google_protobuf_UninterpretedOption_NamePart**)_upb_array_resize_accessor(msg, UPB_SIZE(56, 80), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
8450
|
+
}
|
8451
|
+
UPB_INLINE struct google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_add_name(google_protobuf_UninterpretedOption *msg, upb_arena *arena) {
|
8452
|
+
struct google_protobuf_UninterpretedOption_NamePart* sub = (struct google_protobuf_UninterpretedOption_NamePart*)upb_msg_new(&google_protobuf_UninterpretedOption_NamePart_msginit, arena);
|
8453
|
+
bool ok = _upb_array_append_accessor(
|
8454
|
+
msg, UPB_SIZE(56, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
8455
|
+
if (!ok) return NULL;
|
8456
|
+
return sub;
|
8457
|
+
}
|
8458
|
+
UPB_INLINE void google_protobuf_UninterpretedOption_set_identifier_value(google_protobuf_UninterpretedOption *msg, upb_strview value) {
|
8459
|
+
_upb_sethas(msg, 3);
|
8460
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 32)) = value;
|
8461
|
+
}
|
8462
|
+
UPB_INLINE void google_protobuf_UninterpretedOption_set_positive_int_value(google_protobuf_UninterpretedOption *msg, uint64_t value) {
|
8463
|
+
_upb_sethas(msg, 0);
|
8464
|
+
UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)) = value;
|
8465
|
+
}
|
8466
|
+
UPB_INLINE void google_protobuf_UninterpretedOption_set_negative_int_value(google_protobuf_UninterpretedOption *msg, int64_t value) {
|
8467
|
+
_upb_sethas(msg, 1);
|
8468
|
+
UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)) = value;
|
8469
|
+
}
|
8470
|
+
UPB_INLINE void google_protobuf_UninterpretedOption_set_double_value(google_protobuf_UninterpretedOption *msg, double value) {
|
8471
|
+
_upb_sethas(msg, 2);
|
8472
|
+
UPB_FIELD_AT(msg, double, UPB_SIZE(24, 24)) = value;
|
8473
|
+
}
|
8474
|
+
UPB_INLINE void google_protobuf_UninterpretedOption_set_string_value(google_protobuf_UninterpretedOption *msg, upb_strview value) {
|
8475
|
+
_upb_sethas(msg, 4);
|
8476
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(40, 48)) = value;
|
8477
|
+
}
|
8478
|
+
UPB_INLINE void google_protobuf_UninterpretedOption_set_aggregate_value(google_protobuf_UninterpretedOption *msg, upb_strview value) {
|
8479
|
+
_upb_sethas(msg, 5);
|
8480
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(48, 64)) = value;
|
8481
|
+
}
|
6956
8482
|
|
6957
|
-
struct upb_oneofdef {
|
6958
|
-
upb_refcounted base;
|
6959
8483
|
|
6960
|
-
|
6961
|
-
const char *name;
|
6962
|
-
upb_strtable ntof;
|
6963
|
-
upb_inttable itof;
|
6964
|
-
const upb_msgdef *parent;
|
6965
|
-
};
|
8484
|
+
/* google.protobuf.UninterpretedOption.NamePart */
|
6966
8485
|
|
6967
|
-
|
8486
|
+
UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_new(upb_arena *arena) {
|
8487
|
+
return (google_protobuf_UninterpretedOption_NamePart *)upb_msg_new(&google_protobuf_UninterpretedOption_NamePart_msginit, arena);
|
8488
|
+
}
|
8489
|
+
UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_parsenew(upb_strview buf, upb_arena *arena) {
|
8490
|
+
google_protobuf_UninterpretedOption_NamePart *ret = google_protobuf_UninterpretedOption_NamePart_new(arena);
|
8491
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_UninterpretedOption_NamePart_msginit)) ? ret : NULL;
|
8492
|
+
}
|
8493
|
+
UPB_INLINE char *google_protobuf_UninterpretedOption_NamePart_serialize(const google_protobuf_UninterpretedOption_NamePart *msg, upb_arena *arena, size_t *len) {
|
8494
|
+
return upb_encode(msg, &google_protobuf_UninterpretedOption_NamePart_msginit, arena, len);
|
8495
|
+
}
|
6968
8496
|
|
6969
|
-
|
6970
|
-
|
8497
|
+
UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_name_part(const google_protobuf_UninterpretedOption_NamePart *msg) { return _upb_has_field(msg, 1); }
|
8498
|
+
UPB_INLINE upb_strview google_protobuf_UninterpretedOption_NamePart_name_part(const google_protobuf_UninterpretedOption_NamePart *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); }
|
8499
|
+
UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg) { return _upb_has_field(msg, 0); }
|
8500
|
+
UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); }
|
6971
8501
|
|
8502
|
+
UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_name_part(google_protobuf_UninterpretedOption_NamePart *msg, upb_strview value) {
|
8503
|
+
_upb_sethas(msg, 1);
|
8504
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value;
|
8505
|
+
}
|
8506
|
+
UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_is_extension(google_protobuf_UninterpretedOption_NamePart *msg, bool value) {
|
8507
|
+
_upb_sethas(msg, 0);
|
8508
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value;
|
8509
|
+
}
|
6972
8510
|
|
6973
|
-
/* upb_symtab *****************************************************************/
|
6974
8511
|
|
6975
|
-
|
6976
|
-
upb_refcounted base;
|
8512
|
+
/* google.protobuf.SourceCodeInfo */
|
6977
8513
|
|
6978
|
-
|
6979
|
-
|
8514
|
+
UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_new(upb_arena *arena) {
|
8515
|
+
return (google_protobuf_SourceCodeInfo *)upb_msg_new(&google_protobuf_SourceCodeInfo_msginit, arena);
|
8516
|
+
}
|
8517
|
+
UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_parsenew(upb_strview buf, upb_arena *arena) {
|
8518
|
+
google_protobuf_SourceCodeInfo *ret = google_protobuf_SourceCodeInfo_new(arena);
|
8519
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_SourceCodeInfo_msginit)) ? ret : NULL;
|
8520
|
+
}
|
8521
|
+
UPB_INLINE char *google_protobuf_SourceCodeInfo_serialize(const google_protobuf_SourceCodeInfo *msg, upb_arena *arena, size_t *len) {
|
8522
|
+
return upb_encode(msg, &google_protobuf_SourceCodeInfo_msginit, arena, len);
|
8523
|
+
}
|
6980
8524
|
|
6981
|
-
|
6982
|
-
upb_refcounted base;
|
8525
|
+
UPB_INLINE const google_protobuf_SourceCodeInfo_Location* const* google_protobuf_SourceCodeInfo_location(const google_protobuf_SourceCodeInfo *msg, size_t *len) { return (const google_protobuf_SourceCodeInfo_Location* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
|
6983
8526
|
|
6984
|
-
|
6985
|
-
|
6986
|
-
|
6987
|
-
|
6988
|
-
|
8527
|
+
UPB_INLINE google_protobuf_SourceCodeInfo_Location** google_protobuf_SourceCodeInfo_mutable_location(google_protobuf_SourceCodeInfo *msg, size_t *len) {
|
8528
|
+
return (google_protobuf_SourceCodeInfo_Location**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
|
8529
|
+
}
|
8530
|
+
UPB_INLINE google_protobuf_SourceCodeInfo_Location** google_protobuf_SourceCodeInfo_resize_location(google_protobuf_SourceCodeInfo *msg, size_t len, upb_arena *arena) {
|
8531
|
+
return (google_protobuf_SourceCodeInfo_Location**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
8532
|
+
}
|
8533
|
+
UPB_INLINE struct google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_add_location(google_protobuf_SourceCodeInfo *msg, upb_arena *arena) {
|
8534
|
+
struct google_protobuf_SourceCodeInfo_Location* sub = (struct google_protobuf_SourceCodeInfo_Location*)upb_msg_new(&google_protobuf_SourceCodeInfo_Location_msginit, arena);
|
8535
|
+
bool ok = _upb_array_append_accessor(
|
8536
|
+
msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
8537
|
+
if (!ok) return NULL;
|
8538
|
+
return sub;
|
8539
|
+
}
|
6989
8540
|
|
6990
|
-
upb_inttable defs;
|
6991
|
-
upb_inttable deps;
|
6992
|
-
};
|
6993
8541
|
|
6994
|
-
|
8542
|
+
/* google.protobuf.SourceCodeInfo.Location */
|
6995
8543
|
|
6996
|
-
|
6997
|
-
|
6998
|
-
|
6999
|
-
|
8544
|
+
UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_new(upb_arena *arena) {
|
8545
|
+
return (google_protobuf_SourceCodeInfo_Location *)upb_msg_new(&google_protobuf_SourceCodeInfo_Location_msginit, arena);
|
8546
|
+
}
|
8547
|
+
UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_parsenew(upb_strview buf, upb_arena *arena) {
|
8548
|
+
google_protobuf_SourceCodeInfo_Location *ret = google_protobuf_SourceCodeInfo_Location_new(arena);
|
8549
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_SourceCodeInfo_Location_msginit)) ? ret : NULL;
|
8550
|
+
}
|
8551
|
+
UPB_INLINE char *google_protobuf_SourceCodeInfo_Location_serialize(const google_protobuf_SourceCodeInfo_Location *msg, upb_arena *arena, size_t *len) {
|
8552
|
+
return upb_encode(msg, &google_protobuf_SourceCodeInfo_Location_msginit, arena, len);
|
8553
|
+
}
|
7000
8554
|
|
7001
|
-
|
7002
|
-
|
8555
|
+
UPB_INLINE int32_t const* google_protobuf_SourceCodeInfo_Location_path(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); }
|
8556
|
+
UPB_INLINE int32_t const* google_protobuf_SourceCodeInfo_Location_span(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); }
|
8557
|
+
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_leading_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return _upb_has_field(msg, 0); }
|
8558
|
+
UPB_INLINE upb_strview google_protobuf_SourceCodeInfo_Location_leading_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); }
|
8559
|
+
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_trailing_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return _upb_has_field(msg, 1); }
|
8560
|
+
UPB_INLINE upb_strview google_protobuf_SourceCodeInfo_Location_trailing_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)); }
|
8561
|
+
UPB_INLINE upb_strview const* google_protobuf_SourceCodeInfo_Location_leading_detached_comments(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); }
|
8562
|
+
|
8563
|
+
UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_mutable_path(google_protobuf_SourceCodeInfo_Location *msg, size_t *len) {
|
8564
|
+
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
|
8565
|
+
}
|
8566
|
+
UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_resize_path(google_protobuf_SourceCodeInfo_Location *msg, size_t len, upb_arena *arena) {
|
8567
|
+
return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena);
|
8568
|
+
}
|
8569
|
+
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_path(google_protobuf_SourceCodeInfo_Location *msg, int32_t val, upb_arena *arena) {
|
8570
|
+
return _upb_array_append_accessor(
|
8571
|
+
msg, UPB_SIZE(20, 40), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena);
|
8572
|
+
}
|
8573
|
+
UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_mutable_span(google_protobuf_SourceCodeInfo_Location *msg, size_t *len) {
|
8574
|
+
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
|
8575
|
+
}
|
8576
|
+
UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_resize_span(google_protobuf_SourceCodeInfo_Location *msg, size_t len, upb_arena *arena) {
|
8577
|
+
return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena);
|
8578
|
+
}
|
8579
|
+
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_span(google_protobuf_SourceCodeInfo_Location *msg, int32_t val, upb_arena *arena) {
|
8580
|
+
return _upb_array_append_accessor(
|
8581
|
+
msg, UPB_SIZE(24, 48), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena);
|
8582
|
+
}
|
8583
|
+
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_leading_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_strview value) {
|
8584
|
+
_upb_sethas(msg, 0);
|
8585
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value;
|
8586
|
+
}
|
8587
|
+
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_trailing_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_strview value) {
|
8588
|
+
_upb_sethas(msg, 1);
|
8589
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)) = value;
|
8590
|
+
}
|
8591
|
+
UPB_INLINE upb_strview* google_protobuf_SourceCodeInfo_Location_mutable_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, size_t *len) {
|
8592
|
+
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
|
8593
|
+
}
|
8594
|
+
UPB_INLINE upb_strview* google_protobuf_SourceCodeInfo_Location_resize_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, size_t len, upb_arena *arena) {
|
8595
|
+
return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena);
|
8596
|
+
}
|
8597
|
+
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_strview val, upb_arena *arena) {
|
8598
|
+
return _upb_array_append_accessor(
|
8599
|
+
msg, UPB_SIZE(28, 56), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena);
|
8600
|
+
}
|
7003
8601
|
|
7004
8602
|
|
7005
|
-
|
8603
|
+
/* google.protobuf.GeneratedCodeInfo */
|
8604
|
+
|
8605
|
+
UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_new(upb_arena *arena) {
|
8606
|
+
return (google_protobuf_GeneratedCodeInfo *)upb_msg_new(&google_protobuf_GeneratedCodeInfo_msginit, arena);
|
8607
|
+
}
|
8608
|
+
UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_parsenew(upb_strview buf, upb_arena *arena) {
|
8609
|
+
google_protobuf_GeneratedCodeInfo *ret = google_protobuf_GeneratedCodeInfo_new(arena);
|
8610
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_GeneratedCodeInfo_msginit)) ? ret : NULL;
|
8611
|
+
}
|
8612
|
+
UPB_INLINE char *google_protobuf_GeneratedCodeInfo_serialize(const google_protobuf_GeneratedCodeInfo *msg, upb_arena *arena, size_t *len) {
|
8613
|
+
return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_msginit, arena, len);
|
8614
|
+
}
|
8615
|
+
|
8616
|
+
UPB_INLINE const google_protobuf_GeneratedCodeInfo_Annotation* const* google_protobuf_GeneratedCodeInfo_annotation(const google_protobuf_GeneratedCodeInfo *msg, size_t *len) { return (const google_protobuf_GeneratedCodeInfo_Annotation* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
|
8617
|
+
|
8618
|
+
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation** google_protobuf_GeneratedCodeInfo_mutable_annotation(google_protobuf_GeneratedCodeInfo *msg, size_t *len) {
|
8619
|
+
return (google_protobuf_GeneratedCodeInfo_Annotation**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
|
8620
|
+
}
|
8621
|
+
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation** google_protobuf_GeneratedCodeInfo_resize_annotation(google_protobuf_GeneratedCodeInfo *msg, size_t len, upb_arena *arena) {
|
8622
|
+
return (google_protobuf_GeneratedCodeInfo_Annotation**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
8623
|
+
}
|
8624
|
+
UPB_INLINE struct google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_add_annotation(google_protobuf_GeneratedCodeInfo *msg, upb_arena *arena) {
|
8625
|
+
struct google_protobuf_GeneratedCodeInfo_Annotation* sub = (struct google_protobuf_GeneratedCodeInfo_Annotation*)upb_msg_new(&google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena);
|
8626
|
+
bool ok = _upb_array_append_accessor(
|
8627
|
+
msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
8628
|
+
if (!ok) return NULL;
|
8629
|
+
return sub;
|
8630
|
+
}
|
8631
|
+
|
8632
|
+
|
8633
|
+
/* google.protobuf.GeneratedCodeInfo.Annotation */
|
8634
|
+
|
8635
|
+
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_new(upb_arena *arena) {
|
8636
|
+
return (google_protobuf_GeneratedCodeInfo_Annotation *)upb_msg_new(&google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena);
|
8637
|
+
}
|
8638
|
+
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_parsenew(upb_strview buf, upb_arena *arena) {
|
8639
|
+
google_protobuf_GeneratedCodeInfo_Annotation *ret = google_protobuf_GeneratedCodeInfo_Annotation_new(arena);
|
8640
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_GeneratedCodeInfo_Annotation_msginit)) ? ret : NULL;
|
8641
|
+
}
|
8642
|
+
UPB_INLINE char *google_protobuf_GeneratedCodeInfo_Annotation_serialize(const google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_arena *arena, size_t *len) {
|
8643
|
+
return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena, len);
|
8644
|
+
}
|
8645
|
+
|
8646
|
+
UPB_INLINE int32_t const* google_protobuf_GeneratedCodeInfo_Annotation_path(const google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(20, 32), len); }
|
8647
|
+
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_has_field(msg, 2); }
|
8648
|
+
UPB_INLINE upb_strview google_protobuf_GeneratedCodeInfo_Annotation_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 16)); }
|
8649
|
+
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_begin(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_has_field(msg, 0); }
|
8650
|
+
UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_begin(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); }
|
8651
|
+
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_end(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_has_field(msg, 1); }
|
8652
|
+
UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_end(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); }
|
8653
|
+
|
8654
|
+
UPB_INLINE int32_t* google_protobuf_GeneratedCodeInfo_Annotation_mutable_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t *len) {
|
8655
|
+
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 32), len);
|
8656
|
+
}
|
8657
|
+
UPB_INLINE int32_t* google_protobuf_GeneratedCodeInfo_Annotation_resize_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t len, upb_arena *arena) {
|
8658
|
+
return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 32), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena);
|
8659
|
+
}
|
8660
|
+
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_add_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t val, upb_arena *arena) {
|
8661
|
+
return _upb_array_append_accessor(
|
8662
|
+
msg, UPB_SIZE(20, 32), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena);
|
8663
|
+
}
|
8664
|
+
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_source_file(google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_strview value) {
|
8665
|
+
_upb_sethas(msg, 2);
|
8666
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 16)) = value;
|
8667
|
+
}
|
8668
|
+
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_begin(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) {
|
8669
|
+
_upb_sethas(msg, 0);
|
8670
|
+
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value;
|
8671
|
+
}
|
8672
|
+
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_end(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) {
|
8673
|
+
_upb_sethas(msg, 1);
|
8674
|
+
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value;
|
8675
|
+
}
|
7006
8676
|
|
7007
|
-
char *upb_encode(const void *msg, const upb_msglayout_msginit_v1 *l,
|
7008
|
-
upb_env *env, size_t *size);
|
7009
8677
|
|
7010
8678
|
UPB_END_EXTERN_C
|
7011
8679
|
|
7012
|
-
|
8680
|
+
|
8681
|
+
#endif /* GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_ */
|
8682
|
+
|
8683
|
+
|
8684
|
+
#ifndef UPB_MSGFACTORY_H_
|
8685
|
+
#define UPB_MSGFACTORY_H_
|
8686
|
+
|
8687
|
+
#ifdef __cplusplus
|
8688
|
+
namespace upb {
|
8689
|
+
class MessageFactory;
|
8690
|
+
}
|
8691
|
+
#endif
|
8692
|
+
|
8693
|
+
UPB_DECLARE_TYPE(upb::MessageFactory, upb_msgfactory)
|
8694
|
+
|
8695
|
+
/** upb_msgfactory ************************************************************/
|
8696
|
+
|
8697
|
+
/* A upb_msgfactory contains a cache of upb_msglayout, upb_handlers, and
|
8698
|
+
* upb_visitorplan objects. These are the objects necessary to represent,
|
8699
|
+
* populate, and and visit upb_msg objects.
|
8700
|
+
*
|
8701
|
+
* These caches are all populated by upb_msgdef, and lazily created on demand.
|
8702
|
+
*/
|
8703
|
+
|
8704
|
+
/* Creates and destroys a msgfactory, respectively. The messages for this
|
8705
|
+
* msgfactory must come from |symtab| (which should outlive the msgfactory). */
|
8706
|
+
upb_msgfactory *upb_msgfactory_new(const upb_symtab *symtab);
|
8707
|
+
void upb_msgfactory_free(upb_msgfactory *f);
|
8708
|
+
|
8709
|
+
const upb_symtab *upb_msgfactory_symtab(const upb_msgfactory *f);
|
8710
|
+
|
8711
|
+
/* The functions to get cached objects, lazily creating them on demand. These
|
8712
|
+
* all require:
|
8713
|
+
*
|
8714
|
+
* - m is in upb_msgfactory_symtab(f)
|
8715
|
+
* - upb_msgdef_mapentry(m) == false (since map messages can't have layouts).
|
8716
|
+
*
|
8717
|
+
* The returned objects will live for as long as the msgfactory does.
|
8718
|
+
*
|
8719
|
+
* TODO(haberman): consider making this thread-safe and take a const
|
8720
|
+
* upb_msgfactory. */
|
8721
|
+
const upb_msglayout *upb_msgfactory_getlayout(upb_msgfactory *f,
|
8722
|
+
const upb_msgdef *m);
|
8723
|
+
|
8724
|
+
|
8725
|
+
#endif /* UPB_MSGFACTORY_H_ */
|
7013
8726
|
/*
|
7014
8727
|
** upb::descriptor::Reader (upb_descreader)
|
7015
8728
|
**
|
@@ -7112,53 +8825,6 @@ inline FileDef* Reader::file(size_t i) const {
|
|
7112
8825
|
|
7113
8826
|
UPB_BEGIN_EXTERN_C
|
7114
8827
|
|
7115
|
-
/* Enums */
|
7116
|
-
|
7117
|
-
typedef enum {
|
7118
|
-
google_protobuf_FieldDescriptorProto_LABEL_OPTIONAL = 1,
|
7119
|
-
google_protobuf_FieldDescriptorProto_LABEL_REQUIRED = 2,
|
7120
|
-
google_protobuf_FieldDescriptorProto_LABEL_REPEATED = 3
|
7121
|
-
} google_protobuf_FieldDescriptorProto_Label;
|
7122
|
-
|
7123
|
-
typedef enum {
|
7124
|
-
google_protobuf_FieldDescriptorProto_TYPE_DOUBLE = 1,
|
7125
|
-
google_protobuf_FieldDescriptorProto_TYPE_FLOAT = 2,
|
7126
|
-
google_protobuf_FieldDescriptorProto_TYPE_INT64 = 3,
|
7127
|
-
google_protobuf_FieldDescriptorProto_TYPE_UINT64 = 4,
|
7128
|
-
google_protobuf_FieldDescriptorProto_TYPE_INT32 = 5,
|
7129
|
-
google_protobuf_FieldDescriptorProto_TYPE_FIXED64 = 6,
|
7130
|
-
google_protobuf_FieldDescriptorProto_TYPE_FIXED32 = 7,
|
7131
|
-
google_protobuf_FieldDescriptorProto_TYPE_BOOL = 8,
|
7132
|
-
google_protobuf_FieldDescriptorProto_TYPE_STRING = 9,
|
7133
|
-
google_protobuf_FieldDescriptorProto_TYPE_GROUP = 10,
|
7134
|
-
google_protobuf_FieldDescriptorProto_TYPE_MESSAGE = 11,
|
7135
|
-
google_protobuf_FieldDescriptorProto_TYPE_BYTES = 12,
|
7136
|
-
google_protobuf_FieldDescriptorProto_TYPE_UINT32 = 13,
|
7137
|
-
google_protobuf_FieldDescriptorProto_TYPE_ENUM = 14,
|
7138
|
-
google_protobuf_FieldDescriptorProto_TYPE_SFIXED32 = 15,
|
7139
|
-
google_protobuf_FieldDescriptorProto_TYPE_SFIXED64 = 16,
|
7140
|
-
google_protobuf_FieldDescriptorProto_TYPE_SINT32 = 17,
|
7141
|
-
google_protobuf_FieldDescriptorProto_TYPE_SINT64 = 18
|
7142
|
-
} google_protobuf_FieldDescriptorProto_Type;
|
7143
|
-
|
7144
|
-
typedef enum {
|
7145
|
-
google_protobuf_FieldOptions_STRING = 0,
|
7146
|
-
google_protobuf_FieldOptions_CORD = 1,
|
7147
|
-
google_protobuf_FieldOptions_STRING_PIECE = 2
|
7148
|
-
} google_protobuf_FieldOptions_CType;
|
7149
|
-
|
7150
|
-
typedef enum {
|
7151
|
-
google_protobuf_FieldOptions_JS_NORMAL = 0,
|
7152
|
-
google_protobuf_FieldOptions_JS_STRING = 1,
|
7153
|
-
google_protobuf_FieldOptions_JS_NUMBER = 2
|
7154
|
-
} google_protobuf_FieldOptions_JSType;
|
7155
|
-
|
7156
|
-
typedef enum {
|
7157
|
-
google_protobuf_FileOptions_SPEED = 1,
|
7158
|
-
google_protobuf_FileOptions_CODE_SIZE = 2,
|
7159
|
-
google_protobuf_FileOptions_LITE_RUNTIME = 3
|
7160
|
-
} google_protobuf_FileOptions_OptimizeMode;
|
7161
|
-
|
7162
8828
|
/* MessageDefs: call these functions to get a ref to a msgdef. */
|
7163
8829
|
const upb_msgdef *upbdefs_google_protobuf_DescriptorProto_get(const void *owner);
|
7164
8830
|
const upb_msgdef *upbdefs_google_protobuf_DescriptorProto_ExtensionRange_get(const void *owner);
|
@@ -8065,14 +9731,8 @@ inline const DecoderMethod *CodeCache::GetDecoderMethod(
|
|
8065
9731
|
|
8066
9732
|
#endif /* UPB_DECODER_H_ */
|
8067
9733
|
|
8068
|
-
|
8069
|
-
|
8070
|
-
namespace upb {
|
8071
|
-
namespace pb {
|
8072
|
-
class MessageGroup;
|
8073
|
-
} /* namespace pb */
|
8074
|
-
} /* namespace upb */
|
8075
|
-
#endif
|
9734
|
+
#ifndef __cplusplus
|
9735
|
+
|
8076
9736
|
UPB_DECLARE_DERIVED_TYPE(upb::pb::MessageGroup, upb::RefCounted,
|
8077
9737
|
mgroup, upb_refcounted)
|
8078
9738
|
|
@@ -8135,7 +9795,7 @@ typedef enum {
|
|
8135
9795
|
|
8136
9796
|
#define OP_MAX OP_HALT
|
8137
9797
|
|
8138
|
-
UPB_INLINE opcode getop(uint32_t instr) { return instr & 0xff; }
|
9798
|
+
UPB_INLINE opcode getop(uint32_t instr) { return (opcode)(instr & 0xff); }
|
8139
9799
|
|
8140
9800
|
/* Method group; represents a set of decoder methods that had their code
|
8141
9801
|
* emitted together, and must therefore be freed together. Immutable once
|
@@ -8382,6 +10042,8 @@ UPB_INLINE void upb_pbdecoder_unpackdispatch(uint64_t dispatch, uint64_t *ofs,
|
|
8382
10042
|
|
8383
10043
|
#define CHECK_RETURN(x) { int32_t ret = x; if (ret >= 0) return ret; }
|
8384
10044
|
|
10045
|
+
#endif /* __cplusplus */
|
10046
|
+
|
8385
10047
|
#endif /* UPB_DECODER_INT_H_ */
|
8386
10048
|
/*
|
8387
10049
|
** A number of routines for varint manipulation (we keep them all around to
|
@@ -8793,7 +10455,7 @@ UPB_DECLARE_DERIVED_TYPE(upb::json::ParserMethod, upb::RefCounted,
|
|
8793
10455
|
* constructed. This hint may be an overestimate for some build configurations.
|
8794
10456
|
* But if the parser library is upgraded without recompiling the application,
|
8795
10457
|
* it may be an underestimate. */
|
8796
|
-
#define UPB_JSON_PARSER_SIZE
|
10458
|
+
#define UPB_JSON_PARSER_SIZE 5712
|
8797
10459
|
|
8798
10460
|
#ifdef __cplusplus
|
8799
10461
|
|
@@ -8802,7 +10464,8 @@ UPB_DECLARE_DERIVED_TYPE(upb::json::ParserMethod, upb::RefCounted,
|
|
8802
10464
|
class upb::json::Parser {
|
8803
10465
|
public:
|
8804
10466
|
static Parser* Create(Environment* env, const ParserMethod* method,
|
8805
|
-
|
10467
|
+
const SymbolTable* symtab,
|
10468
|
+
Sink* output, bool ignore_json_unknown);
|
8806
10469
|
|
8807
10470
|
BytesSink* input();
|
8808
10471
|
|
@@ -8836,7 +10499,9 @@ UPB_BEGIN_EXTERN_C
|
|
8836
10499
|
|
8837
10500
|
upb_json_parser* upb_json_parser_create(upb_env* e,
|
8838
10501
|
const upb_json_parsermethod* m,
|
8839
|
-
|
10502
|
+
const upb_symtab* symtab,
|
10503
|
+
upb_sink* output,
|
10504
|
+
bool ignore_json_unknown);
|
8840
10505
|
upb_bytessink *upb_json_parser_input(upb_json_parser *p);
|
8841
10506
|
|
8842
10507
|
upb_json_parsermethod* upb_json_parsermethod_new(const upb_msgdef* md,
|
@@ -8856,8 +10521,10 @@ UPB_END_EXTERN_C
|
|
8856
10521
|
namespace upb {
|
8857
10522
|
namespace json {
|
8858
10523
|
inline Parser* Parser::Create(Environment* env, const ParserMethod* method,
|
8859
|
-
|
8860
|
-
|
10524
|
+
const SymbolTable* symtab,
|
10525
|
+
Sink* output, bool ignore_json_unknown) {
|
10526
|
+
return upb_json_parser_create(
|
10527
|
+
env, method, symtab, output, ignore_json_unknown);
|
8861
10528
|
}
|
8862
10529
|
inline BytesSink* Parser::input() {
|
8863
10530
|
return upb_json_parser_input(this);
|
@@ -8906,7 +10573,7 @@ UPB_DECLARE_TYPE(upb::json::Printer, upb_json_printer)
|
|
8906
10573
|
|
8907
10574
|
/* upb::json::Printer *********************************************************/
|
8908
10575
|
|
8909
|
-
#define UPB_JSON_PRINTER_SIZE
|
10576
|
+
#define UPB_JSON_PRINTER_SIZE 192
|
8910
10577
|
|
8911
10578
|
#ifdef __cplusplus
|
8912
10579
|
|
@@ -8967,3 +10634,8 @@ inline reffed_ptr
|
|
8967
10634
|
#endif
|
8968
10635
|
|
8969
10636
|
#endif /* UPB_JSON_TYPED_PRINTER_H_ */
|
10637
|
+
|
10638
|
+
#undef UPB_SIZE
|
10639
|
+
#undef UPB_FIELD_AT
|
10640
|
+
#undef UPB_READ_ONEOF
|
10641
|
+
#undef UPB_WRITE_ONEOF
|