1 /* This file was generated by upbc (the upb compiler) from the input
2 * file:
3 *
4 * validate/validate.proto
5 *
6 * Do not edit -- your changes will be discarded when the file is
7 * regenerated. */
8
9 #ifndef VALIDATE_VALIDATE_PROTO_UPB_H_
10 #define VALIDATE_VALIDATE_PROTO_UPB_H_
11
12 #include "upb/msg.h"
13 #include "upb/decode.h"
14 #include "upb/encode.h"
15
16 #include "upb/port_def.inc"
17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21
22 struct validate_FieldRules;
23 struct validate_FloatRules;
24 struct validate_DoubleRules;
25 struct validate_Int32Rules;
26 struct validate_Int64Rules;
27 struct validate_UInt32Rules;
28 struct validate_UInt64Rules;
29 struct validate_SInt32Rules;
30 struct validate_SInt64Rules;
31 struct validate_Fixed32Rules;
32 struct validate_Fixed64Rules;
33 struct validate_SFixed32Rules;
34 struct validate_SFixed64Rules;
35 struct validate_BoolRules;
36 struct validate_StringRules;
37 struct validate_BytesRules;
38 struct validate_EnumRules;
39 struct validate_MessageRules;
40 struct validate_RepeatedRules;
41 struct validate_MapRules;
42 struct validate_AnyRules;
43 struct validate_DurationRules;
44 struct validate_TimestampRules;
45 typedef struct validate_FieldRules validate_FieldRules;
46 typedef struct validate_FloatRules validate_FloatRules;
47 typedef struct validate_DoubleRules validate_DoubleRules;
48 typedef struct validate_Int32Rules validate_Int32Rules;
49 typedef struct validate_Int64Rules validate_Int64Rules;
50 typedef struct validate_UInt32Rules validate_UInt32Rules;
51 typedef struct validate_UInt64Rules validate_UInt64Rules;
52 typedef struct validate_SInt32Rules validate_SInt32Rules;
53 typedef struct validate_SInt64Rules validate_SInt64Rules;
54 typedef struct validate_Fixed32Rules validate_Fixed32Rules;
55 typedef struct validate_Fixed64Rules validate_Fixed64Rules;
56 typedef struct validate_SFixed32Rules validate_SFixed32Rules;
57 typedef struct validate_SFixed64Rules validate_SFixed64Rules;
58 typedef struct validate_BoolRules validate_BoolRules;
59 typedef struct validate_StringRules validate_StringRules;
60 typedef struct validate_BytesRules validate_BytesRules;
61 typedef struct validate_EnumRules validate_EnumRules;
62 typedef struct validate_MessageRules validate_MessageRules;
63 typedef struct validate_RepeatedRules validate_RepeatedRules;
64 typedef struct validate_MapRules validate_MapRules;
65 typedef struct validate_AnyRules validate_AnyRules;
66 typedef struct validate_DurationRules validate_DurationRules;
67 typedef struct validate_TimestampRules validate_TimestampRules;
68 extern const upb_msglayout validate_FieldRules_msginit;
69 extern const upb_msglayout validate_FloatRules_msginit;
70 extern const upb_msglayout validate_DoubleRules_msginit;
71 extern const upb_msglayout validate_Int32Rules_msginit;
72 extern const upb_msglayout validate_Int64Rules_msginit;
73 extern const upb_msglayout validate_UInt32Rules_msginit;
74 extern const upb_msglayout validate_UInt64Rules_msginit;
75 extern const upb_msglayout validate_SInt32Rules_msginit;
76 extern const upb_msglayout validate_SInt64Rules_msginit;
77 extern const upb_msglayout validate_Fixed32Rules_msginit;
78 extern const upb_msglayout validate_Fixed64Rules_msginit;
79 extern const upb_msglayout validate_SFixed32Rules_msginit;
80 extern const upb_msglayout validate_SFixed64Rules_msginit;
81 extern const upb_msglayout validate_BoolRules_msginit;
82 extern const upb_msglayout validate_StringRules_msginit;
83 extern const upb_msglayout validate_BytesRules_msginit;
84 extern const upb_msglayout validate_EnumRules_msginit;
85 extern const upb_msglayout validate_MessageRules_msginit;
86 extern const upb_msglayout validate_RepeatedRules_msginit;
87 extern const upb_msglayout validate_MapRules_msginit;
88 extern const upb_msglayout validate_AnyRules_msginit;
89 extern const upb_msglayout validate_DurationRules_msginit;
90 extern const upb_msglayout validate_TimestampRules_msginit;
91 struct google_protobuf_Duration;
92 struct google_protobuf_Timestamp;
93 extern const upb_msglayout google_protobuf_Duration_msginit;
94 extern const upb_msglayout google_protobuf_Timestamp_msginit;
95
96 typedef enum {
97 validate_UNKNOWN = 0,
98 validate_HTTP_HEADER_NAME = 1,
99 validate_HTTP_HEADER_VALUE = 2
100 } validate_KnownRegex;
101
102
103 /* validate.FieldRules */
104
validate_FieldRules_new(upb_arena * arena)105 UPB_INLINE validate_FieldRules *validate_FieldRules_new(upb_arena *arena) {
106 return (validate_FieldRules *)_upb_msg_new(&validate_FieldRules_msginit, arena);
107 }
validate_FieldRules_parse(const char * buf,size_t size,upb_arena * arena)108 UPB_INLINE validate_FieldRules *validate_FieldRules_parse(const char *buf, size_t size,
109 upb_arena *arena) {
110 validate_FieldRules *ret = validate_FieldRules_new(arena);
111 return (ret && upb_decode(buf, size, ret, &validate_FieldRules_msginit, arena)) ? ret : NULL;
112 }
validate_FieldRules_serialize(const validate_FieldRules * msg,upb_arena * arena,size_t * len)113 UPB_INLINE char *validate_FieldRules_serialize(const validate_FieldRules *msg, upb_arena *arena, size_t *len) {
114 return upb_encode(msg, &validate_FieldRules_msginit, arena, len);
115 }
116
117 typedef enum {
118 validate_FieldRules_type_float = 1,
119 validate_FieldRules_type_double = 2,
120 validate_FieldRules_type_int32 = 3,
121 validate_FieldRules_type_int64 = 4,
122 validate_FieldRules_type_uint32 = 5,
123 validate_FieldRules_type_uint64 = 6,
124 validate_FieldRules_type_sint32 = 7,
125 validate_FieldRules_type_sint64 = 8,
126 validate_FieldRules_type_fixed32 = 9,
127 validate_FieldRules_type_fixed64 = 10,
128 validate_FieldRules_type_sfixed32 = 11,
129 validate_FieldRules_type_sfixed64 = 12,
130 validate_FieldRules_type_bool = 13,
131 validate_FieldRules_type_string = 14,
132 validate_FieldRules_type_bytes = 15,
133 validate_FieldRules_type_enum = 16,
134 validate_FieldRules_type_repeated = 18,
135 validate_FieldRules_type_map = 19,
136 validate_FieldRules_type_any = 20,
137 validate_FieldRules_type_duration = 21,
138 validate_FieldRules_type_timestamp = 22,
139 validate_FieldRules_type_NOT_SET = 0
140 } validate_FieldRules_type_oneofcases;
validate_FieldRules_type_case(const validate_FieldRules * msg)141 UPB_INLINE validate_FieldRules_type_oneofcases validate_FieldRules_type_case(const validate_FieldRules* msg) { return (validate_FieldRules_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); }
142
validate_FieldRules_has_float(const validate_FieldRules * msg)143 UPB_INLINE bool validate_FieldRules_has_float(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 1; }
validate_FieldRules_float(const validate_FieldRules * msg)144 UPB_INLINE const validate_FloatRules* validate_FieldRules_float(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_FloatRules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 1, NULL); }
validate_FieldRules_has_double(const validate_FieldRules * msg)145 UPB_INLINE bool validate_FieldRules_has_double(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 2; }
validate_FieldRules_double(const validate_FieldRules * msg)146 UPB_INLINE const validate_DoubleRules* validate_FieldRules_double(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_DoubleRules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); }
validate_FieldRules_has_int32(const validate_FieldRules * msg)147 UPB_INLINE bool validate_FieldRules_has_int32(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 3; }
validate_FieldRules_int32(const validate_FieldRules * msg)148 UPB_INLINE const validate_Int32Rules* validate_FieldRules_int32(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_Int32Rules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); }
validate_FieldRules_has_int64(const validate_FieldRules * msg)149 UPB_INLINE bool validate_FieldRules_has_int64(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 4; }
validate_FieldRules_int64(const validate_FieldRules * msg)150 UPB_INLINE const validate_Int64Rules* validate_FieldRules_int64(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_Int64Rules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 4, NULL); }
validate_FieldRules_has_uint32(const validate_FieldRules * msg)151 UPB_INLINE bool validate_FieldRules_has_uint32(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 5; }
validate_FieldRules_uint32(const validate_FieldRules * msg)152 UPB_INLINE const validate_UInt32Rules* validate_FieldRules_uint32(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_UInt32Rules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 5, NULL); }
validate_FieldRules_has_uint64(const validate_FieldRules * msg)153 UPB_INLINE bool validate_FieldRules_has_uint64(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 6; }
validate_FieldRules_uint64(const validate_FieldRules * msg)154 UPB_INLINE const validate_UInt64Rules* validate_FieldRules_uint64(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_UInt64Rules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 6, NULL); }
validate_FieldRules_has_sint32(const validate_FieldRules * msg)155 UPB_INLINE bool validate_FieldRules_has_sint32(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 7; }
validate_FieldRules_sint32(const validate_FieldRules * msg)156 UPB_INLINE const validate_SInt32Rules* validate_FieldRules_sint32(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_SInt32Rules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 7, NULL); }
validate_FieldRules_has_sint64(const validate_FieldRules * msg)157 UPB_INLINE bool validate_FieldRules_has_sint64(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 8; }
validate_FieldRules_sint64(const validate_FieldRules * msg)158 UPB_INLINE const validate_SInt64Rules* validate_FieldRules_sint64(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_SInt64Rules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 8, NULL); }
validate_FieldRules_has_fixed32(const validate_FieldRules * msg)159 UPB_INLINE bool validate_FieldRules_has_fixed32(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 9; }
validate_FieldRules_fixed32(const validate_FieldRules * msg)160 UPB_INLINE const validate_Fixed32Rules* validate_FieldRules_fixed32(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_Fixed32Rules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 9, NULL); }
validate_FieldRules_has_fixed64(const validate_FieldRules * msg)161 UPB_INLINE bool validate_FieldRules_has_fixed64(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 10; }
validate_FieldRules_fixed64(const validate_FieldRules * msg)162 UPB_INLINE const validate_Fixed64Rules* validate_FieldRules_fixed64(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_Fixed64Rules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 10, NULL); }
validate_FieldRules_has_sfixed32(const validate_FieldRules * msg)163 UPB_INLINE bool validate_FieldRules_has_sfixed32(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 11; }
validate_FieldRules_sfixed32(const validate_FieldRules * msg)164 UPB_INLINE const validate_SFixed32Rules* validate_FieldRules_sfixed32(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_SFixed32Rules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 11, NULL); }
validate_FieldRules_has_sfixed64(const validate_FieldRules * msg)165 UPB_INLINE bool validate_FieldRules_has_sfixed64(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 12; }
validate_FieldRules_sfixed64(const validate_FieldRules * msg)166 UPB_INLINE const validate_SFixed64Rules* validate_FieldRules_sfixed64(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_SFixed64Rules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 12, NULL); }
validate_FieldRules_has_bool(const validate_FieldRules * msg)167 UPB_INLINE bool validate_FieldRules_has_bool(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 13; }
validate_FieldRules_bool(const validate_FieldRules * msg)168 UPB_INLINE const validate_BoolRules* validate_FieldRules_bool(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_BoolRules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 13, NULL); }
validate_FieldRules_has_string(const validate_FieldRules * msg)169 UPB_INLINE bool validate_FieldRules_has_string(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 14; }
validate_FieldRules_string(const validate_FieldRules * msg)170 UPB_INLINE const validate_StringRules* validate_FieldRules_string(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_StringRules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 14, NULL); }
validate_FieldRules_has_bytes(const validate_FieldRules * msg)171 UPB_INLINE bool validate_FieldRules_has_bytes(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 15; }
validate_FieldRules_bytes(const validate_FieldRules * msg)172 UPB_INLINE const validate_BytesRules* validate_FieldRules_bytes(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_BytesRules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 15, NULL); }
validate_FieldRules_has_enum(const validate_FieldRules * msg)173 UPB_INLINE bool validate_FieldRules_has_enum(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 16; }
validate_FieldRules_enum(const validate_FieldRules * msg)174 UPB_INLINE const validate_EnumRules* validate_FieldRules_enum(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_EnumRules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 16, NULL); }
validate_FieldRules_has_message(const validate_FieldRules * msg)175 UPB_INLINE bool validate_FieldRules_has_message(const validate_FieldRules *msg) { return _upb_hasbit(msg, 1); }
validate_FieldRules_message(const validate_FieldRules * msg)176 UPB_INLINE const validate_MessageRules* validate_FieldRules_message(const validate_FieldRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const validate_MessageRules*); }
validate_FieldRules_has_repeated(const validate_FieldRules * msg)177 UPB_INLINE bool validate_FieldRules_has_repeated(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 18; }
validate_FieldRules_repeated(const validate_FieldRules * msg)178 UPB_INLINE const validate_RepeatedRules* validate_FieldRules_repeated(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_RepeatedRules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 18, NULL); }
validate_FieldRules_has_map(const validate_FieldRules * msg)179 UPB_INLINE bool validate_FieldRules_has_map(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 19; }
validate_FieldRules_map(const validate_FieldRules * msg)180 UPB_INLINE const validate_MapRules* validate_FieldRules_map(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_MapRules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 19, NULL); }
validate_FieldRules_has_any(const validate_FieldRules * msg)181 UPB_INLINE bool validate_FieldRules_has_any(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 20; }
validate_FieldRules_any(const validate_FieldRules * msg)182 UPB_INLINE const validate_AnyRules* validate_FieldRules_any(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_AnyRules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 20, NULL); }
validate_FieldRules_has_duration(const validate_FieldRules * msg)183 UPB_INLINE bool validate_FieldRules_has_duration(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 21; }
validate_FieldRules_duration(const validate_FieldRules * msg)184 UPB_INLINE const validate_DurationRules* validate_FieldRules_duration(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_DurationRules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 21, NULL); }
validate_FieldRules_has_timestamp(const validate_FieldRules * msg)185 UPB_INLINE bool validate_FieldRules_has_timestamp(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 22; }
validate_FieldRules_timestamp(const validate_FieldRules * msg)186 UPB_INLINE const validate_TimestampRules* validate_FieldRules_timestamp(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_TimestampRules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 22, NULL); }
187
validate_FieldRules_set_float(validate_FieldRules * msg,validate_FloatRules * value)188 UPB_INLINE void validate_FieldRules_set_float(validate_FieldRules *msg, validate_FloatRules* value) {
189 UPB_WRITE_ONEOF(msg, validate_FloatRules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 1);
190 }
validate_FieldRules_mutable_float(validate_FieldRules * msg,upb_arena * arena)191 UPB_INLINE struct validate_FloatRules* validate_FieldRules_mutable_float(validate_FieldRules *msg, upb_arena *arena) {
192 struct validate_FloatRules* sub = (struct validate_FloatRules*)validate_FieldRules_float(msg);
193 if (sub == NULL) {
194 sub = (struct validate_FloatRules*)_upb_msg_new(&validate_FloatRules_msginit, arena);
195 if (!sub) return NULL;
196 validate_FieldRules_set_float(msg, sub);
197 }
198 return sub;
199 }
validate_FieldRules_set_double(validate_FieldRules * msg,validate_DoubleRules * value)200 UPB_INLINE void validate_FieldRules_set_double(validate_FieldRules *msg, validate_DoubleRules* value) {
201 UPB_WRITE_ONEOF(msg, validate_DoubleRules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2);
202 }
validate_FieldRules_mutable_double(validate_FieldRules * msg,upb_arena * arena)203 UPB_INLINE struct validate_DoubleRules* validate_FieldRules_mutable_double(validate_FieldRules *msg, upb_arena *arena) {
204 struct validate_DoubleRules* sub = (struct validate_DoubleRules*)validate_FieldRules_double(msg);
205 if (sub == NULL) {
206 sub = (struct validate_DoubleRules*)_upb_msg_new(&validate_DoubleRules_msginit, arena);
207 if (!sub) return NULL;
208 validate_FieldRules_set_double(msg, sub);
209 }
210 return sub;
211 }
validate_FieldRules_set_int32(validate_FieldRules * msg,validate_Int32Rules * value)212 UPB_INLINE void validate_FieldRules_set_int32(validate_FieldRules *msg, validate_Int32Rules* value) {
213 UPB_WRITE_ONEOF(msg, validate_Int32Rules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 3);
214 }
validate_FieldRules_mutable_int32(validate_FieldRules * msg,upb_arena * arena)215 UPB_INLINE struct validate_Int32Rules* validate_FieldRules_mutable_int32(validate_FieldRules *msg, upb_arena *arena) {
216 struct validate_Int32Rules* sub = (struct validate_Int32Rules*)validate_FieldRules_int32(msg);
217 if (sub == NULL) {
218 sub = (struct validate_Int32Rules*)_upb_msg_new(&validate_Int32Rules_msginit, arena);
219 if (!sub) return NULL;
220 validate_FieldRules_set_int32(msg, sub);
221 }
222 return sub;
223 }
validate_FieldRules_set_int64(validate_FieldRules * msg,validate_Int64Rules * value)224 UPB_INLINE void validate_FieldRules_set_int64(validate_FieldRules *msg, validate_Int64Rules* value) {
225 UPB_WRITE_ONEOF(msg, validate_Int64Rules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 4);
226 }
validate_FieldRules_mutable_int64(validate_FieldRules * msg,upb_arena * arena)227 UPB_INLINE struct validate_Int64Rules* validate_FieldRules_mutable_int64(validate_FieldRules *msg, upb_arena *arena) {
228 struct validate_Int64Rules* sub = (struct validate_Int64Rules*)validate_FieldRules_int64(msg);
229 if (sub == NULL) {
230 sub = (struct validate_Int64Rules*)_upb_msg_new(&validate_Int64Rules_msginit, arena);
231 if (!sub) return NULL;
232 validate_FieldRules_set_int64(msg, sub);
233 }
234 return sub;
235 }
validate_FieldRules_set_uint32(validate_FieldRules * msg,validate_UInt32Rules * value)236 UPB_INLINE void validate_FieldRules_set_uint32(validate_FieldRules *msg, validate_UInt32Rules* value) {
237 UPB_WRITE_ONEOF(msg, validate_UInt32Rules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 5);
238 }
validate_FieldRules_mutable_uint32(validate_FieldRules * msg,upb_arena * arena)239 UPB_INLINE struct validate_UInt32Rules* validate_FieldRules_mutable_uint32(validate_FieldRules *msg, upb_arena *arena) {
240 struct validate_UInt32Rules* sub = (struct validate_UInt32Rules*)validate_FieldRules_uint32(msg);
241 if (sub == NULL) {
242 sub = (struct validate_UInt32Rules*)_upb_msg_new(&validate_UInt32Rules_msginit, arena);
243 if (!sub) return NULL;
244 validate_FieldRules_set_uint32(msg, sub);
245 }
246 return sub;
247 }
validate_FieldRules_set_uint64(validate_FieldRules * msg,validate_UInt64Rules * value)248 UPB_INLINE void validate_FieldRules_set_uint64(validate_FieldRules *msg, validate_UInt64Rules* value) {
249 UPB_WRITE_ONEOF(msg, validate_UInt64Rules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 6);
250 }
validate_FieldRules_mutable_uint64(validate_FieldRules * msg,upb_arena * arena)251 UPB_INLINE struct validate_UInt64Rules* validate_FieldRules_mutable_uint64(validate_FieldRules *msg, upb_arena *arena) {
252 struct validate_UInt64Rules* sub = (struct validate_UInt64Rules*)validate_FieldRules_uint64(msg);
253 if (sub == NULL) {
254 sub = (struct validate_UInt64Rules*)_upb_msg_new(&validate_UInt64Rules_msginit, arena);
255 if (!sub) return NULL;
256 validate_FieldRules_set_uint64(msg, sub);
257 }
258 return sub;
259 }
validate_FieldRules_set_sint32(validate_FieldRules * msg,validate_SInt32Rules * value)260 UPB_INLINE void validate_FieldRules_set_sint32(validate_FieldRules *msg, validate_SInt32Rules* value) {
261 UPB_WRITE_ONEOF(msg, validate_SInt32Rules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 7);
262 }
validate_FieldRules_mutable_sint32(validate_FieldRules * msg,upb_arena * arena)263 UPB_INLINE struct validate_SInt32Rules* validate_FieldRules_mutable_sint32(validate_FieldRules *msg, upb_arena *arena) {
264 struct validate_SInt32Rules* sub = (struct validate_SInt32Rules*)validate_FieldRules_sint32(msg);
265 if (sub == NULL) {
266 sub = (struct validate_SInt32Rules*)_upb_msg_new(&validate_SInt32Rules_msginit, arena);
267 if (!sub) return NULL;
268 validate_FieldRules_set_sint32(msg, sub);
269 }
270 return sub;
271 }
validate_FieldRules_set_sint64(validate_FieldRules * msg,validate_SInt64Rules * value)272 UPB_INLINE void validate_FieldRules_set_sint64(validate_FieldRules *msg, validate_SInt64Rules* value) {
273 UPB_WRITE_ONEOF(msg, validate_SInt64Rules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 8);
274 }
validate_FieldRules_mutable_sint64(validate_FieldRules * msg,upb_arena * arena)275 UPB_INLINE struct validate_SInt64Rules* validate_FieldRules_mutable_sint64(validate_FieldRules *msg, upb_arena *arena) {
276 struct validate_SInt64Rules* sub = (struct validate_SInt64Rules*)validate_FieldRules_sint64(msg);
277 if (sub == NULL) {
278 sub = (struct validate_SInt64Rules*)_upb_msg_new(&validate_SInt64Rules_msginit, arena);
279 if (!sub) return NULL;
280 validate_FieldRules_set_sint64(msg, sub);
281 }
282 return sub;
283 }
validate_FieldRules_set_fixed32(validate_FieldRules * msg,validate_Fixed32Rules * value)284 UPB_INLINE void validate_FieldRules_set_fixed32(validate_FieldRules *msg, validate_Fixed32Rules* value) {
285 UPB_WRITE_ONEOF(msg, validate_Fixed32Rules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 9);
286 }
validate_FieldRules_mutable_fixed32(validate_FieldRules * msg,upb_arena * arena)287 UPB_INLINE struct validate_Fixed32Rules* validate_FieldRules_mutable_fixed32(validate_FieldRules *msg, upb_arena *arena) {
288 struct validate_Fixed32Rules* sub = (struct validate_Fixed32Rules*)validate_FieldRules_fixed32(msg);
289 if (sub == NULL) {
290 sub = (struct validate_Fixed32Rules*)_upb_msg_new(&validate_Fixed32Rules_msginit, arena);
291 if (!sub) return NULL;
292 validate_FieldRules_set_fixed32(msg, sub);
293 }
294 return sub;
295 }
validate_FieldRules_set_fixed64(validate_FieldRules * msg,validate_Fixed64Rules * value)296 UPB_INLINE void validate_FieldRules_set_fixed64(validate_FieldRules *msg, validate_Fixed64Rules* value) {
297 UPB_WRITE_ONEOF(msg, validate_Fixed64Rules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 10);
298 }
validate_FieldRules_mutable_fixed64(validate_FieldRules * msg,upb_arena * arena)299 UPB_INLINE struct validate_Fixed64Rules* validate_FieldRules_mutable_fixed64(validate_FieldRules *msg, upb_arena *arena) {
300 struct validate_Fixed64Rules* sub = (struct validate_Fixed64Rules*)validate_FieldRules_fixed64(msg);
301 if (sub == NULL) {
302 sub = (struct validate_Fixed64Rules*)_upb_msg_new(&validate_Fixed64Rules_msginit, arena);
303 if (!sub) return NULL;
304 validate_FieldRules_set_fixed64(msg, sub);
305 }
306 return sub;
307 }
validate_FieldRules_set_sfixed32(validate_FieldRules * msg,validate_SFixed32Rules * value)308 UPB_INLINE void validate_FieldRules_set_sfixed32(validate_FieldRules *msg, validate_SFixed32Rules* value) {
309 UPB_WRITE_ONEOF(msg, validate_SFixed32Rules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 11);
310 }
validate_FieldRules_mutable_sfixed32(validate_FieldRules * msg,upb_arena * arena)311 UPB_INLINE struct validate_SFixed32Rules* validate_FieldRules_mutable_sfixed32(validate_FieldRules *msg, upb_arena *arena) {
312 struct validate_SFixed32Rules* sub = (struct validate_SFixed32Rules*)validate_FieldRules_sfixed32(msg);
313 if (sub == NULL) {
314 sub = (struct validate_SFixed32Rules*)_upb_msg_new(&validate_SFixed32Rules_msginit, arena);
315 if (!sub) return NULL;
316 validate_FieldRules_set_sfixed32(msg, sub);
317 }
318 return sub;
319 }
validate_FieldRules_set_sfixed64(validate_FieldRules * msg,validate_SFixed64Rules * value)320 UPB_INLINE void validate_FieldRules_set_sfixed64(validate_FieldRules *msg, validate_SFixed64Rules* value) {
321 UPB_WRITE_ONEOF(msg, validate_SFixed64Rules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 12);
322 }
validate_FieldRules_mutable_sfixed64(validate_FieldRules * msg,upb_arena * arena)323 UPB_INLINE struct validate_SFixed64Rules* validate_FieldRules_mutable_sfixed64(validate_FieldRules *msg, upb_arena *arena) {
324 struct validate_SFixed64Rules* sub = (struct validate_SFixed64Rules*)validate_FieldRules_sfixed64(msg);
325 if (sub == NULL) {
326 sub = (struct validate_SFixed64Rules*)_upb_msg_new(&validate_SFixed64Rules_msginit, arena);
327 if (!sub) return NULL;
328 validate_FieldRules_set_sfixed64(msg, sub);
329 }
330 return sub;
331 }
validate_FieldRules_set_bool(validate_FieldRules * msg,validate_BoolRules * value)332 UPB_INLINE void validate_FieldRules_set_bool(validate_FieldRules *msg, validate_BoolRules* value) {
333 UPB_WRITE_ONEOF(msg, validate_BoolRules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 13);
334 }
validate_FieldRules_mutable_bool(validate_FieldRules * msg,upb_arena * arena)335 UPB_INLINE struct validate_BoolRules* validate_FieldRules_mutable_bool(validate_FieldRules *msg, upb_arena *arena) {
336 struct validate_BoolRules* sub = (struct validate_BoolRules*)validate_FieldRules_bool(msg);
337 if (sub == NULL) {
338 sub = (struct validate_BoolRules*)_upb_msg_new(&validate_BoolRules_msginit, arena);
339 if (!sub) return NULL;
340 validate_FieldRules_set_bool(msg, sub);
341 }
342 return sub;
343 }
validate_FieldRules_set_string(validate_FieldRules * msg,validate_StringRules * value)344 UPB_INLINE void validate_FieldRules_set_string(validate_FieldRules *msg, validate_StringRules* value) {
345 UPB_WRITE_ONEOF(msg, validate_StringRules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 14);
346 }
validate_FieldRules_mutable_string(validate_FieldRules * msg,upb_arena * arena)347 UPB_INLINE struct validate_StringRules* validate_FieldRules_mutable_string(validate_FieldRules *msg, upb_arena *arena) {
348 struct validate_StringRules* sub = (struct validate_StringRules*)validate_FieldRules_string(msg);
349 if (sub == NULL) {
350 sub = (struct validate_StringRules*)_upb_msg_new(&validate_StringRules_msginit, arena);
351 if (!sub) return NULL;
352 validate_FieldRules_set_string(msg, sub);
353 }
354 return sub;
355 }
validate_FieldRules_set_bytes(validate_FieldRules * msg,validate_BytesRules * value)356 UPB_INLINE void validate_FieldRules_set_bytes(validate_FieldRules *msg, validate_BytesRules* value) {
357 UPB_WRITE_ONEOF(msg, validate_BytesRules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 15);
358 }
validate_FieldRules_mutable_bytes(validate_FieldRules * msg,upb_arena * arena)359 UPB_INLINE struct validate_BytesRules* validate_FieldRules_mutable_bytes(validate_FieldRules *msg, upb_arena *arena) {
360 struct validate_BytesRules* sub = (struct validate_BytesRules*)validate_FieldRules_bytes(msg);
361 if (sub == NULL) {
362 sub = (struct validate_BytesRules*)_upb_msg_new(&validate_BytesRules_msginit, arena);
363 if (!sub) return NULL;
364 validate_FieldRules_set_bytes(msg, sub);
365 }
366 return sub;
367 }
validate_FieldRules_set_enum(validate_FieldRules * msg,validate_EnumRules * value)368 UPB_INLINE void validate_FieldRules_set_enum(validate_FieldRules *msg, validate_EnumRules* value) {
369 UPB_WRITE_ONEOF(msg, validate_EnumRules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 16);
370 }
validate_FieldRules_mutable_enum(validate_FieldRules * msg,upb_arena * arena)371 UPB_INLINE struct validate_EnumRules* validate_FieldRules_mutable_enum(validate_FieldRules *msg, upb_arena *arena) {
372 struct validate_EnumRules* sub = (struct validate_EnumRules*)validate_FieldRules_enum(msg);
373 if (sub == NULL) {
374 sub = (struct validate_EnumRules*)_upb_msg_new(&validate_EnumRules_msginit, arena);
375 if (!sub) return NULL;
376 validate_FieldRules_set_enum(msg, sub);
377 }
378 return sub;
379 }
validate_FieldRules_set_message(validate_FieldRules * msg,validate_MessageRules * value)380 UPB_INLINE void validate_FieldRules_set_message(validate_FieldRules *msg, validate_MessageRules* value) {
381 _upb_sethas(msg, 1);
382 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), validate_MessageRules*) = value;
383 }
validate_FieldRules_mutable_message(validate_FieldRules * msg,upb_arena * arena)384 UPB_INLINE struct validate_MessageRules* validate_FieldRules_mutable_message(validate_FieldRules *msg, upb_arena *arena) {
385 struct validate_MessageRules* sub = (struct validate_MessageRules*)validate_FieldRules_message(msg);
386 if (sub == NULL) {
387 sub = (struct validate_MessageRules*)_upb_msg_new(&validate_MessageRules_msginit, arena);
388 if (!sub) return NULL;
389 validate_FieldRules_set_message(msg, sub);
390 }
391 return sub;
392 }
validate_FieldRules_set_repeated(validate_FieldRules * msg,validate_RepeatedRules * value)393 UPB_INLINE void validate_FieldRules_set_repeated(validate_FieldRules *msg, validate_RepeatedRules* value) {
394 UPB_WRITE_ONEOF(msg, validate_RepeatedRules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 18);
395 }
validate_FieldRules_mutable_repeated(validate_FieldRules * msg,upb_arena * arena)396 UPB_INLINE struct validate_RepeatedRules* validate_FieldRules_mutable_repeated(validate_FieldRules *msg, upb_arena *arena) {
397 struct validate_RepeatedRules* sub = (struct validate_RepeatedRules*)validate_FieldRules_repeated(msg);
398 if (sub == NULL) {
399 sub = (struct validate_RepeatedRules*)_upb_msg_new(&validate_RepeatedRules_msginit, arena);
400 if (!sub) return NULL;
401 validate_FieldRules_set_repeated(msg, sub);
402 }
403 return sub;
404 }
validate_FieldRules_set_map(validate_FieldRules * msg,validate_MapRules * value)405 UPB_INLINE void validate_FieldRules_set_map(validate_FieldRules *msg, validate_MapRules* value) {
406 UPB_WRITE_ONEOF(msg, validate_MapRules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 19);
407 }
validate_FieldRules_mutable_map(validate_FieldRules * msg,upb_arena * arena)408 UPB_INLINE struct validate_MapRules* validate_FieldRules_mutable_map(validate_FieldRules *msg, upb_arena *arena) {
409 struct validate_MapRules* sub = (struct validate_MapRules*)validate_FieldRules_map(msg);
410 if (sub == NULL) {
411 sub = (struct validate_MapRules*)_upb_msg_new(&validate_MapRules_msginit, arena);
412 if (!sub) return NULL;
413 validate_FieldRules_set_map(msg, sub);
414 }
415 return sub;
416 }
validate_FieldRules_set_any(validate_FieldRules * msg,validate_AnyRules * value)417 UPB_INLINE void validate_FieldRules_set_any(validate_FieldRules *msg, validate_AnyRules* value) {
418 UPB_WRITE_ONEOF(msg, validate_AnyRules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 20);
419 }
validate_FieldRules_mutable_any(validate_FieldRules * msg,upb_arena * arena)420 UPB_INLINE struct validate_AnyRules* validate_FieldRules_mutable_any(validate_FieldRules *msg, upb_arena *arena) {
421 struct validate_AnyRules* sub = (struct validate_AnyRules*)validate_FieldRules_any(msg);
422 if (sub == NULL) {
423 sub = (struct validate_AnyRules*)_upb_msg_new(&validate_AnyRules_msginit, arena);
424 if (!sub) return NULL;
425 validate_FieldRules_set_any(msg, sub);
426 }
427 return sub;
428 }
validate_FieldRules_set_duration(validate_FieldRules * msg,validate_DurationRules * value)429 UPB_INLINE void validate_FieldRules_set_duration(validate_FieldRules *msg, validate_DurationRules* value) {
430 UPB_WRITE_ONEOF(msg, validate_DurationRules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 21);
431 }
validate_FieldRules_mutable_duration(validate_FieldRules * msg,upb_arena * arena)432 UPB_INLINE struct validate_DurationRules* validate_FieldRules_mutable_duration(validate_FieldRules *msg, upb_arena *arena) {
433 struct validate_DurationRules* sub = (struct validate_DurationRules*)validate_FieldRules_duration(msg);
434 if (sub == NULL) {
435 sub = (struct validate_DurationRules*)_upb_msg_new(&validate_DurationRules_msginit, arena);
436 if (!sub) return NULL;
437 validate_FieldRules_set_duration(msg, sub);
438 }
439 return sub;
440 }
validate_FieldRules_set_timestamp(validate_FieldRules * msg,validate_TimestampRules * value)441 UPB_INLINE void validate_FieldRules_set_timestamp(validate_FieldRules *msg, validate_TimestampRules* value) {
442 UPB_WRITE_ONEOF(msg, validate_TimestampRules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 22);
443 }
validate_FieldRules_mutable_timestamp(validate_FieldRules * msg,upb_arena * arena)444 UPB_INLINE struct validate_TimestampRules* validate_FieldRules_mutable_timestamp(validate_FieldRules *msg, upb_arena *arena) {
445 struct validate_TimestampRules* sub = (struct validate_TimestampRules*)validate_FieldRules_timestamp(msg);
446 if (sub == NULL) {
447 sub = (struct validate_TimestampRules*)_upb_msg_new(&validate_TimestampRules_msginit, arena);
448 if (!sub) return NULL;
449 validate_FieldRules_set_timestamp(msg, sub);
450 }
451 return sub;
452 }
453
454 /* validate.FloatRules */
455
validate_FloatRules_new(upb_arena * arena)456 UPB_INLINE validate_FloatRules *validate_FloatRules_new(upb_arena *arena) {
457 return (validate_FloatRules *)_upb_msg_new(&validate_FloatRules_msginit, arena);
458 }
validate_FloatRules_parse(const char * buf,size_t size,upb_arena * arena)459 UPB_INLINE validate_FloatRules *validate_FloatRules_parse(const char *buf, size_t size,
460 upb_arena *arena) {
461 validate_FloatRules *ret = validate_FloatRules_new(arena);
462 return (ret && upb_decode(buf, size, ret, &validate_FloatRules_msginit, arena)) ? ret : NULL;
463 }
validate_FloatRules_serialize(const validate_FloatRules * msg,upb_arena * arena,size_t * len)464 UPB_INLINE char *validate_FloatRules_serialize(const validate_FloatRules *msg, upb_arena *arena, size_t *len) {
465 return upb_encode(msg, &validate_FloatRules_msginit, arena, len);
466 }
467
validate_FloatRules_has_const(const validate_FloatRules * msg)468 UPB_INLINE bool validate_FloatRules_has_const(const validate_FloatRules *msg) { return _upb_hasbit(msg, 1); }
validate_FloatRules_const(const validate_FloatRules * msg)469 UPB_INLINE float validate_FloatRules_const(const validate_FloatRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), float); }
validate_FloatRules_has_lt(const validate_FloatRules * msg)470 UPB_INLINE bool validate_FloatRules_has_lt(const validate_FloatRules *msg) { return _upb_hasbit(msg, 2); }
validate_FloatRules_lt(const validate_FloatRules * msg)471 UPB_INLINE float validate_FloatRules_lt(const validate_FloatRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), float); }
validate_FloatRules_has_lte(const validate_FloatRules * msg)472 UPB_INLINE bool validate_FloatRules_has_lte(const validate_FloatRules *msg) { return _upb_hasbit(msg, 3); }
validate_FloatRules_lte(const validate_FloatRules * msg)473 UPB_INLINE float validate_FloatRules_lte(const validate_FloatRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), float); }
validate_FloatRules_has_gt(const validate_FloatRules * msg)474 UPB_INLINE bool validate_FloatRules_has_gt(const validate_FloatRules *msg) { return _upb_hasbit(msg, 4); }
validate_FloatRules_gt(const validate_FloatRules * msg)475 UPB_INLINE float validate_FloatRules_gt(const validate_FloatRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), float); }
validate_FloatRules_has_gte(const validate_FloatRules * msg)476 UPB_INLINE bool validate_FloatRules_has_gte(const validate_FloatRules *msg) { return _upb_hasbit(msg, 5); }
validate_FloatRules_gte(const validate_FloatRules * msg)477 UPB_INLINE float validate_FloatRules_gte(const validate_FloatRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), float); }
validate_FloatRules_in(const validate_FloatRules * msg,size_t * len)478 UPB_INLINE float const* validate_FloatRules_in(const validate_FloatRules *msg, size_t *len) { return (float const*)_upb_array_accessor(msg, UPB_SIZE(24, 24), len); }
validate_FloatRules_not_in(const validate_FloatRules * msg,size_t * len)479 UPB_INLINE float const* validate_FloatRules_not_in(const validate_FloatRules *msg, size_t *len) { return (float const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); }
480
validate_FloatRules_set_const(validate_FloatRules * msg,float value)481 UPB_INLINE void validate_FloatRules_set_const(validate_FloatRules *msg, float value) {
482 _upb_sethas(msg, 1);
483 *UPB_PTR_AT(msg, UPB_SIZE(4, 4), float) = value;
484 }
validate_FloatRules_set_lt(validate_FloatRules * msg,float value)485 UPB_INLINE void validate_FloatRules_set_lt(validate_FloatRules *msg, float value) {
486 _upb_sethas(msg, 2);
487 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), float) = value;
488 }
validate_FloatRules_set_lte(validate_FloatRules * msg,float value)489 UPB_INLINE void validate_FloatRules_set_lte(validate_FloatRules *msg, float value) {
490 _upb_sethas(msg, 3);
491 *UPB_PTR_AT(msg, UPB_SIZE(12, 12), float) = value;
492 }
validate_FloatRules_set_gt(validate_FloatRules * msg,float value)493 UPB_INLINE void validate_FloatRules_set_gt(validate_FloatRules *msg, float value) {
494 _upb_sethas(msg, 4);
495 *UPB_PTR_AT(msg, UPB_SIZE(16, 16), float) = value;
496 }
validate_FloatRules_set_gte(validate_FloatRules * msg,float value)497 UPB_INLINE void validate_FloatRules_set_gte(validate_FloatRules *msg, float value) {
498 _upb_sethas(msg, 5);
499 *UPB_PTR_AT(msg, UPB_SIZE(20, 20), float) = value;
500 }
validate_FloatRules_mutable_in(validate_FloatRules * msg,size_t * len)501 UPB_INLINE float* validate_FloatRules_mutable_in(validate_FloatRules *msg, size_t *len) {
502 return (float*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len);
503 }
validate_FloatRules_resize_in(validate_FloatRules * msg,size_t len,upb_arena * arena)504 UPB_INLINE float* validate_FloatRules_resize_in(validate_FloatRules *msg, size_t len, upb_arena *arena) {
505 return (float*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_TYPE_FLOAT, arena);
506 }
validate_FloatRules_add_in(validate_FloatRules * msg,float val,upb_arena * arena)507 UPB_INLINE bool validate_FloatRules_add_in(validate_FloatRules *msg, float val, upb_arena *arena) {
508 return _upb_array_append_accessor(msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_FLOAT, &val,
509 arena);
510 }
validate_FloatRules_mutable_not_in(validate_FloatRules * msg,size_t * len)511 UPB_INLINE float* validate_FloatRules_mutable_not_in(validate_FloatRules *msg, size_t *len) {
512 return (float*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len);
513 }
validate_FloatRules_resize_not_in(validate_FloatRules * msg,size_t len,upb_arena * arena)514 UPB_INLINE float* validate_FloatRules_resize_not_in(validate_FloatRules *msg, size_t len, upb_arena *arena) {
515 return (float*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_TYPE_FLOAT, arena);
516 }
validate_FloatRules_add_not_in(validate_FloatRules * msg,float val,upb_arena * arena)517 UPB_INLINE bool validate_FloatRules_add_not_in(validate_FloatRules *msg, float val, upb_arena *arena) {
518 return _upb_array_append_accessor(msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_FLOAT, &val,
519 arena);
520 }
521
522 /* validate.DoubleRules */
523
validate_DoubleRules_new(upb_arena * arena)524 UPB_INLINE validate_DoubleRules *validate_DoubleRules_new(upb_arena *arena) {
525 return (validate_DoubleRules *)_upb_msg_new(&validate_DoubleRules_msginit, arena);
526 }
validate_DoubleRules_parse(const char * buf,size_t size,upb_arena * arena)527 UPB_INLINE validate_DoubleRules *validate_DoubleRules_parse(const char *buf, size_t size,
528 upb_arena *arena) {
529 validate_DoubleRules *ret = validate_DoubleRules_new(arena);
530 return (ret && upb_decode(buf, size, ret, &validate_DoubleRules_msginit, arena)) ? ret : NULL;
531 }
validate_DoubleRules_serialize(const validate_DoubleRules * msg,upb_arena * arena,size_t * len)532 UPB_INLINE char *validate_DoubleRules_serialize(const validate_DoubleRules *msg, upb_arena *arena, size_t *len) {
533 return upb_encode(msg, &validate_DoubleRules_msginit, arena, len);
534 }
535
validate_DoubleRules_has_const(const validate_DoubleRules * msg)536 UPB_INLINE bool validate_DoubleRules_has_const(const validate_DoubleRules *msg) { return _upb_hasbit(msg, 1); }
validate_DoubleRules_const(const validate_DoubleRules * msg)537 UPB_INLINE double validate_DoubleRules_const(const validate_DoubleRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), double); }
validate_DoubleRules_has_lt(const validate_DoubleRules * msg)538 UPB_INLINE bool validate_DoubleRules_has_lt(const validate_DoubleRules *msg) { return _upb_hasbit(msg, 2); }
validate_DoubleRules_lt(const validate_DoubleRules * msg)539 UPB_INLINE double validate_DoubleRules_lt(const validate_DoubleRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), double); }
validate_DoubleRules_has_lte(const validate_DoubleRules * msg)540 UPB_INLINE bool validate_DoubleRules_has_lte(const validate_DoubleRules *msg) { return _upb_hasbit(msg, 3); }
validate_DoubleRules_lte(const validate_DoubleRules * msg)541 UPB_INLINE double validate_DoubleRules_lte(const validate_DoubleRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), double); }
validate_DoubleRules_has_gt(const validate_DoubleRules * msg)542 UPB_INLINE bool validate_DoubleRules_has_gt(const validate_DoubleRules *msg) { return _upb_hasbit(msg, 4); }
validate_DoubleRules_gt(const validate_DoubleRules * msg)543 UPB_INLINE double validate_DoubleRules_gt(const validate_DoubleRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), double); }
validate_DoubleRules_has_gte(const validate_DoubleRules * msg)544 UPB_INLINE bool validate_DoubleRules_has_gte(const validate_DoubleRules *msg) { return _upb_hasbit(msg, 5); }
validate_DoubleRules_gte(const validate_DoubleRules * msg)545 UPB_INLINE double validate_DoubleRules_gte(const validate_DoubleRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 40), double); }
validate_DoubleRules_in(const validate_DoubleRules * msg,size_t * len)546 UPB_INLINE double const* validate_DoubleRules_in(const validate_DoubleRules *msg, size_t *len) { return (double const*)_upb_array_accessor(msg, UPB_SIZE(48, 48), len); }
validate_DoubleRules_not_in(const validate_DoubleRules * msg,size_t * len)547 UPB_INLINE double const* validate_DoubleRules_not_in(const validate_DoubleRules *msg, size_t *len) { return (double const*)_upb_array_accessor(msg, UPB_SIZE(52, 56), len); }
548
validate_DoubleRules_set_const(validate_DoubleRules * msg,double value)549 UPB_INLINE void validate_DoubleRules_set_const(validate_DoubleRules *msg, double value) {
550 _upb_sethas(msg, 1);
551 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), double) = value;
552 }
validate_DoubleRules_set_lt(validate_DoubleRules * msg,double value)553 UPB_INLINE void validate_DoubleRules_set_lt(validate_DoubleRules *msg, double value) {
554 _upb_sethas(msg, 2);
555 *UPB_PTR_AT(msg, UPB_SIZE(16, 16), double) = value;
556 }
validate_DoubleRules_set_lte(validate_DoubleRules * msg,double value)557 UPB_INLINE void validate_DoubleRules_set_lte(validate_DoubleRules *msg, double value) {
558 _upb_sethas(msg, 3);
559 *UPB_PTR_AT(msg, UPB_SIZE(24, 24), double) = value;
560 }
validate_DoubleRules_set_gt(validate_DoubleRules * msg,double value)561 UPB_INLINE void validate_DoubleRules_set_gt(validate_DoubleRules *msg, double value) {
562 _upb_sethas(msg, 4);
563 *UPB_PTR_AT(msg, UPB_SIZE(32, 32), double) = value;
564 }
validate_DoubleRules_set_gte(validate_DoubleRules * msg,double value)565 UPB_INLINE void validate_DoubleRules_set_gte(validate_DoubleRules *msg, double value) {
566 _upb_sethas(msg, 5);
567 *UPB_PTR_AT(msg, UPB_SIZE(40, 40), double) = value;
568 }
validate_DoubleRules_mutable_in(validate_DoubleRules * msg,size_t * len)569 UPB_INLINE double* validate_DoubleRules_mutable_in(validate_DoubleRules *msg, size_t *len) {
570 return (double*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len);
571 }
validate_DoubleRules_resize_in(validate_DoubleRules * msg,size_t len,upb_arena * arena)572 UPB_INLINE double* validate_DoubleRules_resize_in(validate_DoubleRules *msg, size_t len, upb_arena *arena) {
573 return (double*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_TYPE_DOUBLE, arena);
574 }
validate_DoubleRules_add_in(validate_DoubleRules * msg,double val,upb_arena * arena)575 UPB_INLINE bool validate_DoubleRules_add_in(validate_DoubleRules *msg, double val, upb_arena *arena) {
576 return _upb_array_append_accessor(msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_DOUBLE, &val,
577 arena);
578 }
validate_DoubleRules_mutable_not_in(validate_DoubleRules * msg,size_t * len)579 UPB_INLINE double* validate_DoubleRules_mutable_not_in(validate_DoubleRules *msg, size_t *len) {
580 return (double*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 56), len);
581 }
validate_DoubleRules_resize_not_in(validate_DoubleRules * msg,size_t len,upb_arena * arena)582 UPB_INLINE double* validate_DoubleRules_resize_not_in(validate_DoubleRules *msg, size_t len, upb_arena *arena) {
583 return (double*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_TYPE_DOUBLE, arena);
584 }
validate_DoubleRules_add_not_in(validate_DoubleRules * msg,double val,upb_arena * arena)585 UPB_INLINE bool validate_DoubleRules_add_not_in(validate_DoubleRules *msg, double val, upb_arena *arena) {
586 return _upb_array_append_accessor(msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_DOUBLE, &val,
587 arena);
588 }
589
590 /* validate.Int32Rules */
591
validate_Int32Rules_new(upb_arena * arena)592 UPB_INLINE validate_Int32Rules *validate_Int32Rules_new(upb_arena *arena) {
593 return (validate_Int32Rules *)_upb_msg_new(&validate_Int32Rules_msginit, arena);
594 }
validate_Int32Rules_parse(const char * buf,size_t size,upb_arena * arena)595 UPB_INLINE validate_Int32Rules *validate_Int32Rules_parse(const char *buf, size_t size,
596 upb_arena *arena) {
597 validate_Int32Rules *ret = validate_Int32Rules_new(arena);
598 return (ret && upb_decode(buf, size, ret, &validate_Int32Rules_msginit, arena)) ? ret : NULL;
599 }
validate_Int32Rules_serialize(const validate_Int32Rules * msg,upb_arena * arena,size_t * len)600 UPB_INLINE char *validate_Int32Rules_serialize(const validate_Int32Rules *msg, upb_arena *arena, size_t *len) {
601 return upb_encode(msg, &validate_Int32Rules_msginit, arena, len);
602 }
603
validate_Int32Rules_has_const(const validate_Int32Rules * msg)604 UPB_INLINE bool validate_Int32Rules_has_const(const validate_Int32Rules *msg) { return _upb_hasbit(msg, 1); }
validate_Int32Rules_const(const validate_Int32Rules * msg)605 UPB_INLINE int32_t validate_Int32Rules_const(const validate_Int32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
validate_Int32Rules_has_lt(const validate_Int32Rules * msg)606 UPB_INLINE bool validate_Int32Rules_has_lt(const validate_Int32Rules *msg) { return _upb_hasbit(msg, 2); }
validate_Int32Rules_lt(const validate_Int32Rules * msg)607 UPB_INLINE int32_t validate_Int32Rules_lt(const validate_Int32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); }
validate_Int32Rules_has_lte(const validate_Int32Rules * msg)608 UPB_INLINE bool validate_Int32Rules_has_lte(const validate_Int32Rules *msg) { return _upb_hasbit(msg, 3); }
validate_Int32Rules_lte(const validate_Int32Rules * msg)609 UPB_INLINE int32_t validate_Int32Rules_lte(const validate_Int32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t); }
validate_Int32Rules_has_gt(const validate_Int32Rules * msg)610 UPB_INLINE bool validate_Int32Rules_has_gt(const validate_Int32Rules *msg) { return _upb_hasbit(msg, 4); }
validate_Int32Rules_gt(const validate_Int32Rules * msg)611 UPB_INLINE int32_t validate_Int32Rules_gt(const validate_Int32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); }
validate_Int32Rules_has_gte(const validate_Int32Rules * msg)612 UPB_INLINE bool validate_Int32Rules_has_gte(const validate_Int32Rules *msg) { return _upb_hasbit(msg, 5); }
validate_Int32Rules_gte(const validate_Int32Rules * msg)613 UPB_INLINE int32_t validate_Int32Rules_gte(const validate_Int32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), int32_t); }
validate_Int32Rules_in(const validate_Int32Rules * msg,size_t * len)614 UPB_INLINE int32_t const* validate_Int32Rules_in(const validate_Int32Rules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(24, 24), len); }
validate_Int32Rules_not_in(const validate_Int32Rules * msg,size_t * len)615 UPB_INLINE int32_t const* validate_Int32Rules_not_in(const validate_Int32Rules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); }
616
validate_Int32Rules_set_const(validate_Int32Rules * msg,int32_t value)617 UPB_INLINE void validate_Int32Rules_set_const(validate_Int32Rules *msg, int32_t value) {
618 _upb_sethas(msg, 1);
619 *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
620 }
validate_Int32Rules_set_lt(validate_Int32Rules * msg,int32_t value)621 UPB_INLINE void validate_Int32Rules_set_lt(validate_Int32Rules *msg, int32_t value) {
622 _upb_sethas(msg, 2);
623 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
624 }
validate_Int32Rules_set_lte(validate_Int32Rules * msg,int32_t value)625 UPB_INLINE void validate_Int32Rules_set_lte(validate_Int32Rules *msg, int32_t value) {
626 _upb_sethas(msg, 3);
627 *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t) = value;
628 }
validate_Int32Rules_set_gt(validate_Int32Rules * msg,int32_t value)629 UPB_INLINE void validate_Int32Rules_set_gt(validate_Int32Rules *msg, int32_t value) {
630 _upb_sethas(msg, 4);
631 *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t) = value;
632 }
validate_Int32Rules_set_gte(validate_Int32Rules * msg,int32_t value)633 UPB_INLINE void validate_Int32Rules_set_gte(validate_Int32Rules *msg, int32_t value) {
634 _upb_sethas(msg, 5);
635 *UPB_PTR_AT(msg, UPB_SIZE(20, 20), int32_t) = value;
636 }
validate_Int32Rules_mutable_in(validate_Int32Rules * msg,size_t * len)637 UPB_INLINE int32_t* validate_Int32Rules_mutable_in(validate_Int32Rules *msg, size_t *len) {
638 return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len);
639 }
validate_Int32Rules_resize_in(validate_Int32Rules * msg,size_t len,upb_arena * arena)640 UPB_INLINE int32_t* validate_Int32Rules_resize_in(validate_Int32Rules *msg, size_t len, upb_arena *arena) {
641 return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_TYPE_INT32, arena);
642 }
validate_Int32Rules_add_in(validate_Int32Rules * msg,int32_t val,upb_arena * arena)643 UPB_INLINE bool validate_Int32Rules_add_in(validate_Int32Rules *msg, int32_t val, upb_arena *arena) {
644 return _upb_array_append_accessor(msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val,
645 arena);
646 }
validate_Int32Rules_mutable_not_in(validate_Int32Rules * msg,size_t * len)647 UPB_INLINE int32_t* validate_Int32Rules_mutable_not_in(validate_Int32Rules *msg, size_t *len) {
648 return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len);
649 }
validate_Int32Rules_resize_not_in(validate_Int32Rules * msg,size_t len,upb_arena * arena)650 UPB_INLINE int32_t* validate_Int32Rules_resize_not_in(validate_Int32Rules *msg, size_t len, upb_arena *arena) {
651 return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_TYPE_INT32, arena);
652 }
validate_Int32Rules_add_not_in(validate_Int32Rules * msg,int32_t val,upb_arena * arena)653 UPB_INLINE bool validate_Int32Rules_add_not_in(validate_Int32Rules *msg, int32_t val, upb_arena *arena) {
654 return _upb_array_append_accessor(msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val,
655 arena);
656 }
657
658 /* validate.Int64Rules */
659
validate_Int64Rules_new(upb_arena * arena)660 UPB_INLINE validate_Int64Rules *validate_Int64Rules_new(upb_arena *arena) {
661 return (validate_Int64Rules *)_upb_msg_new(&validate_Int64Rules_msginit, arena);
662 }
validate_Int64Rules_parse(const char * buf,size_t size,upb_arena * arena)663 UPB_INLINE validate_Int64Rules *validate_Int64Rules_parse(const char *buf, size_t size,
664 upb_arena *arena) {
665 validate_Int64Rules *ret = validate_Int64Rules_new(arena);
666 return (ret && upb_decode(buf, size, ret, &validate_Int64Rules_msginit, arena)) ? ret : NULL;
667 }
validate_Int64Rules_serialize(const validate_Int64Rules * msg,upb_arena * arena,size_t * len)668 UPB_INLINE char *validate_Int64Rules_serialize(const validate_Int64Rules *msg, upb_arena *arena, size_t *len) {
669 return upb_encode(msg, &validate_Int64Rules_msginit, arena, len);
670 }
671
validate_Int64Rules_has_const(const validate_Int64Rules * msg)672 UPB_INLINE bool validate_Int64Rules_has_const(const validate_Int64Rules *msg) { return _upb_hasbit(msg, 1); }
validate_Int64Rules_const(const validate_Int64Rules * msg)673 UPB_INLINE int64_t validate_Int64Rules_const(const validate_Int64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t); }
validate_Int64Rules_has_lt(const validate_Int64Rules * msg)674 UPB_INLINE bool validate_Int64Rules_has_lt(const validate_Int64Rules *msg) { return _upb_hasbit(msg, 2); }
validate_Int64Rules_lt(const validate_Int64Rules * msg)675 UPB_INLINE int64_t validate_Int64Rules_lt(const validate_Int64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t); }
validate_Int64Rules_has_lte(const validate_Int64Rules * msg)676 UPB_INLINE bool validate_Int64Rules_has_lte(const validate_Int64Rules *msg) { return _upb_hasbit(msg, 3); }
validate_Int64Rules_lte(const validate_Int64Rules * msg)677 UPB_INLINE int64_t validate_Int64Rules_lte(const validate_Int64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int64_t); }
validate_Int64Rules_has_gt(const validate_Int64Rules * msg)678 UPB_INLINE bool validate_Int64Rules_has_gt(const validate_Int64Rules *msg) { return _upb_hasbit(msg, 4); }
validate_Int64Rules_gt(const validate_Int64Rules * msg)679 UPB_INLINE int64_t validate_Int64Rules_gt(const validate_Int64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), int64_t); }
validate_Int64Rules_has_gte(const validate_Int64Rules * msg)680 UPB_INLINE bool validate_Int64Rules_has_gte(const validate_Int64Rules *msg) { return _upb_hasbit(msg, 5); }
validate_Int64Rules_gte(const validate_Int64Rules * msg)681 UPB_INLINE int64_t validate_Int64Rules_gte(const validate_Int64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 40), int64_t); }
validate_Int64Rules_in(const validate_Int64Rules * msg,size_t * len)682 UPB_INLINE int64_t const* validate_Int64Rules_in(const validate_Int64Rules *msg, size_t *len) { return (int64_t const*)_upb_array_accessor(msg, UPB_SIZE(48, 48), len); }
validate_Int64Rules_not_in(const validate_Int64Rules * msg,size_t * len)683 UPB_INLINE int64_t const* validate_Int64Rules_not_in(const validate_Int64Rules *msg, size_t *len) { return (int64_t const*)_upb_array_accessor(msg, UPB_SIZE(52, 56), len); }
684
validate_Int64Rules_set_const(validate_Int64Rules * msg,int64_t value)685 UPB_INLINE void validate_Int64Rules_set_const(validate_Int64Rules *msg, int64_t value) {
686 _upb_sethas(msg, 1);
687 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t) = value;
688 }
validate_Int64Rules_set_lt(validate_Int64Rules * msg,int64_t value)689 UPB_INLINE void validate_Int64Rules_set_lt(validate_Int64Rules *msg, int64_t value) {
690 _upb_sethas(msg, 2);
691 *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t) = value;
692 }
validate_Int64Rules_set_lte(validate_Int64Rules * msg,int64_t value)693 UPB_INLINE void validate_Int64Rules_set_lte(validate_Int64Rules *msg, int64_t value) {
694 _upb_sethas(msg, 3);
695 *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int64_t) = value;
696 }
validate_Int64Rules_set_gt(validate_Int64Rules * msg,int64_t value)697 UPB_INLINE void validate_Int64Rules_set_gt(validate_Int64Rules *msg, int64_t value) {
698 _upb_sethas(msg, 4);
699 *UPB_PTR_AT(msg, UPB_SIZE(32, 32), int64_t) = value;
700 }
validate_Int64Rules_set_gte(validate_Int64Rules * msg,int64_t value)701 UPB_INLINE void validate_Int64Rules_set_gte(validate_Int64Rules *msg, int64_t value) {
702 _upb_sethas(msg, 5);
703 *UPB_PTR_AT(msg, UPB_SIZE(40, 40), int64_t) = value;
704 }
validate_Int64Rules_mutable_in(validate_Int64Rules * msg,size_t * len)705 UPB_INLINE int64_t* validate_Int64Rules_mutable_in(validate_Int64Rules *msg, size_t *len) {
706 return (int64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len);
707 }
validate_Int64Rules_resize_in(validate_Int64Rules * msg,size_t len,upb_arena * arena)708 UPB_INLINE int64_t* validate_Int64Rules_resize_in(validate_Int64Rules *msg, size_t len, upb_arena *arena) {
709 return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_TYPE_INT64, arena);
710 }
validate_Int64Rules_add_in(validate_Int64Rules * msg,int64_t val,upb_arena * arena)711 UPB_INLINE bool validate_Int64Rules_add_in(validate_Int64Rules *msg, int64_t val, upb_arena *arena) {
712 return _upb_array_append_accessor(msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val,
713 arena);
714 }
validate_Int64Rules_mutable_not_in(validate_Int64Rules * msg,size_t * len)715 UPB_INLINE int64_t* validate_Int64Rules_mutable_not_in(validate_Int64Rules *msg, size_t *len) {
716 return (int64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 56), len);
717 }
validate_Int64Rules_resize_not_in(validate_Int64Rules * msg,size_t len,upb_arena * arena)718 UPB_INLINE int64_t* validate_Int64Rules_resize_not_in(validate_Int64Rules *msg, size_t len, upb_arena *arena) {
719 return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_TYPE_INT64, arena);
720 }
validate_Int64Rules_add_not_in(validate_Int64Rules * msg,int64_t val,upb_arena * arena)721 UPB_INLINE bool validate_Int64Rules_add_not_in(validate_Int64Rules *msg, int64_t val, upb_arena *arena) {
722 return _upb_array_append_accessor(msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val,
723 arena);
724 }
725
726 /* validate.UInt32Rules */
727
validate_UInt32Rules_new(upb_arena * arena)728 UPB_INLINE validate_UInt32Rules *validate_UInt32Rules_new(upb_arena *arena) {
729 return (validate_UInt32Rules *)_upb_msg_new(&validate_UInt32Rules_msginit, arena);
730 }
validate_UInt32Rules_parse(const char * buf,size_t size,upb_arena * arena)731 UPB_INLINE validate_UInt32Rules *validate_UInt32Rules_parse(const char *buf, size_t size,
732 upb_arena *arena) {
733 validate_UInt32Rules *ret = validate_UInt32Rules_new(arena);
734 return (ret && upb_decode(buf, size, ret, &validate_UInt32Rules_msginit, arena)) ? ret : NULL;
735 }
validate_UInt32Rules_serialize(const validate_UInt32Rules * msg,upb_arena * arena,size_t * len)736 UPB_INLINE char *validate_UInt32Rules_serialize(const validate_UInt32Rules *msg, upb_arena *arena, size_t *len) {
737 return upb_encode(msg, &validate_UInt32Rules_msginit, arena, len);
738 }
739
validate_UInt32Rules_has_const(const validate_UInt32Rules * msg)740 UPB_INLINE bool validate_UInt32Rules_has_const(const validate_UInt32Rules *msg) { return _upb_hasbit(msg, 1); }
validate_UInt32Rules_const(const validate_UInt32Rules * msg)741 UPB_INLINE uint32_t validate_UInt32Rules_const(const validate_UInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t); }
validate_UInt32Rules_has_lt(const validate_UInt32Rules * msg)742 UPB_INLINE bool validate_UInt32Rules_has_lt(const validate_UInt32Rules *msg) { return _upb_hasbit(msg, 2); }
validate_UInt32Rules_lt(const validate_UInt32Rules * msg)743 UPB_INLINE uint32_t validate_UInt32Rules_lt(const validate_UInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t); }
validate_UInt32Rules_has_lte(const validate_UInt32Rules * msg)744 UPB_INLINE bool validate_UInt32Rules_has_lte(const validate_UInt32Rules *msg) { return _upb_hasbit(msg, 3); }
validate_UInt32Rules_lte(const validate_UInt32Rules * msg)745 UPB_INLINE uint32_t validate_UInt32Rules_lte(const validate_UInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), uint32_t); }
validate_UInt32Rules_has_gt(const validate_UInt32Rules * msg)746 UPB_INLINE bool validate_UInt32Rules_has_gt(const validate_UInt32Rules *msg) { return _upb_hasbit(msg, 4); }
validate_UInt32Rules_gt(const validate_UInt32Rules * msg)747 UPB_INLINE uint32_t validate_UInt32Rules_gt(const validate_UInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint32_t); }
validate_UInt32Rules_has_gte(const validate_UInt32Rules * msg)748 UPB_INLINE bool validate_UInt32Rules_has_gte(const validate_UInt32Rules *msg) { return _upb_hasbit(msg, 5); }
validate_UInt32Rules_gte(const validate_UInt32Rules * msg)749 UPB_INLINE uint32_t validate_UInt32Rules_gte(const validate_UInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), uint32_t); }
validate_UInt32Rules_in(const validate_UInt32Rules * msg,size_t * len)750 UPB_INLINE uint32_t const* validate_UInt32Rules_in(const validate_UInt32Rules *msg, size_t *len) { return (uint32_t const*)_upb_array_accessor(msg, UPB_SIZE(24, 24), len); }
validate_UInt32Rules_not_in(const validate_UInt32Rules * msg,size_t * len)751 UPB_INLINE uint32_t const* validate_UInt32Rules_not_in(const validate_UInt32Rules *msg, size_t *len) { return (uint32_t const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); }
752
validate_UInt32Rules_set_const(validate_UInt32Rules * msg,uint32_t value)753 UPB_INLINE void validate_UInt32Rules_set_const(validate_UInt32Rules *msg, uint32_t value) {
754 _upb_sethas(msg, 1);
755 *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t) = value;
756 }
validate_UInt32Rules_set_lt(validate_UInt32Rules * msg,uint32_t value)757 UPB_INLINE void validate_UInt32Rules_set_lt(validate_UInt32Rules *msg, uint32_t value) {
758 _upb_sethas(msg, 2);
759 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t) = value;
760 }
validate_UInt32Rules_set_lte(validate_UInt32Rules * msg,uint32_t value)761 UPB_INLINE void validate_UInt32Rules_set_lte(validate_UInt32Rules *msg, uint32_t value) {
762 _upb_sethas(msg, 3);
763 *UPB_PTR_AT(msg, UPB_SIZE(12, 12), uint32_t) = value;
764 }
validate_UInt32Rules_set_gt(validate_UInt32Rules * msg,uint32_t value)765 UPB_INLINE void validate_UInt32Rules_set_gt(validate_UInt32Rules *msg, uint32_t value) {
766 _upb_sethas(msg, 4);
767 *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint32_t) = value;
768 }
validate_UInt32Rules_set_gte(validate_UInt32Rules * msg,uint32_t value)769 UPB_INLINE void validate_UInt32Rules_set_gte(validate_UInt32Rules *msg, uint32_t value) {
770 _upb_sethas(msg, 5);
771 *UPB_PTR_AT(msg, UPB_SIZE(20, 20), uint32_t) = value;
772 }
validate_UInt32Rules_mutable_in(validate_UInt32Rules * msg,size_t * len)773 UPB_INLINE uint32_t* validate_UInt32Rules_mutable_in(validate_UInt32Rules *msg, size_t *len) {
774 return (uint32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len);
775 }
validate_UInt32Rules_resize_in(validate_UInt32Rules * msg,size_t len,upb_arena * arena)776 UPB_INLINE uint32_t* validate_UInt32Rules_resize_in(validate_UInt32Rules *msg, size_t len, upb_arena *arena) {
777 return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_TYPE_UINT32, arena);
778 }
validate_UInt32Rules_add_in(validate_UInt32Rules * msg,uint32_t val,upb_arena * arena)779 UPB_INLINE bool validate_UInt32Rules_add_in(validate_UInt32Rules *msg, uint32_t val, upb_arena *arena) {
780 return _upb_array_append_accessor(msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val,
781 arena);
782 }
validate_UInt32Rules_mutable_not_in(validate_UInt32Rules * msg,size_t * len)783 UPB_INLINE uint32_t* validate_UInt32Rules_mutable_not_in(validate_UInt32Rules *msg, size_t *len) {
784 return (uint32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len);
785 }
validate_UInt32Rules_resize_not_in(validate_UInt32Rules * msg,size_t len,upb_arena * arena)786 UPB_INLINE uint32_t* validate_UInt32Rules_resize_not_in(validate_UInt32Rules *msg, size_t len, upb_arena *arena) {
787 return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_TYPE_UINT32, arena);
788 }
validate_UInt32Rules_add_not_in(validate_UInt32Rules * msg,uint32_t val,upb_arena * arena)789 UPB_INLINE bool validate_UInt32Rules_add_not_in(validate_UInt32Rules *msg, uint32_t val, upb_arena *arena) {
790 return _upb_array_append_accessor(msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val,
791 arena);
792 }
793
794 /* validate.UInt64Rules */
795
validate_UInt64Rules_new(upb_arena * arena)796 UPB_INLINE validate_UInt64Rules *validate_UInt64Rules_new(upb_arena *arena) {
797 return (validate_UInt64Rules *)_upb_msg_new(&validate_UInt64Rules_msginit, arena);
798 }
validate_UInt64Rules_parse(const char * buf,size_t size,upb_arena * arena)799 UPB_INLINE validate_UInt64Rules *validate_UInt64Rules_parse(const char *buf, size_t size,
800 upb_arena *arena) {
801 validate_UInt64Rules *ret = validate_UInt64Rules_new(arena);
802 return (ret && upb_decode(buf, size, ret, &validate_UInt64Rules_msginit, arena)) ? ret : NULL;
803 }
validate_UInt64Rules_serialize(const validate_UInt64Rules * msg,upb_arena * arena,size_t * len)804 UPB_INLINE char *validate_UInt64Rules_serialize(const validate_UInt64Rules *msg, upb_arena *arena, size_t *len) {
805 return upb_encode(msg, &validate_UInt64Rules_msginit, arena, len);
806 }
807
validate_UInt64Rules_has_const(const validate_UInt64Rules * msg)808 UPB_INLINE bool validate_UInt64Rules_has_const(const validate_UInt64Rules *msg) { return _upb_hasbit(msg, 1); }
validate_UInt64Rules_const(const validate_UInt64Rules * msg)809 UPB_INLINE uint64_t validate_UInt64Rules_const(const validate_UInt64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); }
validate_UInt64Rules_has_lt(const validate_UInt64Rules * msg)810 UPB_INLINE bool validate_UInt64Rules_has_lt(const validate_UInt64Rules *msg) { return _upb_hasbit(msg, 2); }
validate_UInt64Rules_lt(const validate_UInt64Rules * msg)811 UPB_INLINE uint64_t validate_UInt64Rules_lt(const validate_UInt64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t); }
validate_UInt64Rules_has_lte(const validate_UInt64Rules * msg)812 UPB_INLINE bool validate_UInt64Rules_has_lte(const validate_UInt64Rules *msg) { return _upb_hasbit(msg, 3); }
validate_UInt64Rules_lte(const validate_UInt64Rules * msg)813 UPB_INLINE uint64_t validate_UInt64Rules_lte(const validate_UInt64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t); }
validate_UInt64Rules_has_gt(const validate_UInt64Rules * msg)814 UPB_INLINE bool validate_UInt64Rules_has_gt(const validate_UInt64Rules *msg) { return _upb_hasbit(msg, 4); }
validate_UInt64Rules_gt(const validate_UInt64Rules * msg)815 UPB_INLINE uint64_t validate_UInt64Rules_gt(const validate_UInt64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), uint64_t); }
validate_UInt64Rules_has_gte(const validate_UInt64Rules * msg)816 UPB_INLINE bool validate_UInt64Rules_has_gte(const validate_UInt64Rules *msg) { return _upb_hasbit(msg, 5); }
validate_UInt64Rules_gte(const validate_UInt64Rules * msg)817 UPB_INLINE uint64_t validate_UInt64Rules_gte(const validate_UInt64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 40), uint64_t); }
validate_UInt64Rules_in(const validate_UInt64Rules * msg,size_t * len)818 UPB_INLINE uint64_t const* validate_UInt64Rules_in(const validate_UInt64Rules *msg, size_t *len) { return (uint64_t const*)_upb_array_accessor(msg, UPB_SIZE(48, 48), len); }
validate_UInt64Rules_not_in(const validate_UInt64Rules * msg,size_t * len)819 UPB_INLINE uint64_t const* validate_UInt64Rules_not_in(const validate_UInt64Rules *msg, size_t *len) { return (uint64_t const*)_upb_array_accessor(msg, UPB_SIZE(52, 56), len); }
820
validate_UInt64Rules_set_const(validate_UInt64Rules * msg,uint64_t value)821 UPB_INLINE void validate_UInt64Rules_set_const(validate_UInt64Rules *msg, uint64_t value) {
822 _upb_sethas(msg, 1);
823 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t) = value;
824 }
validate_UInt64Rules_set_lt(validate_UInt64Rules * msg,uint64_t value)825 UPB_INLINE void validate_UInt64Rules_set_lt(validate_UInt64Rules *msg, uint64_t value) {
826 _upb_sethas(msg, 2);
827 *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t) = value;
828 }
validate_UInt64Rules_set_lte(validate_UInt64Rules * msg,uint64_t value)829 UPB_INLINE void validate_UInt64Rules_set_lte(validate_UInt64Rules *msg, uint64_t value) {
830 _upb_sethas(msg, 3);
831 *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t) = value;
832 }
validate_UInt64Rules_set_gt(validate_UInt64Rules * msg,uint64_t value)833 UPB_INLINE void validate_UInt64Rules_set_gt(validate_UInt64Rules *msg, uint64_t value) {
834 _upb_sethas(msg, 4);
835 *UPB_PTR_AT(msg, UPB_SIZE(32, 32), uint64_t) = value;
836 }
validate_UInt64Rules_set_gte(validate_UInt64Rules * msg,uint64_t value)837 UPB_INLINE void validate_UInt64Rules_set_gte(validate_UInt64Rules *msg, uint64_t value) {
838 _upb_sethas(msg, 5);
839 *UPB_PTR_AT(msg, UPB_SIZE(40, 40), uint64_t) = value;
840 }
validate_UInt64Rules_mutable_in(validate_UInt64Rules * msg,size_t * len)841 UPB_INLINE uint64_t* validate_UInt64Rules_mutable_in(validate_UInt64Rules *msg, size_t *len) {
842 return (uint64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len);
843 }
validate_UInt64Rules_resize_in(validate_UInt64Rules * msg,size_t len,upb_arena * arena)844 UPB_INLINE uint64_t* validate_UInt64Rules_resize_in(validate_UInt64Rules *msg, size_t len, upb_arena *arena) {
845 return (uint64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_TYPE_UINT64, arena);
846 }
validate_UInt64Rules_add_in(validate_UInt64Rules * msg,uint64_t val,upb_arena * arena)847 UPB_INLINE bool validate_UInt64Rules_add_in(validate_UInt64Rules *msg, uint64_t val, upb_arena *arena) {
848 return _upb_array_append_accessor(msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_UINT64, &val,
849 arena);
850 }
validate_UInt64Rules_mutable_not_in(validate_UInt64Rules * msg,size_t * len)851 UPB_INLINE uint64_t* validate_UInt64Rules_mutable_not_in(validate_UInt64Rules *msg, size_t *len) {
852 return (uint64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 56), len);
853 }
validate_UInt64Rules_resize_not_in(validate_UInt64Rules * msg,size_t len,upb_arena * arena)854 UPB_INLINE uint64_t* validate_UInt64Rules_resize_not_in(validate_UInt64Rules *msg, size_t len, upb_arena *arena) {
855 return (uint64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_TYPE_UINT64, arena);
856 }
validate_UInt64Rules_add_not_in(validate_UInt64Rules * msg,uint64_t val,upb_arena * arena)857 UPB_INLINE bool validate_UInt64Rules_add_not_in(validate_UInt64Rules *msg, uint64_t val, upb_arena *arena) {
858 return _upb_array_append_accessor(msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_UINT64, &val,
859 arena);
860 }
861
862 /* validate.SInt32Rules */
863
validate_SInt32Rules_new(upb_arena * arena)864 UPB_INLINE validate_SInt32Rules *validate_SInt32Rules_new(upb_arena *arena) {
865 return (validate_SInt32Rules *)_upb_msg_new(&validate_SInt32Rules_msginit, arena);
866 }
validate_SInt32Rules_parse(const char * buf,size_t size,upb_arena * arena)867 UPB_INLINE validate_SInt32Rules *validate_SInt32Rules_parse(const char *buf, size_t size,
868 upb_arena *arena) {
869 validate_SInt32Rules *ret = validate_SInt32Rules_new(arena);
870 return (ret && upb_decode(buf, size, ret, &validate_SInt32Rules_msginit, arena)) ? ret : NULL;
871 }
validate_SInt32Rules_serialize(const validate_SInt32Rules * msg,upb_arena * arena,size_t * len)872 UPB_INLINE char *validate_SInt32Rules_serialize(const validate_SInt32Rules *msg, upb_arena *arena, size_t *len) {
873 return upb_encode(msg, &validate_SInt32Rules_msginit, arena, len);
874 }
875
validate_SInt32Rules_has_const(const validate_SInt32Rules * msg)876 UPB_INLINE bool validate_SInt32Rules_has_const(const validate_SInt32Rules *msg) { return _upb_hasbit(msg, 1); }
validate_SInt32Rules_const(const validate_SInt32Rules * msg)877 UPB_INLINE int32_t validate_SInt32Rules_const(const validate_SInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
validate_SInt32Rules_has_lt(const validate_SInt32Rules * msg)878 UPB_INLINE bool validate_SInt32Rules_has_lt(const validate_SInt32Rules *msg) { return _upb_hasbit(msg, 2); }
validate_SInt32Rules_lt(const validate_SInt32Rules * msg)879 UPB_INLINE int32_t validate_SInt32Rules_lt(const validate_SInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); }
validate_SInt32Rules_has_lte(const validate_SInt32Rules * msg)880 UPB_INLINE bool validate_SInt32Rules_has_lte(const validate_SInt32Rules *msg) { return _upb_hasbit(msg, 3); }
validate_SInt32Rules_lte(const validate_SInt32Rules * msg)881 UPB_INLINE int32_t validate_SInt32Rules_lte(const validate_SInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t); }
validate_SInt32Rules_has_gt(const validate_SInt32Rules * msg)882 UPB_INLINE bool validate_SInt32Rules_has_gt(const validate_SInt32Rules *msg) { return _upb_hasbit(msg, 4); }
validate_SInt32Rules_gt(const validate_SInt32Rules * msg)883 UPB_INLINE int32_t validate_SInt32Rules_gt(const validate_SInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); }
validate_SInt32Rules_has_gte(const validate_SInt32Rules * msg)884 UPB_INLINE bool validate_SInt32Rules_has_gte(const validate_SInt32Rules *msg) { return _upb_hasbit(msg, 5); }
validate_SInt32Rules_gte(const validate_SInt32Rules * msg)885 UPB_INLINE int32_t validate_SInt32Rules_gte(const validate_SInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), int32_t); }
validate_SInt32Rules_in(const validate_SInt32Rules * msg,size_t * len)886 UPB_INLINE int32_t const* validate_SInt32Rules_in(const validate_SInt32Rules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(24, 24), len); }
validate_SInt32Rules_not_in(const validate_SInt32Rules * msg,size_t * len)887 UPB_INLINE int32_t const* validate_SInt32Rules_not_in(const validate_SInt32Rules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); }
888
validate_SInt32Rules_set_const(validate_SInt32Rules * msg,int32_t value)889 UPB_INLINE void validate_SInt32Rules_set_const(validate_SInt32Rules *msg, int32_t value) {
890 _upb_sethas(msg, 1);
891 *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
892 }
validate_SInt32Rules_set_lt(validate_SInt32Rules * msg,int32_t value)893 UPB_INLINE void validate_SInt32Rules_set_lt(validate_SInt32Rules *msg, int32_t value) {
894 _upb_sethas(msg, 2);
895 *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
896 }
validate_SInt32Rules_set_lte(validate_SInt32Rules * msg,int32_t value)897 UPB_INLINE void validate_SInt32Rules_set_lte(validate_SInt32Rules *msg, int32_t value) {
898 _upb_sethas(msg, 3);
899 *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t) = value;
900 }
validate_SInt32Rules_set_gt(validate_SInt32Rules * msg,int32_t value)901 UPB_INLINE void validate_SInt32Rules_set_gt(validate_SInt32Rules *msg, int32_t value) {
902 _upb_sethas(msg, 4);
903 *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t) = value;
904 }
validate_SInt32Rules_set_gte(validate_SInt32Rules * msg,int32_t value)905 UPB_INLINE void validate_SInt32Rules_set_gte(validate_SInt32Rules *msg, int32_t value) {
906 _upb_sethas(msg, 5);
907 *UPB_PTR_AT(msg, UPB_SIZE(20, 20), int32_t) = value;
908 }
validate_SInt32Rules_mutable_in(validate_SInt32Rules * msg,size_t * len)909 UPB_INLINE int32_t* validate_SInt32Rules_mutable_in(validate_SInt32Rules *msg, size_t *len) {
910 return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len);
911 }
validate_SInt32Rules_resize_in(validate_SInt32Rules * msg,size_t len,upb_arena * arena)912 UPB_INLINE int32_t* validate_SInt32Rules_resize_in(validate_SInt32Rules *msg, size_t len, upb_arena *arena) {
913 return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_TYPE_INT32, arena);
914 }
validate_SInt32Rules_add_in(validate_SInt32Rules * msg,int32_t val,upb_arena * arena)915 UPB_INLINE bool validate_SInt32Rules_add_in(validate_SInt32Rules *msg, int32_t val, upb_arena *arena) {
916 return _upb_array_append_accessor(msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val,
917 arena);
918 }
validate_SInt32Rules_mutable_not_in(validate_SInt32Rules * msg,size_t * len)919 UPB_INLINE int32_t* validate_SInt32Rules_mutable_not_in(validate_SInt32Rules *msg, size_t *len) {
920 return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len);
921 }
validate_SInt32Rules_resize_not_in(validate_SInt32Rules * msg,size_t len,upb_arena * arena)922 UPB_INLINE int32_t* validate_SInt32Rules_resize_not_in(validate_SInt32Rules *msg, size_t len, upb_arena *arena) {
923 return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_TYPE_INT32, arena);
924 }
validate_SInt32Rules_add_not_in(validate_SInt32Rules * msg,int32_t val,upb_arena * arena)925