google-protobuf 3.6.1-universal-darwin → 3.7.0.rc.2-universal-darwin
Sign up to get free protection for your applications and to get access to all the features.
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 +554 -71
- data/ext/google/protobuf_c/encode_decode.c +238 -66
- data/ext/google/protobuf_c/extconf.rb +5 -1
- data/ext/google/protobuf_c/message.c +135 -69
- data/ext/google/protobuf_c/protobuf.c +4 -0
- data/ext/google/protobuf_c/protobuf.h +62 -2
- data/ext/google/protobuf_c/storage.c +211 -104
- data/ext/google/protobuf_c/upb.c +4126 -1721
- data/ext/google/protobuf_c/upb.h +1125 -339
- data/ext/google/protobuf_c/wrap_memcpy.c +1 -1
- data/lib/google/2.3/protobuf_c.bundle +0 -0
- data/lib/google/2.4/protobuf_c.bundle +0 -0
- data/lib/google/2.5/protobuf_c.bundle +0 -0
- data/lib/google/2.6/protobuf_c.bundle +0 -0
- 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 +137 -1181
- data/tests/generated_code_test.rb +5 -3
- metadata +6 -9
- data/lib/google/2.0/protobuf_c.bundle +0 -0
- data/lib/google/2.1/protobuf_c.bundle +0 -0
- data/lib/google/2.2/protobuf_c.bundle +0 -0
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 <int N> class upb::InlinedEnvironment : public upb::Environment {
|
|
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" {
|
@@ -1995,6 +2001,36 @@ typedef enum {
|
|
1995
2001
|
UPB_SYNTAX_PROTO3 = 3
|
1996
2002
|
} upb_syntax_t;
|
1997
2003
|
|
2004
|
+
/* All the different kind of well known type messages. For simplicity of check,
|
2005
|
+
* number wrappers and string wrappers are grouped together. Make sure the
|
2006
|
+
* order and merber of these groups are not changed.
|
2007
|
+
*/
|
2008
|
+
typedef enum {
|
2009
|
+
UPB_WELLKNOWN_UNSPECIFIED,
|
2010
|
+
UPB_WELLKNOWN_ANY,
|
2011
|
+
UPB_WELLKNOWN_FIELDMASK,
|
2012
|
+
UPB_WELLKNOWN_DURATION,
|
2013
|
+
UPB_WELLKNOWN_TIMESTAMP,
|
2014
|
+
/* number wrappers */
|
2015
|
+
UPB_WELLKNOWN_DOUBLEVALUE,
|
2016
|
+
UPB_WELLKNOWN_FLOATVALUE,
|
2017
|
+
UPB_WELLKNOWN_INT64VALUE,
|
2018
|
+
UPB_WELLKNOWN_UINT64VALUE,
|
2019
|
+
UPB_WELLKNOWN_INT32VALUE,
|
2020
|
+
UPB_WELLKNOWN_UINT32VALUE,
|
2021
|
+
/* string wrappers */
|
2022
|
+
UPB_WELLKNOWN_STRINGVALUE,
|
2023
|
+
UPB_WELLKNOWN_BYTESVALUE,
|
2024
|
+
UPB_WELLKNOWN_BOOLVALUE,
|
2025
|
+
UPB_WELLKNOWN_VALUE,
|
2026
|
+
UPB_WELLKNOWN_LISTVALUE,
|
2027
|
+
UPB_WELLKNOWN_STRUCT
|
2028
|
+
} upb_wellknowntype_t;
|
2029
|
+
|
2030
|
+
|
2031
|
+
/* Maps descriptor type -> upb field type. */
|
2032
|
+
extern const uint8_t upb_desctype_to_fieldtype[];
|
2033
|
+
|
1998
2034
|
/* Maximum field number allowed for FieldDefs. This is an inherent limit of the
|
1999
2035
|
* protobuf wire format. */
|
2000
2036
|
#define UPB_MAX_FIELDNUMBER ((1 << 29) - 1)
|
@@ -2376,6 +2412,18 @@ typedef upb_strtable_iter upb_msg_oneof_iter;
|
|
2376
2412
|
#define UPB_MAPENTRY_KEY 1
|
2377
2413
|
#define UPB_MAPENTRY_VALUE 2
|
2378
2414
|
|
2415
|
+
/* Well-known field tag numbers for Any messages. */
|
2416
|
+
#define UPB_ANY_TYPE 1
|
2417
|
+
#define UPB_ANY_VALUE 2
|
2418
|
+
|
2419
|
+
/* Well-known field tag numbers for timestamp messages. */
|
2420
|
+
#define UPB_DURATION_SECONDS 1
|
2421
|
+
#define UPB_DURATION_NANOS 2
|
2422
|
+
|
2423
|
+
/* Well-known field tag numbers for duration messages. */
|
2424
|
+
#define UPB_TIMESTAMP_SECONDS 1
|
2425
|
+
#define UPB_TIMESTAMP_NANOS 2
|
2426
|
+
|
2379
2427
|
#ifdef __cplusplus
|
2380
2428
|
|
2381
2429
|
/* Structure that describes a single .proto message type.
|
@@ -2490,6 +2538,13 @@ class upb::MessageDef {
|
|
2490
2538
|
void setmapentry(bool map_entry);
|
2491
2539
|
bool mapentry() const;
|
2492
2540
|
|
2541
|
+
/* Return the type of well known type message. UPB_WELLKNOWN_UNSPECIFIED for
|
2542
|
+
* non-well-known message. */
|
2543
|
+
upb_wellknowntype_t wellknowntype() const;
|
2544
|
+
|
2545
|
+
/* Whether is a number wrapper. */
|
2546
|
+
bool isnumberwrapper() const;
|
2547
|
+
|
2493
2548
|
/* Iteration over fields. The order is undefined. */
|
2494
2549
|
class field_iterator
|
2495
2550
|
: public std::iterator<std::forward_iterator_tag, FieldDef*> {
|
@@ -2631,6 +2686,8 @@ bool upb_msgdef_addoneof(upb_msgdef *m, upb_oneofdef *o, const void *ref_donor,
|
|
2631
2686
|
bool upb_msgdef_setfullname(upb_msgdef *m, const char *fullname, upb_status *s);
|
2632
2687
|
void upb_msgdef_setmapentry(upb_msgdef *m, bool map_entry);
|
2633
2688
|
bool upb_msgdef_mapentry(const upb_msgdef *m);
|
2689
|
+
upb_wellknowntype_t upb_msgdef_wellknowntype(const upb_msgdef *m);
|
2690
|
+
bool upb_msgdef_isnumberwrapper(const upb_msgdef *m);
|
2634
2691
|
bool upb_msgdef_setsyntax(upb_msgdef *m, upb_syntax_t syntax);
|
2635
2692
|
|
2636
2693
|
/* Field lookup in a couple of different variations:
|
@@ -3214,6 +3271,8 @@ const upb_def *upb_symtab_resolve(const upb_symtab *s, const char *base,
|
|
3214
3271
|
const char *sym);
|
3215
3272
|
const upb_def *upb_symtab_lookup(const upb_symtab *s, const char *sym);
|
3216
3273
|
const upb_msgdef *upb_symtab_lookupmsg(const upb_symtab *s, const char *sym);
|
3274
|
+
const upb_msgdef *upb_symtab_lookupmsg2(
|
3275
|
+
const upb_symtab *s, const char *sym, size_t len);
|
3217
3276
|
const upb_enumdef *upb_symtab_lookupenum(const upb_symtab *s, const char *sym);
|
3218
3277
|
bool upb_symtab_add(upb_symtab *s, upb_def *const*defs, size_t n,
|
3219
3278
|
void *ref_donor, upb_status *status);
|
@@ -3570,6 +3629,12 @@ inline void MessageDef::setmapentry(bool map_entry) {
|
|
3570
3629
|
inline bool MessageDef::mapentry() const {
|
3571
3630
|
return upb_msgdef_mapentry(this);
|
3572
3631
|
}
|
3632
|
+
inline upb_wellknowntype_t MessageDef::wellknowntype() const {
|
3633
|
+
return upb_msgdef_wellknowntype(this);
|
3634
|
+
}
|
3635
|
+
inline bool MessageDef::isnumberwrapper() const {
|
3636
|
+
return upb_msgdef_isnumberwrapper(this);
|
3637
|
+
}
|
3573
3638
|
inline MessageDef::field_iterator MessageDef::field_begin() {
|
3574
3639
|
return field_iterator(this);
|
3575
3640
|
}
|
@@ -4697,6 +4762,34 @@ UPB_INLINE upb_selector_t upb_handlers_getendselector(upb_selector_t start) {
|
|
4697
4762
|
uint32_t upb_handlers_selectorbaseoffset(const upb_fielddef *f);
|
4698
4763
|
uint32_t upb_handlers_selectorcount(const upb_fielddef *f);
|
4699
4764
|
|
4765
|
+
|
4766
|
+
/** Message handlers ******************************************************************/
|
4767
|
+
|
4768
|
+
/* These are the handlers used internally by upb_msgfactory_getmergehandlers().
|
4769
|
+
* They write scalar data to a known offset from the message pointer.
|
4770
|
+
*
|
4771
|
+
* These would be trivial for anyone to implement themselves, but it's better
|
4772
|
+
* to use these because some JITs will recognize and specialize these instead
|
4773
|
+
* of actually calling the function. */
|
4774
|
+
|
4775
|
+
/* Sets a handler for the given primitive field that will write the data at the
|
4776
|
+
* given offset. If hasbit > 0, also sets a hasbit at the given bit offset
|
4777
|
+
* (addressing each byte low to high). */
|
4778
|
+
bool upb_msg_setscalarhandler(upb_handlers *h,
|
4779
|
+
const upb_fielddef *f,
|
4780
|
+
size_t offset,
|
4781
|
+
int32_t hasbit);
|
4782
|
+
|
4783
|
+
/* If the given handler is a msghandlers_primitive field, returns true and sets
|
4784
|
+
* *type, *offset and *hasbit. Otherwise returns false. */
|
4785
|
+
bool upb_msg_getscalarhandlerdata(const upb_handlers *h,
|
4786
|
+
upb_selector_t s,
|
4787
|
+
upb_fieldtype_t *type,
|
4788
|
+
size_t *offset,
|
4789
|
+
int32_t *hasbit);
|
4790
|
+
|
4791
|
+
|
4792
|
+
|
4700
4793
|
UPB_END_EXTERN_C
|
4701
4794
|
|
4702
4795
|
/*
|
@@ -6381,21 +6474,14 @@ namespace upb {
|
|
6381
6474
|
class Array;
|
6382
6475
|
class Map;
|
6383
6476
|
class MapIterator;
|
6384
|
-
class MessageFactory;
|
6385
6477
|
class MessageLayout;
|
6386
|
-
class Visitor;
|
6387
|
-
class VisitorPlan;
|
6388
6478
|
}
|
6389
6479
|
|
6390
6480
|
#endif
|
6391
6481
|
|
6392
|
-
UPB_DECLARE_TYPE(upb::MessageFactory, upb_msgfactory)
|
6393
|
-
UPB_DECLARE_TYPE(upb::MessageLayout, upb_msglayout)
|
6394
6482
|
UPB_DECLARE_TYPE(upb::Array, upb_array)
|
6395
6483
|
UPB_DECLARE_TYPE(upb::Map, upb_map)
|
6396
6484
|
UPB_DECLARE_TYPE(upb::MapIterator, upb_mapiter)
|
6397
|
-
UPB_DECLARE_TYPE(upb::Visitor, upb_visitor)
|
6398
|
-
UPB_DECLARE_TYPE(upb::VisitorPlan, upb_visitorplan)
|
6399
6485
|
|
6400
6486
|
/* TODO(haberman): C++ accessors */
|
6401
6487
|
|
@@ -6406,53 +6492,28 @@ typedef void upb_msg;
|
|
6406
6492
|
|
6407
6493
|
/** upb_msglayout *************************************************************/
|
6408
6494
|
|
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);
|
6422
|
-
|
6423
|
-
|
6424
|
-
/** upb_msgfactory ************************************************************/
|
6425
|
-
|
6426
|
-
/* A upb_msgfactory contains a cache of upb_msglayout, upb_handlers, and
|
6427
|
-
* upb_visitorplan objects. These are the objects necessary to represent,
|
6428
|
-
* populate, and and visit upb_msg objects.
|
6429
|
-
*
|
6430
|
-
* These caches are all populated by upb_msgdef, and lazily created on demand.
|
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);
|
6495
|
+
/* upb_msglayout represents the memory layout of a given upb_msgdef. The
|
6496
|
+
* members are public so generated code can initialize them, but users MUST NOT
|
6497
|
+
* read or write any of its members. */
|
6437
6498
|
|
6438
|
-
|
6499
|
+
typedef struct {
|
6500
|
+
uint32_t number;
|
6501
|
+
uint16_t offset;
|
6502
|
+
int16_t presence; /* If >0, hasbit_index+1. If <0, oneof_index+1. */
|
6503
|
+
uint16_t submsg_index; /* undefined if descriptortype != MESSAGE or GROUP. */
|
6504
|
+
uint8_t descriptortype;
|
6505
|
+
uint8_t label;
|
6506
|
+
} upb_msglayout_field;
|
6439
6507
|
|
6440
|
-
|
6441
|
-
*
|
6442
|
-
*
|
6443
|
-
|
6444
|
-
|
6445
|
-
|
6446
|
-
|
6447
|
-
|
6448
|
-
|
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);
|
6508
|
+
typedef struct upb_msglayout {
|
6509
|
+
const struct upb_msglayout *const* submsgs;
|
6510
|
+
const upb_msglayout_field *fields;
|
6511
|
+
/* Must be aligned to sizeof(void*). Doesn't include internal members like
|
6512
|
+
* unknown fields, extension dict, pointer to msglayout, etc. */
|
6513
|
+
uint16_t size;
|
6514
|
+
uint16_t field_count;
|
6515
|
+
bool extendable;
|
6516
|
+
} upb_msglayout;
|
6456
6517
|
|
6457
6518
|
|
6458
6519
|
/** upb_stringview ************************************************************/
|
@@ -6528,52 +6589,16 @@ UPB_INLINE upb_msgval upb_msgval_makestr(const char *data, size_t size) {
|
|
6528
6589
|
/** upb_msg *******************************************************************/
|
6529
6590
|
|
6530
6591
|
/* 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
|
-
*/
|
6592
|
+
* upb_msglayout, which describes how it is laid out in memory. */
|
6540
6593
|
|
6541
|
-
/*
|
6542
|
-
|
6594
|
+
/* Creates a new message of the given type/layout in this arena. */
|
6595
|
+
upb_msg *upb_msg_new(const upb_msglayout *l, upb_arena *a);
|
6543
6596
|
|
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);
|
6597
|
+
/* Returns the arena for the given message. */
|
6598
|
+
upb_arena *upb_msg_arena(const upb_msg *msg);
|
6599
|
+
|
6600
|
+
void upb_msg_addunknown(upb_msg *msg, const char *data, size_t len);
|
6601
|
+
const char *upb_msg_getunknown(const upb_msg *msg, size_t *len);
|
6577
6602
|
|
6578
6603
|
/* Read-only message API. Can be safely called by anyone. */
|
6579
6604
|
|
@@ -6627,16 +6652,12 @@ bool upb_msg_clearfield(upb_msg *msg,
|
|
6627
6652
|
* semantics are the same as upb_msg. A upb_array allocates dynamic
|
6628
6653
|
* memory internally for the array elements. */
|
6629
6654
|
|
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);
|
6655
|
+
upb_array *upb_array_new(upb_fieldtype_t type, upb_arena *a);
|
6656
|
+
upb_fieldtype_t upb_array_type(const upb_array *arr);
|
6635
6657
|
|
6636
6658
|
/* Read-only interface. Safe for anyone to call. */
|
6637
6659
|
|
6638
6660
|
size_t upb_array_size(const upb_array *arr);
|
6639
|
-
upb_fieldtype_t upb_array_type(const upb_array *arr);
|
6640
6661
|
upb_msgval upb_array_get(const upb_array *arr, size_t i);
|
6641
6662
|
|
6642
6663
|
/* Write interface. May only be called by the message's owner who can enforce
|
@@ -6653,12 +6674,8 @@ bool upb_array_set(upb_array *arr, size_t i, upb_msgval val);
|
|
6653
6674
|
* So you must ensure that any string or message values outlive the map, and you
|
6654
6675
|
* must delete them manually when they are no longer required. */
|
6655
6676
|
|
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);
|
6677
|
+
upb_map *upb_map_new(upb_fieldtype_t ktype, upb_fieldtype_t vtype,
|
6678
|
+
upb_arena *a);
|
6662
6679
|
|
6663
6680
|
/* Read-only interface. Safe for anyone to call. */
|
6664
6681
|
|
@@ -6702,90 +6719,869 @@ upb_msgval upb_mapiter_value(const upb_mapiter *i);
|
|
6702
6719
|
void upb_mapiter_setdone(upb_mapiter *i);
|
6703
6720
|
bool upb_mapiter_isequal(const upb_mapiter *i1, const upb_mapiter *i2);
|
6704
6721
|
|
6722
|
+
UPB_END_EXTERN_C
|
6705
6723
|
|
6706
|
-
|
6707
|
-
|
6708
|
-
|
6709
|
-
* They write scalar data to a known offset from the message pointer.
|
6724
|
+
#endif /* UPB_MSG_H_ */
|
6725
|
+
/* This file was generated by upbc (the upb compiler) from the input
|
6726
|
+
* file:
|
6710
6727
|
*
|
6711
|
-
*
|
6712
|
-
*
|
6713
|
-
*
|
6728
|
+
* google/protobuf/descriptor.proto
|
6729
|
+
*
|
6730
|
+
* Do not edit -- your changes will be discarded when the file is
|
6731
|
+
* regenerated. */
|
6714
6732
|
|
6715
|
-
|
6716
|
-
|
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);
|
6733
|
+
#ifndef GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_
|
6734
|
+
#define GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_
|
6722
6735
|
|
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
6736
|
|
6737
|
+
/*
|
6738
|
+
** upb_decode: parsing into a upb_msg using a upb_msglayout.
|
6739
|
+
*/
|
6731
6740
|
|
6732
|
-
|
6741
|
+
#ifndef UPB_DECODE_H_
|
6742
|
+
#define UPB_DECODE_H_
|
6733
6743
|
|
6734
|
-
#define UPB_NOT_IN_ONEOF UINT16_MAX
|
6735
|
-
#define UPB_NO_HASBIT UINT16_MAX
|
6736
|
-
#define UPB_NO_SUBMSG UINT16_MAX
|
6737
6744
|
|
6738
|
-
|
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;
|
6745
|
+
UPB_BEGIN_EXTERN_C
|
6747
6746
|
|
6748
|
-
|
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;
|
6747
|
+
bool upb_decode(upb_stringview buf, upb_msg *msg, const upb_msglayout *l);
|
6766
6748
|
|
6767
|
-
|
6768
|
-
#define UPB_ALIGNED_SIZEOF(type) UPB_ALIGN_UP_TO(sizeof(type), sizeof(void*))
|
6749
|
+
UPB_END_EXTERN_C
|
6769
6750
|
|
6770
|
-
/*
|
6771
|
-
|
6772
|
-
|
6773
|
-
|
6774
|
-
const upb_msglayout_msginit_v1 *init, upb_alloc *a);
|
6775
|
-
void upb_msglayout_uninit_v1(upb_msglayout *layout, upb_alloc *a);
|
6751
|
+
#endif /* UPB_DECODE_H_ */
|
6752
|
+
/*
|
6753
|
+
** upb_encode: parsing into a upb_msg using a upb_msglayout.
|
6754
|
+
*/
|
6776
6755
|
|
6777
|
-
|
6756
|
+
#ifndef UPB_ENCODE_H_
|
6757
|
+
#define UPB_ENCODE_H_
|
6778
6758
|
|
6779
|
-
#endif /* UPB_MSG_H_ */
|
6780
6759
|
|
6781
6760
|
UPB_BEGIN_EXTERN_C
|
6782
6761
|
|
6783
|
-
|
6784
|
-
|
6762
|
+
char *upb_encode(const void *msg, const upb_msglayout *l, upb_arena *arena,
|
6763
|
+
size_t *size);
|
6785
6764
|
|
6786
6765
|
UPB_END_EXTERN_C
|
6787
6766
|
|
6788
|
-
#endif /*
|
6767
|
+
#endif /* UPB_ENCODE_H_ */
|
6768
|
+
UPB_BEGIN_EXTERN_C
|
6769
|
+
|
6770
|
+
struct google_protobuf_FileDescriptorSet;
|
6771
|
+
struct google_protobuf_FileDescriptorProto;
|
6772
|
+
struct google_protobuf_DescriptorProto;
|
6773
|
+
struct google_protobuf_DescriptorProto_ExtensionRange;
|
6774
|
+
struct google_protobuf_DescriptorProto_ReservedRange;
|
6775
|
+
struct google_protobuf_ExtensionRangeOptions;
|
6776
|
+
struct google_protobuf_FieldDescriptorProto;
|
6777
|
+
struct google_protobuf_OneofDescriptorProto;
|
6778
|
+
struct google_protobuf_EnumDescriptorProto;
|
6779
|
+
struct google_protobuf_EnumDescriptorProto_EnumReservedRange;
|
6780
|
+
struct google_protobuf_EnumValueDescriptorProto;
|
6781
|
+
struct google_protobuf_ServiceDescriptorProto;
|
6782
|
+
struct google_protobuf_MethodDescriptorProto;
|
6783
|
+
struct google_protobuf_FileOptions;
|
6784
|
+
struct google_protobuf_MessageOptions;
|
6785
|
+
struct google_protobuf_FieldOptions;
|
6786
|
+
struct google_protobuf_OneofOptions;
|
6787
|
+
struct google_protobuf_EnumOptions;
|
6788
|
+
struct google_protobuf_EnumValueOptions;
|
6789
|
+
struct google_protobuf_ServiceOptions;
|
6790
|
+
struct google_protobuf_MethodOptions;
|
6791
|
+
struct google_protobuf_UninterpretedOption;
|
6792
|
+
struct google_protobuf_UninterpretedOption_NamePart;
|
6793
|
+
struct google_protobuf_SourceCodeInfo;
|
6794
|
+
struct google_protobuf_SourceCodeInfo_Location;
|
6795
|
+
struct google_protobuf_GeneratedCodeInfo;
|
6796
|
+
struct google_protobuf_GeneratedCodeInfo_Annotation;
|
6797
|
+
typedef struct google_protobuf_FileDescriptorSet google_protobuf_FileDescriptorSet;
|
6798
|
+
typedef struct google_protobuf_FileDescriptorProto google_protobuf_FileDescriptorProto;
|
6799
|
+
typedef struct google_protobuf_DescriptorProto google_protobuf_DescriptorProto;
|
6800
|
+
typedef struct google_protobuf_DescriptorProto_ExtensionRange google_protobuf_DescriptorProto_ExtensionRange;
|
6801
|
+
typedef struct google_protobuf_DescriptorProto_ReservedRange google_protobuf_DescriptorProto_ReservedRange;
|
6802
|
+
typedef struct google_protobuf_ExtensionRangeOptions google_protobuf_ExtensionRangeOptions;
|
6803
|
+
typedef struct google_protobuf_FieldDescriptorProto google_protobuf_FieldDescriptorProto;
|
6804
|
+
typedef struct google_protobuf_OneofDescriptorProto google_protobuf_OneofDescriptorProto;
|
6805
|
+
typedef struct google_protobuf_EnumDescriptorProto google_protobuf_EnumDescriptorProto;
|
6806
|
+
typedef struct google_protobuf_EnumDescriptorProto_EnumReservedRange google_protobuf_EnumDescriptorProto_EnumReservedRange;
|
6807
|
+
typedef struct google_protobuf_EnumValueDescriptorProto google_protobuf_EnumValueDescriptorProto;
|
6808
|
+
typedef struct google_protobuf_ServiceDescriptorProto google_protobuf_ServiceDescriptorProto;
|
6809
|
+
typedef struct google_protobuf_MethodDescriptorProto google_protobuf_MethodDescriptorProto;
|
6810
|
+
typedef struct google_protobuf_FileOptions google_protobuf_FileOptions;
|
6811
|
+
typedef struct google_protobuf_MessageOptions google_protobuf_MessageOptions;
|
6812
|
+
typedef struct google_protobuf_FieldOptions google_protobuf_FieldOptions;
|
6813
|
+
typedef struct google_protobuf_OneofOptions google_protobuf_OneofOptions;
|
6814
|
+
typedef struct google_protobuf_EnumOptions google_protobuf_EnumOptions;
|
6815
|
+
typedef struct google_protobuf_EnumValueOptions google_protobuf_EnumValueOptions;
|
6816
|
+
typedef struct google_protobuf_ServiceOptions google_protobuf_ServiceOptions;
|
6817
|
+
typedef struct google_protobuf_MethodOptions google_protobuf_MethodOptions;
|
6818
|
+
typedef struct google_protobuf_UninterpretedOption google_protobuf_UninterpretedOption;
|
6819
|
+
typedef struct google_protobuf_UninterpretedOption_NamePart google_protobuf_UninterpretedOption_NamePart;
|
6820
|
+
typedef struct google_protobuf_SourceCodeInfo google_protobuf_SourceCodeInfo;
|
6821
|
+
typedef struct google_protobuf_SourceCodeInfo_Location google_protobuf_SourceCodeInfo_Location;
|
6822
|
+
typedef struct google_protobuf_GeneratedCodeInfo google_protobuf_GeneratedCodeInfo;
|
6823
|
+
typedef struct google_protobuf_GeneratedCodeInfo_Annotation google_protobuf_GeneratedCodeInfo_Annotation;
|
6824
|
+
|
6825
|
+
/* Enums */
|
6826
|
+
|
6827
|
+
typedef enum {
|
6828
|
+
google_protobuf_FieldDescriptorProto_LABEL_OPTIONAL = 1,
|
6829
|
+
google_protobuf_FieldDescriptorProto_LABEL_REQUIRED = 2,
|
6830
|
+
google_protobuf_FieldDescriptorProto_LABEL_REPEATED = 3
|
6831
|
+
} google_protobuf_FieldDescriptorProto_Label;
|
6832
|
+
|
6833
|
+
typedef enum {
|
6834
|
+
google_protobuf_FieldDescriptorProto_TYPE_DOUBLE = 1,
|
6835
|
+
google_protobuf_FieldDescriptorProto_TYPE_FLOAT = 2,
|
6836
|
+
google_protobuf_FieldDescriptorProto_TYPE_INT64 = 3,
|
6837
|
+
google_protobuf_FieldDescriptorProto_TYPE_UINT64 = 4,
|
6838
|
+
google_protobuf_FieldDescriptorProto_TYPE_INT32 = 5,
|
6839
|
+
google_protobuf_FieldDescriptorProto_TYPE_FIXED64 = 6,
|
6840
|
+
google_protobuf_FieldDescriptorProto_TYPE_FIXED32 = 7,
|
6841
|
+
google_protobuf_FieldDescriptorProto_TYPE_BOOL = 8,
|
6842
|
+
google_protobuf_FieldDescriptorProto_TYPE_STRING = 9,
|
6843
|
+
google_protobuf_FieldDescriptorProto_TYPE_GROUP = 10,
|
6844
|
+
google_protobuf_FieldDescriptorProto_TYPE_MESSAGE = 11,
|
6845
|
+
google_protobuf_FieldDescriptorProto_TYPE_BYTES = 12,
|
6846
|
+
google_protobuf_FieldDescriptorProto_TYPE_UINT32 = 13,
|
6847
|
+
google_protobuf_FieldDescriptorProto_TYPE_ENUM = 14,
|
6848
|
+
google_protobuf_FieldDescriptorProto_TYPE_SFIXED32 = 15,
|
6849
|
+
google_protobuf_FieldDescriptorProto_TYPE_SFIXED64 = 16,
|
6850
|
+
google_protobuf_FieldDescriptorProto_TYPE_SINT32 = 17,
|
6851
|
+
google_protobuf_FieldDescriptorProto_TYPE_SINT64 = 18
|
6852
|
+
} google_protobuf_FieldDescriptorProto_Type;
|
6853
|
+
|
6854
|
+
typedef enum {
|
6855
|
+
google_protobuf_FieldOptions_STRING = 0,
|
6856
|
+
google_protobuf_FieldOptions_CORD = 1,
|
6857
|
+
google_protobuf_FieldOptions_STRING_PIECE = 2
|
6858
|
+
} google_protobuf_FieldOptions_CType;
|
6859
|
+
|
6860
|
+
typedef enum {
|
6861
|
+
google_protobuf_FieldOptions_JS_NORMAL = 0,
|
6862
|
+
google_protobuf_FieldOptions_JS_STRING = 1,
|
6863
|
+
google_protobuf_FieldOptions_JS_NUMBER = 2
|
6864
|
+
} google_protobuf_FieldOptions_JSType;
|
6865
|
+
|
6866
|
+
typedef enum {
|
6867
|
+
google_protobuf_FileOptions_SPEED = 1,
|
6868
|
+
google_protobuf_FileOptions_CODE_SIZE = 2,
|
6869
|
+
google_protobuf_FileOptions_LITE_RUNTIME = 3
|
6870
|
+
} google_protobuf_FileOptions_OptimizeMode;
|
6871
|
+
|
6872
|
+
typedef enum {
|
6873
|
+
google_protobuf_MethodOptions_IDEMPOTENCY_UNKNOWN = 0,
|
6874
|
+
google_protobuf_MethodOptions_NO_SIDE_EFFECTS = 1,
|
6875
|
+
google_protobuf_MethodOptions_IDEMPOTENT = 2
|
6876
|
+
} google_protobuf_MethodOptions_IdempotencyLevel;
|
6877
|
+
|
6878
|
+
/* google.protobuf.FileDescriptorSet */
|
6879
|
+
|
6880
|
+
extern const upb_msglayout google_protobuf_FileDescriptorSet_msginit;
|
6881
|
+
UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_new(upb_arena *arena) {
|
6882
|
+
return (google_protobuf_FileDescriptorSet *)upb_msg_new(&google_protobuf_FileDescriptorSet_msginit, arena);
|
6883
|
+
}
|
6884
|
+
UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_parsenew(upb_stringview buf, upb_arena *arena) {
|
6885
|
+
google_protobuf_FileDescriptorSet *ret = google_protobuf_FileDescriptorSet_new(arena);
|
6886
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_FileDescriptorSet_msginit)) ? ret : NULL;
|
6887
|
+
}
|
6888
|
+
UPB_INLINE char *google_protobuf_FileDescriptorSet_serialize(const google_protobuf_FileDescriptorSet *msg, upb_arena *arena, size_t *len) {
|
6889
|
+
return upb_encode(msg, &google_protobuf_FileDescriptorSet_msginit, arena, len);
|
6890
|
+
}
|
6891
|
+
|
6892
|
+
UPB_INLINE const upb_array* google_protobuf_FileDescriptorSet_file(const google_protobuf_FileDescriptorSet *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(0, 0)); }
|
6893
|
+
|
6894
|
+
UPB_INLINE void google_protobuf_FileDescriptorSet_set_file(google_protobuf_FileDescriptorSet *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(0, 0)) = value; }
|
6895
|
+
|
6896
|
+
|
6897
|
+
/* google.protobuf.FileDescriptorProto */
|
6898
|
+
|
6899
|
+
extern const upb_msglayout google_protobuf_FileDescriptorProto_msginit;
|
6900
|
+
UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_new(upb_arena *arena) {
|
6901
|
+
return (google_protobuf_FileDescriptorProto *)upb_msg_new(&google_protobuf_FileDescriptorProto_msginit, arena);
|
6902
|
+
}
|
6903
|
+
UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_parsenew(upb_stringview buf, upb_arena *arena) {
|
6904
|
+
google_protobuf_FileDescriptorProto *ret = google_protobuf_FileDescriptorProto_new(arena);
|
6905
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_FileDescriptorProto_msginit)) ? ret : NULL;
|
6906
|
+
}
|
6907
|
+
UPB_INLINE char *google_protobuf_FileDescriptorProto_serialize(const google_protobuf_FileDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
6908
|
+
return upb_encode(msg, &google_protobuf_FileDescriptorProto_msginit, arena, len);
|
6909
|
+
}
|
6910
|
+
|
6911
|
+
UPB_INLINE upb_stringview google_protobuf_FileDescriptorProto_name(const google_protobuf_FileDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)); }
|
6912
|
+
UPB_INLINE upb_stringview google_protobuf_FileDescriptorProto_package(const google_protobuf_FileDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(16, 32)); }
|
6913
|
+
UPB_INLINE const upb_array* google_protobuf_FileDescriptorProto_dependency(const google_protobuf_FileDescriptorProto *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(40, 80)); }
|
6914
|
+
UPB_INLINE const upb_array* google_protobuf_FileDescriptorProto_message_type(const google_protobuf_FileDescriptorProto *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(44, 88)); }
|
6915
|
+
UPB_INLINE const upb_array* google_protobuf_FileDescriptorProto_enum_type(const google_protobuf_FileDescriptorProto *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(48, 96)); }
|
6916
|
+
UPB_INLINE const upb_array* google_protobuf_FileDescriptorProto_service(const google_protobuf_FileDescriptorProto *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(52, 104)); }
|
6917
|
+
UPB_INLINE const upb_array* google_protobuf_FileDescriptorProto_extension(const google_protobuf_FileDescriptorProto *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(56, 112)); }
|
6918
|
+
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(32, 64)); }
|
6919
|
+
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(36, 72)); }
|
6920
|
+
UPB_INLINE const upb_array* google_protobuf_FileDescriptorProto_public_dependency(const google_protobuf_FileDescriptorProto *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(60, 120)); }
|
6921
|
+
UPB_INLINE const upb_array* google_protobuf_FileDescriptorProto_weak_dependency(const google_protobuf_FileDescriptorProto *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(64, 128)); }
|
6922
|
+
UPB_INLINE upb_stringview google_protobuf_FileDescriptorProto_syntax(const google_protobuf_FileDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(24, 48)); }
|
6923
|
+
|
6924
|
+
UPB_INLINE void google_protobuf_FileDescriptorProto_set_name(google_protobuf_FileDescriptorProto *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)) = value; }
|
6925
|
+
UPB_INLINE void google_protobuf_FileDescriptorProto_set_package(google_protobuf_FileDescriptorProto *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(16, 32)) = value; }
|
6926
|
+
UPB_INLINE void google_protobuf_FileDescriptorProto_set_dependency(google_protobuf_FileDescriptorProto *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(40, 80)) = value; }
|
6927
|
+
UPB_INLINE void google_protobuf_FileDescriptorProto_set_message_type(google_protobuf_FileDescriptorProto *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(44, 88)) = value; }
|
6928
|
+
UPB_INLINE void google_protobuf_FileDescriptorProto_set_enum_type(google_protobuf_FileDescriptorProto *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(48, 96)) = value; }
|
6929
|
+
UPB_INLINE void google_protobuf_FileDescriptorProto_set_service(google_protobuf_FileDescriptorProto *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(52, 104)) = value; }
|
6930
|
+
UPB_INLINE void google_protobuf_FileDescriptorProto_set_extension(google_protobuf_FileDescriptorProto *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(56, 112)) = value; }
|
6931
|
+
UPB_INLINE void google_protobuf_FileDescriptorProto_set_options(google_protobuf_FileDescriptorProto *msg, google_protobuf_FileOptions* value) { UPB_FIELD_AT(msg, google_protobuf_FileOptions*, UPB_SIZE(32, 64)) = value; }
|
6932
|
+
UPB_INLINE void google_protobuf_FileDescriptorProto_set_source_code_info(google_protobuf_FileDescriptorProto *msg, google_protobuf_SourceCodeInfo* value) { UPB_FIELD_AT(msg, google_protobuf_SourceCodeInfo*, UPB_SIZE(36, 72)) = value; }
|
6933
|
+
UPB_INLINE void google_protobuf_FileDescriptorProto_set_public_dependency(google_protobuf_FileDescriptorProto *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(60, 120)) = value; }
|
6934
|
+
UPB_INLINE void google_protobuf_FileDescriptorProto_set_weak_dependency(google_protobuf_FileDescriptorProto *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(64, 128)) = value; }
|
6935
|
+
UPB_INLINE void google_protobuf_FileDescriptorProto_set_syntax(google_protobuf_FileDescriptorProto *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(24, 48)) = value; }
|
6936
|
+
|
6937
|
+
|
6938
|
+
/* google.protobuf.DescriptorProto */
|
6939
|
+
|
6940
|
+
extern const upb_msglayout google_protobuf_DescriptorProto_msginit;
|
6941
|
+
UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_new(upb_arena *arena) {
|
6942
|
+
return (google_protobuf_DescriptorProto *)upb_msg_new(&google_protobuf_DescriptorProto_msginit, arena);
|
6943
|
+
}
|
6944
|
+
UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_parsenew(upb_stringview buf, upb_arena *arena) {
|
6945
|
+
google_protobuf_DescriptorProto *ret = google_protobuf_DescriptorProto_new(arena);
|
6946
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_DescriptorProto_msginit)) ? ret : NULL;
|
6947
|
+
}
|
6948
|
+
UPB_INLINE char *google_protobuf_DescriptorProto_serialize(const google_protobuf_DescriptorProto *msg, upb_arena *arena, size_t *len) {
|
6949
|
+
return upb_encode(msg, &google_protobuf_DescriptorProto_msginit, arena, len);
|
6950
|
+
}
|
6951
|
+
|
6952
|
+
UPB_INLINE upb_stringview google_protobuf_DescriptorProto_name(const google_protobuf_DescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)); }
|
6953
|
+
UPB_INLINE const upb_array* google_protobuf_DescriptorProto_field(const google_protobuf_DescriptorProto *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(20, 40)); }
|
6954
|
+
UPB_INLINE const upb_array* google_protobuf_DescriptorProto_nested_type(const google_protobuf_DescriptorProto *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(24, 48)); }
|
6955
|
+
UPB_INLINE const upb_array* google_protobuf_DescriptorProto_enum_type(const google_protobuf_DescriptorProto *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(28, 56)); }
|
6956
|
+
UPB_INLINE const upb_array* google_protobuf_DescriptorProto_extension_range(const google_protobuf_DescriptorProto *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(32, 64)); }
|
6957
|
+
UPB_INLINE const upb_array* google_protobuf_DescriptorProto_extension(const google_protobuf_DescriptorProto *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(36, 72)); }
|
6958
|
+
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(16, 32)); }
|
6959
|
+
UPB_INLINE const upb_array* google_protobuf_DescriptorProto_oneof_decl(const google_protobuf_DescriptorProto *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(40, 80)); }
|
6960
|
+
UPB_INLINE const upb_array* google_protobuf_DescriptorProto_reserved_range(const google_protobuf_DescriptorProto *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(44, 88)); }
|
6961
|
+
UPB_INLINE const upb_array* google_protobuf_DescriptorProto_reserved_name(const google_protobuf_DescriptorProto *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(48, 96)); }
|
6962
|
+
|
6963
|
+
UPB_INLINE void google_protobuf_DescriptorProto_set_name(google_protobuf_DescriptorProto *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)) = value; }
|
6964
|
+
UPB_INLINE void google_protobuf_DescriptorProto_set_field(google_protobuf_DescriptorProto *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(20, 40)) = value; }
|
6965
|
+
UPB_INLINE void google_protobuf_DescriptorProto_set_nested_type(google_protobuf_DescriptorProto *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(24, 48)) = value; }
|
6966
|
+
UPB_INLINE void google_protobuf_DescriptorProto_set_enum_type(google_protobuf_DescriptorProto *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(28, 56)) = value; }
|
6967
|
+
UPB_INLINE void google_protobuf_DescriptorProto_set_extension_range(google_protobuf_DescriptorProto *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(32, 64)) = value; }
|
6968
|
+
UPB_INLINE void google_protobuf_DescriptorProto_set_extension(google_protobuf_DescriptorProto *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(36, 72)) = value; }
|
6969
|
+
UPB_INLINE void google_protobuf_DescriptorProto_set_options(google_protobuf_DescriptorProto *msg, google_protobuf_MessageOptions* value) { UPB_FIELD_AT(msg, google_protobuf_MessageOptions*, UPB_SIZE(16, 32)) = value; }
|
6970
|
+
UPB_INLINE void google_protobuf_DescriptorProto_set_oneof_decl(google_protobuf_DescriptorProto *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(40, 80)) = value; }
|
6971
|
+
UPB_INLINE void google_protobuf_DescriptorProto_set_reserved_range(google_protobuf_DescriptorProto *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(44, 88)) = value; }
|
6972
|
+
UPB_INLINE void google_protobuf_DescriptorProto_set_reserved_name(google_protobuf_DescriptorProto *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(48, 96)) = value; }
|
6973
|
+
|
6974
|
+
|
6975
|
+
/* google.protobuf.DescriptorProto.ExtensionRange */
|
6976
|
+
|
6977
|
+
extern const upb_msglayout google_protobuf_DescriptorProto_ExtensionRange_msginit;
|
6978
|
+
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_new(upb_arena *arena) {
|
6979
|
+
return (google_protobuf_DescriptorProto_ExtensionRange *)upb_msg_new(&google_protobuf_DescriptorProto_ExtensionRange_msginit, arena);
|
6980
|
+
}
|
6981
|
+
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_parsenew(upb_stringview buf, upb_arena *arena) {
|
6982
|
+
google_protobuf_DescriptorProto_ExtensionRange *ret = google_protobuf_DescriptorProto_ExtensionRange_new(arena);
|
6983
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_DescriptorProto_ExtensionRange_msginit)) ? ret : NULL;
|
6984
|
+
}
|
6985
|
+
UPB_INLINE char *google_protobuf_DescriptorProto_ExtensionRange_serialize(const google_protobuf_DescriptorProto_ExtensionRange *msg, upb_arena *arena, size_t *len) {
|
6986
|
+
return upb_encode(msg, &google_protobuf_DescriptorProto_ExtensionRange_msginit, arena, len);
|
6987
|
+
}
|
6988
|
+
|
6989
|
+
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)); }
|
6990
|
+
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)); }
|
6991
|
+
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)); }
|
6992
|
+
|
6993
|
+
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_start(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) { UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; }
|
6994
|
+
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_end(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) { UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; }
|
6995
|
+
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_options(google_protobuf_DescriptorProto_ExtensionRange *msg, google_protobuf_ExtensionRangeOptions* value) { UPB_FIELD_AT(msg, google_protobuf_ExtensionRangeOptions*, UPB_SIZE(12, 16)) = value; }
|
6996
|
+
|
6997
|
+
|
6998
|
+
/* google.protobuf.DescriptorProto.ReservedRange */
|
6999
|
+
|
7000
|
+
extern const upb_msglayout google_protobuf_DescriptorProto_ReservedRange_msginit;
|
7001
|
+
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_new(upb_arena *arena) {
|
7002
|
+
return (google_protobuf_DescriptorProto_ReservedRange *)upb_msg_new(&google_protobuf_DescriptorProto_ReservedRange_msginit, arena);
|
7003
|
+
}
|
7004
|
+
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_parsenew(upb_stringview buf, upb_arena *arena) {
|
7005
|
+
google_protobuf_DescriptorProto_ReservedRange *ret = google_protobuf_DescriptorProto_ReservedRange_new(arena);
|
7006
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_DescriptorProto_ReservedRange_msginit)) ? ret : NULL;
|
7007
|
+
}
|
7008
|
+
UPB_INLINE char *google_protobuf_DescriptorProto_ReservedRange_serialize(const google_protobuf_DescriptorProto_ReservedRange *msg, upb_arena *arena, size_t *len) {
|
7009
|
+
return upb_encode(msg, &google_protobuf_DescriptorProto_ReservedRange_msginit, arena, len);
|
7010
|
+
}
|
7011
|
+
|
7012
|
+
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)); }
|
7013
|
+
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)); }
|
7014
|
+
|
7015
|
+
UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_start(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) { UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; }
|
7016
|
+
UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_end(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) { UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; }
|
7017
|
+
|
7018
|
+
|
7019
|
+
/* google.protobuf.ExtensionRangeOptions */
|
7020
|
+
|
7021
|
+
extern const upb_msglayout google_protobuf_ExtensionRangeOptions_msginit;
|
7022
|
+
UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_new(upb_arena *arena) {
|
7023
|
+
return (google_protobuf_ExtensionRangeOptions *)upb_msg_new(&google_protobuf_ExtensionRangeOptions_msginit, arena);
|
7024
|
+
}
|
7025
|
+
UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_parsenew(upb_stringview buf, upb_arena *arena) {
|
7026
|
+
google_protobuf_ExtensionRangeOptions *ret = google_protobuf_ExtensionRangeOptions_new(arena);
|
7027
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_ExtensionRangeOptions_msginit)) ? ret : NULL;
|
7028
|
+
}
|
7029
|
+
UPB_INLINE char *google_protobuf_ExtensionRangeOptions_serialize(const google_protobuf_ExtensionRangeOptions *msg, upb_arena *arena, size_t *len) {
|
7030
|
+
return upb_encode(msg, &google_protobuf_ExtensionRangeOptions_msginit, arena, len);
|
7031
|
+
}
|
7032
|
+
|
7033
|
+
UPB_INLINE const upb_array* google_protobuf_ExtensionRangeOptions_uninterpreted_option(const google_protobuf_ExtensionRangeOptions *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(0, 0)); }
|
7034
|
+
|
7035
|
+
UPB_INLINE void google_protobuf_ExtensionRangeOptions_set_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(0, 0)) = value; }
|
7036
|
+
|
7037
|
+
|
7038
|
+
/* google.protobuf.FieldDescriptorProto */
|
7039
|
+
|
7040
|
+
extern const upb_msglayout google_protobuf_FieldDescriptorProto_msginit;
|
7041
|
+
UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_new(upb_arena *arena) {
|
7042
|
+
return (google_protobuf_FieldDescriptorProto *)upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena);
|
7043
|
+
}
|
7044
|
+
UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_parsenew(upb_stringview buf, upb_arena *arena) {
|
7045
|
+
google_protobuf_FieldDescriptorProto *ret = google_protobuf_FieldDescriptorProto_new(arena);
|
7046
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_FieldDescriptorProto_msginit)) ? ret : NULL;
|
7047
|
+
}
|
7048
|
+
UPB_INLINE char *google_protobuf_FieldDescriptorProto_serialize(const google_protobuf_FieldDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
7049
|
+
return upb_encode(msg, &google_protobuf_FieldDescriptorProto_msginit, arena, len);
|
7050
|
+
}
|
7051
|
+
|
7052
|
+
UPB_INLINE upb_stringview google_protobuf_FieldDescriptorProto_name(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(32, 32)); }
|
7053
|
+
UPB_INLINE upb_stringview google_protobuf_FieldDescriptorProto_extendee(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(40, 48)); }
|
7054
|
+
UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_number(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(24, 24)); }
|
7055
|
+
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)); }
|
7056
|
+
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)); }
|
7057
|
+
UPB_INLINE upb_stringview google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(48, 64)); }
|
7058
|
+
UPB_INLINE upb_stringview google_protobuf_FieldDescriptorProto_default_value(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(56, 80)); }
|
7059
|
+
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)); }
|
7060
|
+
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)); }
|
7061
|
+
UPB_INLINE upb_stringview google_protobuf_FieldDescriptorProto_json_name(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(64, 96)); }
|
7062
|
+
|
7063
|
+
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_name(google_protobuf_FieldDescriptorProto *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(32, 32)) = value; }
|
7064
|
+
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_extendee(google_protobuf_FieldDescriptorProto *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(40, 48)) = value; }
|
7065
|
+
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_number(google_protobuf_FieldDescriptorProto *msg, int32_t value) { UPB_FIELD_AT(msg, int32_t, UPB_SIZE(24, 24)) = value; }
|
7066
|
+
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_label(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldDescriptorProto_Label value) { UPB_FIELD_AT(msg, google_protobuf_FieldDescriptorProto_Label, UPB_SIZE(8, 8)) = value; }
|
7067
|
+
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldDescriptorProto_Type value) { UPB_FIELD_AT(msg, google_protobuf_FieldDescriptorProto_Type, UPB_SIZE(16, 16)) = value; }
|
7068
|
+
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type_name(google_protobuf_FieldDescriptorProto *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(48, 64)) = value; }
|
7069
|
+
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_default_value(google_protobuf_FieldDescriptorProto *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(56, 80)) = value; }
|
7070
|
+
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_options(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldOptions* value) { UPB_FIELD_AT(msg, google_protobuf_FieldOptions*, UPB_SIZE(72, 112)) = value; }
|
7071
|
+
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_oneof_index(google_protobuf_FieldDescriptorProto *msg, int32_t value) { UPB_FIELD_AT(msg, int32_t, UPB_SIZE(28, 28)) = value; }
|
7072
|
+
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_json_name(google_protobuf_FieldDescriptorProto *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(64, 96)) = value; }
|
7073
|
+
|
7074
|
+
|
7075
|
+
/* google.protobuf.OneofDescriptorProto */
|
7076
|
+
|
7077
|
+
extern const upb_msglayout google_protobuf_OneofDescriptorProto_msginit;
|
7078
|
+
UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_new(upb_arena *arena) {
|
7079
|
+
return (google_protobuf_OneofDescriptorProto *)upb_msg_new(&google_protobuf_OneofDescriptorProto_msginit, arena);
|
7080
|
+
}
|
7081
|
+
UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_parsenew(upb_stringview buf, upb_arena *arena) {
|
7082
|
+
google_protobuf_OneofDescriptorProto *ret = google_protobuf_OneofDescriptorProto_new(arena);
|
7083
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_OneofDescriptorProto_msginit)) ? ret : NULL;
|
7084
|
+
}
|
7085
|
+
UPB_INLINE char *google_protobuf_OneofDescriptorProto_serialize(const google_protobuf_OneofDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
7086
|
+
return upb_encode(msg, &google_protobuf_OneofDescriptorProto_msginit, arena, len);
|
7087
|
+
}
|
7088
|
+
|
7089
|
+
UPB_INLINE upb_stringview google_protobuf_OneofDescriptorProto_name(const google_protobuf_OneofDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)); }
|
7090
|
+
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(16, 32)); }
|
7091
|
+
|
7092
|
+
UPB_INLINE void google_protobuf_OneofDescriptorProto_set_name(google_protobuf_OneofDescriptorProto *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)) = value; }
|
7093
|
+
UPB_INLINE void google_protobuf_OneofDescriptorProto_set_options(google_protobuf_OneofDescriptorProto *msg, google_protobuf_OneofOptions* value) { UPB_FIELD_AT(msg, google_protobuf_OneofOptions*, UPB_SIZE(16, 32)) = value; }
|
7094
|
+
|
7095
|
+
|
7096
|
+
/* google.protobuf.EnumDescriptorProto */
|
7097
|
+
|
7098
|
+
extern const upb_msglayout google_protobuf_EnumDescriptorProto_msginit;
|
7099
|
+
UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_new(upb_arena *arena) {
|
7100
|
+
return (google_protobuf_EnumDescriptorProto *)upb_msg_new(&google_protobuf_EnumDescriptorProto_msginit, arena);
|
7101
|
+
}
|
7102
|
+
UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_parsenew(upb_stringview buf, upb_arena *arena) {
|
7103
|
+
google_protobuf_EnumDescriptorProto *ret = google_protobuf_EnumDescriptorProto_new(arena);
|
7104
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_EnumDescriptorProto_msginit)) ? ret : NULL;
|
7105
|
+
}
|
7106
|
+
UPB_INLINE char *google_protobuf_EnumDescriptorProto_serialize(const google_protobuf_EnumDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
7107
|
+
return upb_encode(msg, &google_protobuf_EnumDescriptorProto_msginit, arena, len);
|
7108
|
+
}
|
7109
|
+
|
7110
|
+
UPB_INLINE upb_stringview google_protobuf_EnumDescriptorProto_name(const google_protobuf_EnumDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)); }
|
7111
|
+
UPB_INLINE const upb_array* google_protobuf_EnumDescriptorProto_value(const google_protobuf_EnumDescriptorProto *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(20, 40)); }
|
7112
|
+
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(16, 32)); }
|
7113
|
+
UPB_INLINE const upb_array* google_protobuf_EnumDescriptorProto_reserved_range(const google_protobuf_EnumDescriptorProto *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(24, 48)); }
|
7114
|
+
UPB_INLINE const upb_array* google_protobuf_EnumDescriptorProto_reserved_name(const google_protobuf_EnumDescriptorProto *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(28, 56)); }
|
7115
|
+
|
7116
|
+
UPB_INLINE void google_protobuf_EnumDescriptorProto_set_name(google_protobuf_EnumDescriptorProto *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)) = value; }
|
7117
|
+
UPB_INLINE void google_protobuf_EnumDescriptorProto_set_value(google_protobuf_EnumDescriptorProto *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(20, 40)) = value; }
|
7118
|
+
UPB_INLINE void google_protobuf_EnumDescriptorProto_set_options(google_protobuf_EnumDescriptorProto *msg, google_protobuf_EnumOptions* value) { UPB_FIELD_AT(msg, google_protobuf_EnumOptions*, UPB_SIZE(16, 32)) = value; }
|
7119
|
+
UPB_INLINE void google_protobuf_EnumDescriptorProto_set_reserved_range(google_protobuf_EnumDescriptorProto *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(24, 48)) = value; }
|
7120
|
+
UPB_INLINE void google_protobuf_EnumDescriptorProto_set_reserved_name(google_protobuf_EnumDescriptorProto *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(28, 56)) = value; }
|
7121
|
+
|
7122
|
+
|
7123
|
+
/* google.protobuf.EnumDescriptorProto.EnumReservedRange */
|
7124
|
+
|
7125
|
+
extern const upb_msglayout google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit;
|
7126
|
+
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_new(upb_arena *arena) {
|
7127
|
+
return (google_protobuf_EnumDescriptorProto_EnumReservedRange *)upb_msg_new(&google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena);
|
7128
|
+
}
|
7129
|
+
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_parsenew(upb_stringview buf, upb_arena *arena) {
|
7130
|
+
google_protobuf_EnumDescriptorProto_EnumReservedRange *ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena);
|
7131
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit)) ? ret : NULL;
|
7132
|
+
}
|
7133
|
+
UPB_INLINE char *google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, upb_arena *arena, size_t *len) {
|
7134
|
+
return upb_encode(msg, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena, len);
|
7135
|
+
}
|
7136
|
+
|
7137
|
+
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)); }
|
7138
|
+
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)); }
|
7139
|
+
|
7140
|
+
UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_start(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) { UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; }
|
7141
|
+
UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_end(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) { UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; }
|
7142
|
+
|
7143
|
+
|
7144
|
+
/* google.protobuf.EnumValueDescriptorProto */
|
7145
|
+
|
7146
|
+
extern const upb_msglayout google_protobuf_EnumValueDescriptorProto_msginit;
|
7147
|
+
UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_new(upb_arena *arena) {
|
7148
|
+
return (google_protobuf_EnumValueDescriptorProto *)upb_msg_new(&google_protobuf_EnumValueDescriptorProto_msginit, arena);
|
7149
|
+
}
|
7150
|
+
UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_parsenew(upb_stringview buf, upb_arena *arena) {
|
7151
|
+
google_protobuf_EnumValueDescriptorProto *ret = google_protobuf_EnumValueDescriptorProto_new(arena);
|
7152
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_EnumValueDescriptorProto_msginit)) ? ret : NULL;
|
7153
|
+
}
|
7154
|
+
UPB_INLINE char *google_protobuf_EnumValueDescriptorProto_serialize(const google_protobuf_EnumValueDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
7155
|
+
return upb_encode(msg, &google_protobuf_EnumValueDescriptorProto_msginit, arena, len);
|
7156
|
+
}
|
7157
|
+
|
7158
|
+
UPB_INLINE upb_stringview google_protobuf_EnumValueDescriptorProto_name(const google_protobuf_EnumValueDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)); }
|
7159
|
+
UPB_INLINE int32_t google_protobuf_EnumValueDescriptorProto_number(const google_protobuf_EnumValueDescriptorProto *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); }
|
7160
|
+
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, 32)); }
|
7161
|
+
|
7162
|
+
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_name(google_protobuf_EnumValueDescriptorProto *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)) = value; }
|
7163
|
+
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_number(google_protobuf_EnumValueDescriptorProto *msg, int32_t value) { UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; }
|
7164
|
+
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_options(google_protobuf_EnumValueDescriptorProto *msg, google_protobuf_EnumValueOptions* value) { UPB_FIELD_AT(msg, google_protobuf_EnumValueOptions*, UPB_SIZE(16, 32)) = value; }
|
7165
|
+
|
7166
|
+
|
7167
|
+
/* google.protobuf.ServiceDescriptorProto */
|
7168
|
+
|
7169
|
+
extern const upb_msglayout google_protobuf_ServiceDescriptorProto_msginit;
|
7170
|
+
UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_new(upb_arena *arena) {
|
7171
|
+
return (google_protobuf_ServiceDescriptorProto *)upb_msg_new(&google_protobuf_ServiceDescriptorProto_msginit, arena);
|
7172
|
+
}
|
7173
|
+
UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_parsenew(upb_stringview buf, upb_arena *arena) {
|
7174
|
+
google_protobuf_ServiceDescriptorProto *ret = google_protobuf_ServiceDescriptorProto_new(arena);
|
7175
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_ServiceDescriptorProto_msginit)) ? ret : NULL;
|
7176
|
+
}
|
7177
|
+
UPB_INLINE char *google_protobuf_ServiceDescriptorProto_serialize(const google_protobuf_ServiceDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
7178
|
+
return upb_encode(msg, &google_protobuf_ServiceDescriptorProto_msginit, arena, len);
|
7179
|
+
}
|
7180
|
+
|
7181
|
+
UPB_INLINE upb_stringview google_protobuf_ServiceDescriptorProto_name(const google_protobuf_ServiceDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)); }
|
7182
|
+
UPB_INLINE const upb_array* google_protobuf_ServiceDescriptorProto_method(const google_protobuf_ServiceDescriptorProto *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(20, 40)); }
|
7183
|
+
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(16, 32)); }
|
7184
|
+
|
7185
|
+
UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_name(google_protobuf_ServiceDescriptorProto *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)) = value; }
|
7186
|
+
UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_method(google_protobuf_ServiceDescriptorProto *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(20, 40)) = value; }
|
7187
|
+
UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_options(google_protobuf_ServiceDescriptorProto *msg, google_protobuf_ServiceOptions* value) { UPB_FIELD_AT(msg, google_protobuf_ServiceOptions*, UPB_SIZE(16, 32)) = value; }
|
7188
|
+
|
7189
|
+
|
7190
|
+
/* google.protobuf.MethodDescriptorProto */
|
7191
|
+
|
7192
|
+
extern const upb_msglayout google_protobuf_MethodDescriptorProto_msginit;
|
7193
|
+
UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_new(upb_arena *arena) {
|
7194
|
+
return (google_protobuf_MethodDescriptorProto *)upb_msg_new(&google_protobuf_MethodDescriptorProto_msginit, arena);
|
7195
|
+
}
|
7196
|
+
UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_parsenew(upb_stringview buf, upb_arena *arena) {
|
7197
|
+
google_protobuf_MethodDescriptorProto *ret = google_protobuf_MethodDescriptorProto_new(arena);
|
7198
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_MethodDescriptorProto_msginit)) ? ret : NULL;
|
7199
|
+
}
|
7200
|
+
UPB_INLINE char *google_protobuf_MethodDescriptorProto_serialize(const google_protobuf_MethodDescriptorProto *msg, upb_arena *arena, size_t *len) {
|
7201
|
+
return upb_encode(msg, &google_protobuf_MethodDescriptorProto_msginit, arena, len);
|
7202
|
+
}
|
7203
|
+
|
7204
|
+
UPB_INLINE upb_stringview google_protobuf_MethodDescriptorProto_name(const google_protobuf_MethodDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)); }
|
7205
|
+
UPB_INLINE upb_stringview google_protobuf_MethodDescriptorProto_input_type(const google_protobuf_MethodDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(16, 32)); }
|
7206
|
+
UPB_INLINE upb_stringview google_protobuf_MethodDescriptorProto_output_type(const google_protobuf_MethodDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(24, 48)); }
|
7207
|
+
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(32, 64)); }
|
7208
|
+
UPB_INLINE bool google_protobuf_MethodDescriptorProto_client_streaming(const google_protobuf_MethodDescriptorProto *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); }
|
7209
|
+
UPB_INLINE bool google_protobuf_MethodDescriptorProto_server_streaming(const google_protobuf_MethodDescriptorProto *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)); }
|
7210
|
+
|
7211
|
+
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_name(google_protobuf_MethodDescriptorProto *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)) = value; }
|
7212
|
+
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_input_type(google_protobuf_MethodDescriptorProto *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(16, 32)) = value; }
|
7213
|
+
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_output_type(google_protobuf_MethodDescriptorProto *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(24, 48)) = value; }
|
7214
|
+
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_options(google_protobuf_MethodDescriptorProto *msg, google_protobuf_MethodOptions* value) { UPB_FIELD_AT(msg, google_protobuf_MethodOptions*, UPB_SIZE(32, 64)) = value; }
|
7215
|
+
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_client_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; }
|
7216
|
+
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_server_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value; }
|
7217
|
+
|
7218
|
+
|
7219
|
+
/* google.protobuf.FileOptions */
|
7220
|
+
|
7221
|
+
extern const upb_msglayout google_protobuf_FileOptions_msginit;
|
7222
|
+
UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_new(upb_arena *arena) {
|
7223
|
+
return (google_protobuf_FileOptions *)upb_msg_new(&google_protobuf_FileOptions_msginit, arena);
|
7224
|
+
}
|
7225
|
+
UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_parsenew(upb_stringview buf, upb_arena *arena) {
|
7226
|
+
google_protobuf_FileOptions *ret = google_protobuf_FileOptions_new(arena);
|
7227
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_FileOptions_msginit)) ? ret : NULL;
|
7228
|
+
}
|
7229
|
+
UPB_INLINE char *google_protobuf_FileOptions_serialize(const google_protobuf_FileOptions *msg, upb_arena *arena, size_t *len) {
|
7230
|
+
return upb_encode(msg, &google_protobuf_FileOptions_msginit, arena, len);
|
7231
|
+
}
|
7232
|
+
|
7233
|
+
UPB_INLINE upb_stringview google_protobuf_FileOptions_java_package(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(32, 32)); }
|
7234
|
+
UPB_INLINE upb_stringview google_protobuf_FileOptions_java_outer_classname(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(40, 48)); }
|
7235
|
+
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)); }
|
7236
|
+
UPB_INLINE bool google_protobuf_FileOptions_java_multiple_files(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)); }
|
7237
|
+
UPB_INLINE upb_stringview google_protobuf_FileOptions_go_package(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(48, 64)); }
|
7238
|
+
UPB_INLINE bool google_protobuf_FileOptions_cc_generic_services(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(17, 17)); }
|
7239
|
+
UPB_INLINE bool google_protobuf_FileOptions_java_generic_services(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(18, 18)); }
|
7240
|
+
UPB_INLINE bool google_protobuf_FileOptions_py_generic_services(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(19, 19)); }
|
7241
|
+
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)); }
|
7242
|
+
UPB_INLINE bool google_protobuf_FileOptions_deprecated(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(21, 21)); }
|
7243
|
+
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)); }
|
7244
|
+
UPB_INLINE bool google_protobuf_FileOptions_cc_enable_arenas(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(23, 23)); }
|
7245
|
+
UPB_INLINE upb_stringview google_protobuf_FileOptions_objc_class_prefix(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(56, 80)); }
|
7246
|
+
UPB_INLINE upb_stringview google_protobuf_FileOptions_csharp_namespace(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(64, 96)); }
|
7247
|
+
UPB_INLINE upb_stringview google_protobuf_FileOptions_swift_prefix(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(72, 112)); }
|
7248
|
+
UPB_INLINE upb_stringview google_protobuf_FileOptions_php_class_prefix(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(80, 128)); }
|
7249
|
+
UPB_INLINE upb_stringview google_protobuf_FileOptions_php_namespace(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(88, 144)); }
|
7250
|
+
UPB_INLINE bool google_protobuf_FileOptions_php_generic_services(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)); }
|
7251
|
+
UPB_INLINE const upb_array* google_protobuf_FileOptions_uninterpreted_option(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(96, 160)); }
|
7252
|
+
|
7253
|
+
UPB_INLINE void google_protobuf_FileOptions_set_java_package(google_protobuf_FileOptions *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(32, 32)) = value; }
|
7254
|
+
UPB_INLINE void google_protobuf_FileOptions_set_java_outer_classname(google_protobuf_FileOptions *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(40, 48)) = value; }
|
7255
|
+
UPB_INLINE void google_protobuf_FileOptions_set_optimize_for(google_protobuf_FileOptions *msg, google_protobuf_FileOptions_OptimizeMode value) { UPB_FIELD_AT(msg, google_protobuf_FileOptions_OptimizeMode, UPB_SIZE(8, 8)) = value; }
|
7256
|
+
UPB_INLINE void google_protobuf_FileOptions_set_java_multiple_files(google_protobuf_FileOptions *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)) = value; }
|
7257
|
+
UPB_INLINE void google_protobuf_FileOptions_set_go_package(google_protobuf_FileOptions *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(48, 64)) = value; }
|
7258
|
+
UPB_INLINE void google_protobuf_FileOptions_set_cc_generic_services(google_protobuf_FileOptions *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(17, 17)) = value; }
|
7259
|
+
UPB_INLINE void google_protobuf_FileOptions_set_java_generic_services(google_protobuf_FileOptions *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(18, 18)) = value; }
|
7260
|
+
UPB_INLINE void google_protobuf_FileOptions_set_py_generic_services(google_protobuf_FileOptions *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(19, 19)) = value; }
|
7261
|
+
UPB_INLINE void google_protobuf_FileOptions_set_java_generate_equals_and_hash(google_protobuf_FileOptions *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(20, 20)) = value; }
|
7262
|
+
UPB_INLINE void google_protobuf_FileOptions_set_deprecated(google_protobuf_FileOptions *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(21, 21)) = value; }
|
7263
|
+
UPB_INLINE void google_protobuf_FileOptions_set_java_string_check_utf8(google_protobuf_FileOptions *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(22, 22)) = value; }
|
7264
|
+
UPB_INLINE void google_protobuf_FileOptions_set_cc_enable_arenas(google_protobuf_FileOptions *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(23, 23)) = value; }
|
7265
|
+
UPB_INLINE void google_protobuf_FileOptions_set_objc_class_prefix(google_protobuf_FileOptions *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(56, 80)) = value; }
|
7266
|
+
UPB_INLINE void google_protobuf_FileOptions_set_csharp_namespace(google_protobuf_FileOptions *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(64, 96)) = value; }
|
7267
|
+
UPB_INLINE void google_protobuf_FileOptions_set_swift_prefix(google_protobuf_FileOptions *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(72, 112)) = value; }
|
7268
|
+
UPB_INLINE void google_protobuf_FileOptions_set_php_class_prefix(google_protobuf_FileOptions *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(80, 128)) = value; }
|
7269
|
+
UPB_INLINE void google_protobuf_FileOptions_set_php_namespace(google_protobuf_FileOptions *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(88, 144)) = value; }
|
7270
|
+
UPB_INLINE void google_protobuf_FileOptions_set_php_generic_services(google_protobuf_FileOptions *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)) = value; }
|
7271
|
+
UPB_INLINE void google_protobuf_FileOptions_set_uninterpreted_option(google_protobuf_FileOptions *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(96, 160)) = value; }
|
7272
|
+
|
7273
|
+
|
7274
|
+
/* google.protobuf.MessageOptions */
|
7275
|
+
|
7276
|
+
extern const upb_msglayout google_protobuf_MessageOptions_msginit;
|
7277
|
+
UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_new(upb_arena *arena) {
|
7278
|
+
return (google_protobuf_MessageOptions *)upb_msg_new(&google_protobuf_MessageOptions_msginit, arena);
|
7279
|
+
}
|
7280
|
+
UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_parsenew(upb_stringview buf, upb_arena *arena) {
|
7281
|
+
google_protobuf_MessageOptions *ret = google_protobuf_MessageOptions_new(arena);
|
7282
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_MessageOptions_msginit)) ? ret : NULL;
|
7283
|
+
}
|
7284
|
+
UPB_INLINE char *google_protobuf_MessageOptions_serialize(const google_protobuf_MessageOptions *msg, upb_arena *arena, size_t *len) {
|
7285
|
+
return upb_encode(msg, &google_protobuf_MessageOptions_msginit, arena, len);
|
7286
|
+
}
|
7287
|
+
|
7288
|
+
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)); }
|
7289
|
+
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)); }
|
7290
|
+
UPB_INLINE bool google_protobuf_MessageOptions_deprecated(const google_protobuf_MessageOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(3, 3)); }
|
7291
|
+
UPB_INLINE bool google_protobuf_MessageOptions_map_entry(const google_protobuf_MessageOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(4, 4)); }
|
7292
|
+
UPB_INLINE const upb_array* google_protobuf_MessageOptions_uninterpreted_option(const google_protobuf_MessageOptions *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(8, 8)); }
|
7293
|
+
|
7294
|
+
UPB_INLINE void google_protobuf_MessageOptions_set_message_set_wire_format(google_protobuf_MessageOptions *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; }
|
7295
|
+
UPB_INLINE void google_protobuf_MessageOptions_set_no_standard_descriptor_accessor(google_protobuf_MessageOptions *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value; }
|
7296
|
+
UPB_INLINE void google_protobuf_MessageOptions_set_deprecated(google_protobuf_MessageOptions *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(3, 3)) = value; }
|
7297
|
+
UPB_INLINE void google_protobuf_MessageOptions_set_map_entry(google_protobuf_MessageOptions *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(4, 4)) = value; }
|
7298
|
+
UPB_INLINE void google_protobuf_MessageOptions_set_uninterpreted_option(google_protobuf_MessageOptions *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(8, 8)) = value; }
|
7299
|
+
|
7300
|
+
|
7301
|
+
/* google.protobuf.FieldOptions */
|
7302
|
+
|
7303
|
+
extern const upb_msglayout google_protobuf_FieldOptions_msginit;
|
7304
|
+
UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_new(upb_arena *arena) {
|
7305
|
+
return (google_protobuf_FieldOptions *)upb_msg_new(&google_protobuf_FieldOptions_msginit, arena);
|
7306
|
+
}
|
7307
|
+
UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_parsenew(upb_stringview buf, upb_arena *arena) {
|
7308
|
+
google_protobuf_FieldOptions *ret = google_protobuf_FieldOptions_new(arena);
|
7309
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_FieldOptions_msginit)) ? ret : NULL;
|
7310
|
+
}
|
7311
|
+
UPB_INLINE char *google_protobuf_FieldOptions_serialize(const google_protobuf_FieldOptions *msg, upb_arena *arena, size_t *len) {
|
7312
|
+
return upb_encode(msg, &google_protobuf_FieldOptions_msginit, arena, len);
|
7313
|
+
}
|
7314
|
+
|
7315
|
+
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)); }
|
7316
|
+
UPB_INLINE bool google_protobuf_FieldOptions_packed(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)); }
|
7317
|
+
UPB_INLINE bool google_protobuf_FieldOptions_deprecated(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(25, 25)); }
|
7318
|
+
UPB_INLINE bool google_protobuf_FieldOptions_lazy(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(26, 26)); }
|
7319
|
+
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)); }
|
7320
|
+
UPB_INLINE bool google_protobuf_FieldOptions_weak(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(27, 27)); }
|
7321
|
+
UPB_INLINE const upb_array* google_protobuf_FieldOptions_uninterpreted_option(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(28, 32)); }
|
7322
|
+
|
7323
|
+
UPB_INLINE void google_protobuf_FieldOptions_set_ctype(google_protobuf_FieldOptions *msg, google_protobuf_FieldOptions_CType value) { UPB_FIELD_AT(msg, google_protobuf_FieldOptions_CType, UPB_SIZE(8, 8)) = value; }
|
7324
|
+
UPB_INLINE void google_protobuf_FieldOptions_set_packed(google_protobuf_FieldOptions *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)) = value; }
|
7325
|
+
UPB_INLINE void google_protobuf_FieldOptions_set_deprecated(google_protobuf_FieldOptions *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(25, 25)) = value; }
|
7326
|
+
UPB_INLINE void google_protobuf_FieldOptions_set_lazy(google_protobuf_FieldOptions *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(26, 26)) = value; }
|
7327
|
+
UPB_INLINE void google_protobuf_FieldOptions_set_jstype(google_protobuf_FieldOptions *msg, google_protobuf_FieldOptions_JSType value) { UPB_FIELD_AT(msg, google_protobuf_FieldOptions_JSType, UPB_SIZE(16, 16)) = value; }
|
7328
|
+
UPB_INLINE void google_protobuf_FieldOptions_set_weak(google_protobuf_FieldOptions *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(27, 27)) = value; }
|
7329
|
+
UPB_INLINE void google_protobuf_FieldOptions_set_uninterpreted_option(google_protobuf_FieldOptions *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(28, 32)) = value; }
|
7330
|
+
|
7331
|
+
|
7332
|
+
/* google.protobuf.OneofOptions */
|
7333
|
+
|
7334
|
+
extern const upb_msglayout google_protobuf_OneofOptions_msginit;
|
7335
|
+
UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_new(upb_arena *arena) {
|
7336
|
+
return (google_protobuf_OneofOptions *)upb_msg_new(&google_protobuf_OneofOptions_msginit, arena);
|
7337
|
+
}
|
7338
|
+
UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_parsenew(upb_stringview buf, upb_arena *arena) {
|
7339
|
+
google_protobuf_OneofOptions *ret = google_protobuf_OneofOptions_new(arena);
|
7340
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_OneofOptions_msginit)) ? ret : NULL;
|
7341
|
+
}
|
7342
|
+
UPB_INLINE char *google_protobuf_OneofOptions_serialize(const google_protobuf_OneofOptions *msg, upb_arena *arena, size_t *len) {
|
7343
|
+
return upb_encode(msg, &google_protobuf_OneofOptions_msginit, arena, len);
|
7344
|
+
}
|
7345
|
+
|
7346
|
+
UPB_INLINE const upb_array* google_protobuf_OneofOptions_uninterpreted_option(const google_protobuf_OneofOptions *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(0, 0)); }
|
7347
|
+
|
7348
|
+
UPB_INLINE void google_protobuf_OneofOptions_set_uninterpreted_option(google_protobuf_OneofOptions *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(0, 0)) = value; }
|
7349
|
+
|
7350
|
+
|
7351
|
+
/* google.protobuf.EnumOptions */
|
7352
|
+
|
7353
|
+
extern const upb_msglayout google_protobuf_EnumOptions_msginit;
|
7354
|
+
UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_new(upb_arena *arena) {
|
7355
|
+
return (google_protobuf_EnumOptions *)upb_msg_new(&google_protobuf_EnumOptions_msginit, arena);
|
7356
|
+
}
|
7357
|
+
UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_parsenew(upb_stringview buf, upb_arena *arena) {
|
7358
|
+
google_protobuf_EnumOptions *ret = google_protobuf_EnumOptions_new(arena);
|
7359
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_EnumOptions_msginit)) ? ret : NULL;
|
7360
|
+
}
|
7361
|
+
UPB_INLINE char *google_protobuf_EnumOptions_serialize(const google_protobuf_EnumOptions *msg, upb_arena *arena, size_t *len) {
|
7362
|
+
return upb_encode(msg, &google_protobuf_EnumOptions_msginit, arena, len);
|
7363
|
+
}
|
7364
|
+
|
7365
|
+
UPB_INLINE bool google_protobuf_EnumOptions_allow_alias(const google_protobuf_EnumOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); }
|
7366
|
+
UPB_INLINE bool google_protobuf_EnumOptions_deprecated(const google_protobuf_EnumOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)); }
|
7367
|
+
UPB_INLINE const upb_array* google_protobuf_EnumOptions_uninterpreted_option(const google_protobuf_EnumOptions *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(4, 8)); }
|
7368
|
+
|
7369
|
+
UPB_INLINE void google_protobuf_EnumOptions_set_allow_alias(google_protobuf_EnumOptions *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; }
|
7370
|
+
UPB_INLINE void google_protobuf_EnumOptions_set_deprecated(google_protobuf_EnumOptions *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value; }
|
7371
|
+
UPB_INLINE void google_protobuf_EnumOptions_set_uninterpreted_option(google_protobuf_EnumOptions *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(4, 8)) = value; }
|
7372
|
+
|
7373
|
+
|
7374
|
+
/* google.protobuf.EnumValueOptions */
|
7375
|
+
|
7376
|
+
extern const upb_msglayout google_protobuf_EnumValueOptions_msginit;
|
7377
|
+
UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_new(upb_arena *arena) {
|
7378
|
+
return (google_protobuf_EnumValueOptions *)upb_msg_new(&google_protobuf_EnumValueOptions_msginit, arena);
|
7379
|
+
}
|
7380
|
+
UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_parsenew(upb_stringview buf, upb_arena *arena) {
|
7381
|
+
google_protobuf_EnumValueOptions *ret = google_protobuf_EnumValueOptions_new(arena);
|
7382
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_EnumValueOptions_msginit)) ? ret : NULL;
|
7383
|
+
}
|
7384
|
+
UPB_INLINE char *google_protobuf_EnumValueOptions_serialize(const google_protobuf_EnumValueOptions *msg, upb_arena *arena, size_t *len) {
|
7385
|
+
return upb_encode(msg, &google_protobuf_EnumValueOptions_msginit, arena, len);
|
7386
|
+
}
|
7387
|
+
|
7388
|
+
UPB_INLINE bool google_protobuf_EnumValueOptions_deprecated(const google_protobuf_EnumValueOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); }
|
7389
|
+
UPB_INLINE const upb_array* google_protobuf_EnumValueOptions_uninterpreted_option(const google_protobuf_EnumValueOptions *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(4, 8)); }
|
7390
|
+
|
7391
|
+
UPB_INLINE void google_protobuf_EnumValueOptions_set_deprecated(google_protobuf_EnumValueOptions *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; }
|
7392
|
+
UPB_INLINE void google_protobuf_EnumValueOptions_set_uninterpreted_option(google_protobuf_EnumValueOptions *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(4, 8)) = value; }
|
7393
|
+
|
7394
|
+
|
7395
|
+
/* google.protobuf.ServiceOptions */
|
7396
|
+
|
7397
|
+
extern const upb_msglayout google_protobuf_ServiceOptions_msginit;
|
7398
|
+
UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_new(upb_arena *arena) {
|
7399
|
+
return (google_protobuf_ServiceOptions *)upb_msg_new(&google_protobuf_ServiceOptions_msginit, arena);
|
7400
|
+
}
|
7401
|
+
UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_parsenew(upb_stringview buf, upb_arena *arena) {
|
7402
|
+
google_protobuf_ServiceOptions *ret = google_protobuf_ServiceOptions_new(arena);
|
7403
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_ServiceOptions_msginit)) ? ret : NULL;
|
7404
|
+
}
|
7405
|
+
UPB_INLINE char *google_protobuf_ServiceOptions_serialize(const google_protobuf_ServiceOptions *msg, upb_arena *arena, size_t *len) {
|
7406
|
+
return upb_encode(msg, &google_protobuf_ServiceOptions_msginit, arena, len);
|
7407
|
+
}
|
7408
|
+
|
7409
|
+
UPB_INLINE bool google_protobuf_ServiceOptions_deprecated(const google_protobuf_ServiceOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); }
|
7410
|
+
UPB_INLINE const upb_array* google_protobuf_ServiceOptions_uninterpreted_option(const google_protobuf_ServiceOptions *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(4, 8)); }
|
7411
|
+
|
7412
|
+
UPB_INLINE void google_protobuf_ServiceOptions_set_deprecated(google_protobuf_ServiceOptions *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; }
|
7413
|
+
UPB_INLINE void google_protobuf_ServiceOptions_set_uninterpreted_option(google_protobuf_ServiceOptions *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(4, 8)) = value; }
|
7414
|
+
|
7415
|
+
|
7416
|
+
/* google.protobuf.MethodOptions */
|
7417
|
+
|
7418
|
+
extern const upb_msglayout google_protobuf_MethodOptions_msginit;
|
7419
|
+
UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_new(upb_arena *arena) {
|
7420
|
+
return (google_protobuf_MethodOptions *)upb_msg_new(&google_protobuf_MethodOptions_msginit, arena);
|
7421
|
+
}
|
7422
|
+
UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_parsenew(upb_stringview buf, upb_arena *arena) {
|
7423
|
+
google_protobuf_MethodOptions *ret = google_protobuf_MethodOptions_new(arena);
|
7424
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_MethodOptions_msginit)) ? ret : NULL;
|
7425
|
+
}
|
7426
|
+
UPB_INLINE char *google_protobuf_MethodOptions_serialize(const google_protobuf_MethodOptions *msg, upb_arena *arena, size_t *len) {
|
7427
|
+
return upb_encode(msg, &google_protobuf_MethodOptions_msginit, arena, len);
|
7428
|
+
}
|
7429
|
+
|
7430
|
+
UPB_INLINE bool google_protobuf_MethodOptions_deprecated(const google_protobuf_MethodOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)); }
|
7431
|
+
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)); }
|
7432
|
+
UPB_INLINE const upb_array* google_protobuf_MethodOptions_uninterpreted_option(const google_protobuf_MethodOptions *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(20, 24)); }
|
7433
|
+
|
7434
|
+
UPB_INLINE void google_protobuf_MethodOptions_set_deprecated(google_protobuf_MethodOptions *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)) = value; }
|
7435
|
+
UPB_INLINE void google_protobuf_MethodOptions_set_idempotency_level(google_protobuf_MethodOptions *msg, google_protobuf_MethodOptions_IdempotencyLevel value) { UPB_FIELD_AT(msg, google_protobuf_MethodOptions_IdempotencyLevel, UPB_SIZE(8, 8)) = value; }
|
7436
|
+
UPB_INLINE void google_protobuf_MethodOptions_set_uninterpreted_option(google_protobuf_MethodOptions *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(20, 24)) = value; }
|
7437
|
+
|
7438
|
+
|
7439
|
+
/* google.protobuf.UninterpretedOption */
|
7440
|
+
|
7441
|
+
extern const upb_msglayout google_protobuf_UninterpretedOption_msginit;
|
7442
|
+
UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_new(upb_arena *arena) {
|
7443
|
+
return (google_protobuf_UninterpretedOption *)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
|
7444
|
+
}
|
7445
|
+
UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_parsenew(upb_stringview buf, upb_arena *arena) {
|
7446
|
+
google_protobuf_UninterpretedOption *ret = google_protobuf_UninterpretedOption_new(arena);
|
7447
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_UninterpretedOption_msginit)) ? ret : NULL;
|
7448
|
+
}
|
7449
|
+
UPB_INLINE char *google_protobuf_UninterpretedOption_serialize(const google_protobuf_UninterpretedOption *msg, upb_arena *arena, size_t *len) {
|
7450
|
+
return upb_encode(msg, &google_protobuf_UninterpretedOption_msginit, arena, len);
|
7451
|
+
}
|
7452
|
+
|
7453
|
+
UPB_INLINE const upb_array* google_protobuf_UninterpretedOption_name(const google_protobuf_UninterpretedOption *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(56, 80)); }
|
7454
|
+
UPB_INLINE upb_stringview google_protobuf_UninterpretedOption_identifier_value(const google_protobuf_UninterpretedOption *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(32, 32)); }
|
7455
|
+
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)); }
|
7456
|
+
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)); }
|
7457
|
+
UPB_INLINE double google_protobuf_UninterpretedOption_double_value(const google_protobuf_UninterpretedOption *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(24, 24)); }
|
7458
|
+
UPB_INLINE upb_stringview google_protobuf_UninterpretedOption_string_value(const google_protobuf_UninterpretedOption *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(40, 48)); }
|
7459
|
+
UPB_INLINE upb_stringview google_protobuf_UninterpretedOption_aggregate_value(const google_protobuf_UninterpretedOption *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(48, 64)); }
|
7460
|
+
|
7461
|
+
UPB_INLINE void google_protobuf_UninterpretedOption_set_name(google_protobuf_UninterpretedOption *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(56, 80)) = value; }
|
7462
|
+
UPB_INLINE void google_protobuf_UninterpretedOption_set_identifier_value(google_protobuf_UninterpretedOption *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(32, 32)) = value; }
|
7463
|
+
UPB_INLINE void google_protobuf_UninterpretedOption_set_positive_int_value(google_protobuf_UninterpretedOption *msg, uint64_t value) { UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)) = value; }
|
7464
|
+
UPB_INLINE void google_protobuf_UninterpretedOption_set_negative_int_value(google_protobuf_UninterpretedOption *msg, int64_t value) { UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)) = value; }
|
7465
|
+
UPB_INLINE void google_protobuf_UninterpretedOption_set_double_value(google_protobuf_UninterpretedOption *msg, double value) { UPB_FIELD_AT(msg, double, UPB_SIZE(24, 24)) = value; }
|
7466
|
+
UPB_INLINE void google_protobuf_UninterpretedOption_set_string_value(google_protobuf_UninterpretedOption *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(40, 48)) = value; }
|
7467
|
+
UPB_INLINE void google_protobuf_UninterpretedOption_set_aggregate_value(google_protobuf_UninterpretedOption *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(48, 64)) = value; }
|
7468
|
+
|
7469
|
+
|
7470
|
+
/* google.protobuf.UninterpretedOption.NamePart */
|
7471
|
+
|
7472
|
+
extern const upb_msglayout google_protobuf_UninterpretedOption_NamePart_msginit;
|
7473
|
+
UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_new(upb_arena *arena) {
|
7474
|
+
return (google_protobuf_UninterpretedOption_NamePart *)upb_msg_new(&google_protobuf_UninterpretedOption_NamePart_msginit, arena);
|
7475
|
+
}
|
7476
|
+
UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_parsenew(upb_stringview buf, upb_arena *arena) {
|
7477
|
+
google_protobuf_UninterpretedOption_NamePart *ret = google_protobuf_UninterpretedOption_NamePart_new(arena);
|
7478
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_UninterpretedOption_NamePart_msginit)) ? ret : NULL;
|
7479
|
+
}
|
7480
|
+
UPB_INLINE char *google_protobuf_UninterpretedOption_NamePart_serialize(const google_protobuf_UninterpretedOption_NamePart *msg, upb_arena *arena, size_t *len) {
|
7481
|
+
return upb_encode(msg, &google_protobuf_UninterpretedOption_NamePart_msginit, arena, len);
|
7482
|
+
}
|
7483
|
+
|
7484
|
+
UPB_INLINE upb_stringview google_protobuf_UninterpretedOption_NamePart_name_part(const google_protobuf_UninterpretedOption_NamePart *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)); }
|
7485
|
+
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)); }
|
7486
|
+
|
7487
|
+
UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_name_part(google_protobuf_UninterpretedOption_NamePart *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)) = value; }
|
7488
|
+
UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_is_extension(google_protobuf_UninterpretedOption_NamePart *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; }
|
7489
|
+
|
7490
|
+
|
7491
|
+
/* google.protobuf.SourceCodeInfo */
|
7492
|
+
|
7493
|
+
extern const upb_msglayout google_protobuf_SourceCodeInfo_msginit;
|
7494
|
+
UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_new(upb_arena *arena) {
|
7495
|
+
return (google_protobuf_SourceCodeInfo *)upb_msg_new(&google_protobuf_SourceCodeInfo_msginit, arena);
|
7496
|
+
}
|
7497
|
+
UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_parsenew(upb_stringview buf, upb_arena *arena) {
|
7498
|
+
google_protobuf_SourceCodeInfo *ret = google_protobuf_SourceCodeInfo_new(arena);
|
7499
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_SourceCodeInfo_msginit)) ? ret : NULL;
|
7500
|
+
}
|
7501
|
+
UPB_INLINE char *google_protobuf_SourceCodeInfo_serialize(const google_protobuf_SourceCodeInfo *msg, upb_arena *arena, size_t *len) {
|
7502
|
+
return upb_encode(msg, &google_protobuf_SourceCodeInfo_msginit, arena, len);
|
7503
|
+
}
|
7504
|
+
|
7505
|
+
UPB_INLINE const upb_array* google_protobuf_SourceCodeInfo_location(const google_protobuf_SourceCodeInfo *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(0, 0)); }
|
7506
|
+
|
7507
|
+
UPB_INLINE void google_protobuf_SourceCodeInfo_set_location(google_protobuf_SourceCodeInfo *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(0, 0)) = value; }
|
7508
|
+
|
7509
|
+
|
7510
|
+
/* google.protobuf.SourceCodeInfo.Location */
|
7511
|
+
|
7512
|
+
extern const upb_msglayout google_protobuf_SourceCodeInfo_Location_msginit;
|
7513
|
+
UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_new(upb_arena *arena) {
|
7514
|
+
return (google_protobuf_SourceCodeInfo_Location *)upb_msg_new(&google_protobuf_SourceCodeInfo_Location_msginit, arena);
|
7515
|
+
}
|
7516
|
+
UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_parsenew(upb_stringview buf, upb_arena *arena) {
|
7517
|
+
google_protobuf_SourceCodeInfo_Location *ret = google_protobuf_SourceCodeInfo_Location_new(arena);
|
7518
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_SourceCodeInfo_Location_msginit)) ? ret : NULL;
|
7519
|
+
}
|
7520
|
+
UPB_INLINE char *google_protobuf_SourceCodeInfo_Location_serialize(const google_protobuf_SourceCodeInfo_Location *msg, upb_arena *arena, size_t *len) {
|
7521
|
+
return upb_encode(msg, &google_protobuf_SourceCodeInfo_Location_msginit, arena, len);
|
7522
|
+
}
|
7523
|
+
|
7524
|
+
UPB_INLINE const upb_array* google_protobuf_SourceCodeInfo_Location_path(const google_protobuf_SourceCodeInfo_Location *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(24, 48)); }
|
7525
|
+
UPB_INLINE const upb_array* google_protobuf_SourceCodeInfo_Location_span(const google_protobuf_SourceCodeInfo_Location *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(28, 56)); }
|
7526
|
+
UPB_INLINE upb_stringview google_protobuf_SourceCodeInfo_Location_leading_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)); }
|
7527
|
+
UPB_INLINE upb_stringview google_protobuf_SourceCodeInfo_Location_trailing_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(16, 32)); }
|
7528
|
+
UPB_INLINE const upb_array* google_protobuf_SourceCodeInfo_Location_leading_detached_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(32, 64)); }
|
7529
|
+
|
7530
|
+
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_path(google_protobuf_SourceCodeInfo_Location *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(24, 48)) = value; }
|
7531
|
+
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_span(google_protobuf_SourceCodeInfo_Location *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(28, 56)) = value; }
|
7532
|
+
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_leading_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)) = value; }
|
7533
|
+
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_trailing_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(16, 32)) = value; }
|
7534
|
+
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(32, 64)) = value; }
|
7535
|
+
|
7536
|
+
|
7537
|
+
/* google.protobuf.GeneratedCodeInfo */
|
7538
|
+
|
7539
|
+
extern const upb_msglayout google_protobuf_GeneratedCodeInfo_msginit;
|
7540
|
+
UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_new(upb_arena *arena) {
|
7541
|
+
return (google_protobuf_GeneratedCodeInfo *)upb_msg_new(&google_protobuf_GeneratedCodeInfo_msginit, arena);
|
7542
|
+
}
|
7543
|
+
UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_parsenew(upb_stringview buf, upb_arena *arena) {
|
7544
|
+
google_protobuf_GeneratedCodeInfo *ret = google_protobuf_GeneratedCodeInfo_new(arena);
|
7545
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_GeneratedCodeInfo_msginit)) ? ret : NULL;
|
7546
|
+
}
|
7547
|
+
UPB_INLINE char *google_protobuf_GeneratedCodeInfo_serialize(const google_protobuf_GeneratedCodeInfo *msg, upb_arena *arena, size_t *len) {
|
7548
|
+
return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_msginit, arena, len);
|
7549
|
+
}
|
7550
|
+
|
7551
|
+
UPB_INLINE const upb_array* google_protobuf_GeneratedCodeInfo_annotation(const google_protobuf_GeneratedCodeInfo *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(0, 0)); }
|
7552
|
+
|
7553
|
+
UPB_INLINE void google_protobuf_GeneratedCodeInfo_set_annotation(google_protobuf_GeneratedCodeInfo *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(0, 0)) = value; }
|
7554
|
+
|
7555
|
+
|
7556
|
+
/* google.protobuf.GeneratedCodeInfo.Annotation */
|
7557
|
+
|
7558
|
+
extern const upb_msglayout google_protobuf_GeneratedCodeInfo_Annotation_msginit;
|
7559
|
+
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_new(upb_arena *arena) {
|
7560
|
+
return (google_protobuf_GeneratedCodeInfo_Annotation *)upb_msg_new(&google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena);
|
7561
|
+
}
|
7562
|
+
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_parsenew(upb_stringview buf, upb_arena *arena) {
|
7563
|
+
google_protobuf_GeneratedCodeInfo_Annotation *ret = google_protobuf_GeneratedCodeInfo_Annotation_new(arena);
|
7564
|
+
return (ret && upb_decode(buf, ret, &google_protobuf_GeneratedCodeInfo_Annotation_msginit)) ? ret : NULL;
|
7565
|
+
}
|
7566
|
+
UPB_INLINE char *google_protobuf_GeneratedCodeInfo_Annotation_serialize(const google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_arena *arena, size_t *len) {
|
7567
|
+
return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena, len);
|
7568
|
+
}
|
7569
|
+
|
7570
|
+
UPB_INLINE const upb_array* google_protobuf_GeneratedCodeInfo_Annotation_path(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(24, 32)); }
|
7571
|
+
UPB_INLINE upb_stringview google_protobuf_GeneratedCodeInfo_Annotation_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(16, 16)); }
|
7572
|
+
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)); }
|
7573
|
+
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)); }
|
7574
|
+
|
7575
|
+
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_array* value) { UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(24, 32)) = value; }
|
7576
|
+
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_source_file(google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_stringview value) { UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(16, 16)) = value; }
|
7577
|
+
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_begin(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) { UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; }
|
7578
|
+
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_end(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) { UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; }
|
7579
|
+
|
7580
|
+
|
7581
|
+
UPB_END_EXTERN_C
|
7582
|
+
|
7583
|
+
|
7584
|
+
#endif /* GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_ */
|
6789
7585
|
/*
|
6790
7586
|
** structs.int.h: structures definitions that are internal to upb.
|
6791
7587
|
*/
|
@@ -6799,7 +7595,7 @@ struct upb_array {
|
|
6799
7595
|
void *data; /* Each element is element_size. */
|
6800
7596
|
size_t len; /* Measured in elements. */
|
6801
7597
|
size_t size; /* Measured in elements. */
|
6802
|
-
|
7598
|
+
upb_arena *arena;
|
6803
7599
|
};
|
6804
7600
|
|
6805
7601
|
#endif /* UPB_STRUCTS_H_ */
|
@@ -6920,6 +7716,10 @@ struct upb_msgdef {
|
|
6920
7716
|
/* Whether this message has proto2 or proto3 semantics. */
|
6921
7717
|
upb_syntax_t syntax;
|
6922
7718
|
|
7719
|
+
/* Type of well known type message. UPB_WELLKNOWN_UNSPECIFIED for
|
7720
|
+
* non-well-known message. */
|
7721
|
+
upb_wellknowntype_t well_known_type;
|
7722
|
+
|
6923
7723
|
/* TODO(haberman): proper extension ranges (there can be multiple). */
|
6924
7724
|
};
|
6925
7725
|
|
@@ -6928,10 +7728,11 @@ extern const struct upb_refcounted_vtbl upb_msgdef_vtbl;
|
|
6928
7728
|
/* TODO: also support static initialization of the oneofs table. This will be
|
6929
7729
|
* needed if we compile in descriptors that contain oneofs. */
|
6930
7730
|
#define UPB_MSGDEF_INIT(name, selector_count, submsg_field_count, itof, ntof, \
|
6931
|
-
map_entry, syntax, refs, ref2s)
|
7731
|
+
map_entry, syntax, well_known_type, refs, ref2s) \
|
6932
7732
|
{ \
|
6933
7733
|
UPB_DEF_INIT(name, UPB_DEF_MSG, &upb_fielddef_vtbl, refs, ref2s), \
|
6934
|
-
selector_count, submsg_field_count, itof, ntof, map_entry, syntax
|
7734
|
+
selector_count, submsg_field_count, itof, ntof, map_entry, syntax, \
|
7735
|
+
well_known_type \
|
6935
7736
|
}
|
6936
7737
|
|
6937
7738
|
|
@@ -6994,22 +7795,44 @@ struct upb_filedef {
|
|
6994
7795
|
extern const struct upb_refcounted_vtbl upb_filedef_vtbl;
|
6995
7796
|
|
6996
7797
|
#endif /* UPB_STATICINIT_H_ */
|
6997
|
-
/*
|
6998
|
-
** upb_encode: parsing into a upb_msg using a upb_msglayout.
|
6999
|
-
*/
|
7000
7798
|
|
7001
|
-
#ifndef UPB_ENCODE_H_
|
7002
|
-
#define UPB_ENCODE_H_
|
7003
7799
|
|
7800
|
+
#ifndef UPB_MSGFACTORY_H_
|
7801
|
+
#define UPB_MSGFACTORY_H_
|
7004
7802
|
|
7005
|
-
|
7803
|
+
UPB_DECLARE_TYPE(upb::MessageFactory, upb_msgfactory)
|
7006
7804
|
|
7007
|
-
|
7008
|
-
upb_env *env, size_t *size);
|
7805
|
+
/** upb_msgfactory ************************************************************/
|
7009
7806
|
|
7010
|
-
|
7807
|
+
/* A upb_msgfactory contains a cache of upb_msglayout, upb_handlers, and
|
7808
|
+
* upb_visitorplan objects. These are the objects necessary to represent,
|
7809
|
+
* populate, and and visit upb_msg objects.
|
7810
|
+
*
|
7811
|
+
* These caches are all populated by upb_msgdef, and lazily created on demand.
|
7812
|
+
*/
|
7011
7813
|
|
7012
|
-
|
7814
|
+
/* Creates and destroys a msgfactory, respectively. The messages for this
|
7815
|
+
* msgfactory must come from |symtab| (which should outlive the msgfactory). */
|
7816
|
+
upb_msgfactory *upb_msgfactory_new(const upb_symtab *symtab);
|
7817
|
+
void upb_msgfactory_free(upb_msgfactory *f);
|
7818
|
+
|
7819
|
+
const upb_symtab *upb_msgfactory_symtab(const upb_msgfactory *f);
|
7820
|
+
|
7821
|
+
/* The functions to get cached objects, lazily creating them on demand. These
|
7822
|
+
* all require:
|
7823
|
+
*
|
7824
|
+
* - m is in upb_msgfactory_symtab(f)
|
7825
|
+
* - upb_msgdef_mapentry(m) == false (since map messages can't have layouts).
|
7826
|
+
*
|
7827
|
+
* The returned objects will live for as long as the msgfactory does.
|
7828
|
+
*
|
7829
|
+
* TODO(haberman): consider making this thread-safe and take a const
|
7830
|
+
* upb_msgfactory. */
|
7831
|
+
const upb_msglayout *upb_msgfactory_getlayout(upb_msgfactory *f,
|
7832
|
+
const upb_msgdef *m);
|
7833
|
+
|
7834
|
+
|
7835
|
+
#endif /* UPB_MSGFACTORY_H_ */
|
7013
7836
|
/*
|
7014
7837
|
** upb::descriptor::Reader (upb_descreader)
|
7015
7838
|
**
|
@@ -7112,53 +7935,6 @@ inline FileDef* Reader::file(size_t i) const {
|
|
7112
7935
|
|
7113
7936
|
UPB_BEGIN_EXTERN_C
|
7114
7937
|
|
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
7938
|
/* MessageDefs: call these functions to get a ref to a msgdef. */
|
7163
7939
|
const upb_msgdef *upbdefs_google_protobuf_DescriptorProto_get(const void *owner);
|
7164
7940
|
const upb_msgdef *upbdefs_google_protobuf_DescriptorProto_ExtensionRange_get(const void *owner);
|
@@ -8793,7 +9569,7 @@ UPB_DECLARE_DERIVED_TYPE(upb::json::ParserMethod, upb::RefCounted,
|
|
8793
9569
|
* constructed. This hint may be an overestimate for some build configurations.
|
8794
9570
|
* But if the parser library is upgraded without recompiling the application,
|
8795
9571
|
* it may be an underestimate. */
|
8796
|
-
#define UPB_JSON_PARSER_SIZE
|
9572
|
+
#define UPB_JSON_PARSER_SIZE 5712
|
8797
9573
|
|
8798
9574
|
#ifdef __cplusplus
|
8799
9575
|
|
@@ -8802,7 +9578,8 @@ UPB_DECLARE_DERIVED_TYPE(upb::json::ParserMethod, upb::RefCounted,
|
|
8802
9578
|
class upb::json::Parser {
|
8803
9579
|
public:
|
8804
9580
|
static Parser* Create(Environment* env, const ParserMethod* method,
|
8805
|
-
|
9581
|
+
const SymbolTable* symtab,
|
9582
|
+
Sink* output, bool ignore_json_unknown);
|
8806
9583
|
|
8807
9584
|
BytesSink* input();
|
8808
9585
|
|
@@ -8836,7 +9613,9 @@ UPB_BEGIN_EXTERN_C
|
|
8836
9613
|
|
8837
9614
|
upb_json_parser* upb_json_parser_create(upb_env* e,
|
8838
9615
|
const upb_json_parsermethod* m,
|
8839
|
-
|
9616
|
+
const upb_symtab* symtab,
|
9617
|
+
upb_sink* output,
|
9618
|
+
bool ignore_json_unknown);
|
8840
9619
|
upb_bytessink *upb_json_parser_input(upb_json_parser *p);
|
8841
9620
|
|
8842
9621
|
upb_json_parsermethod* upb_json_parsermethod_new(const upb_msgdef* md,
|
@@ -8856,8 +9635,10 @@ UPB_END_EXTERN_C
|
|
8856
9635
|
namespace upb {
|
8857
9636
|
namespace json {
|
8858
9637
|
inline Parser* Parser::Create(Environment* env, const ParserMethod* method,
|
8859
|
-
|
8860
|
-
|
9638
|
+
const SymbolTable* symtab,
|
9639
|
+
Sink* output, bool ignore_json_unknown) {
|
9640
|
+
return upb_json_parser_create(
|
9641
|
+
env, method, symtab, output, ignore_json_unknown);
|
8861
9642
|
}
|
8862
9643
|
inline BytesSink* Parser::input() {
|
8863
9644
|
return upb_json_parser_input(this);
|
@@ -8906,7 +9687,7 @@ UPB_DECLARE_TYPE(upb::json::Printer, upb_json_printer)
|
|
8906
9687
|
|
8907
9688
|
/* upb::json::Printer *********************************************************/
|
8908
9689
|
|
8909
|
-
#define UPB_JSON_PRINTER_SIZE
|
9690
|
+
#define UPB_JSON_PRINTER_SIZE 192
|
8910
9691
|
|
8911
9692
|
#ifdef __cplusplus
|
8912
9693
|
|
@@ -8967,3 +9748,8 @@ inline reffed_ptr<const Handlers> Printer::NewHandlers(
|
|
8967
9748
|
#endif
|
8968
9749
|
|
8969
9750
|
#endif /* UPB_JSON_TYPED_PRINTER_H_ */
|
9751
|
+
|
9752
|
+
#undef UPB_SIZE
|
9753
|
+
#undef UPB_FIELD_AT
|
9754
|
+
#undef UPB_READ_ONEOF
|
9755
|
+
#undef UPB_WRITE_ONEOF
|