1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: google/protobuf/type.proto
3
4 #include <google/protobuf/type.pb.h>
5
6 #include <algorithm>
7
8 #include <google/protobuf/io/coded_stream.h>
9 #include <google/protobuf/extension_set.h>
10 #include <google/protobuf/wire_format_lite.h>
11 #include <google/protobuf/descriptor.h>
12 #include <google/protobuf/generated_message_reflection.h>
13 #include <google/protobuf/reflection_ops.h>
14 #include <google/protobuf/wire_format.h>
15 // @@protoc_insertion_point(includes)
16 #include <google/protobuf/port_def.inc>
17 extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fany_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Any_google_2fprotobuf_2fany_2eproto;
18 extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftype_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_EnumValue_google_2fprotobuf_2ftype_2eproto;
19 extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftype_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Field_google_2fprotobuf_2ftype_2eproto;
20 extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftype_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Option_google_2fprotobuf_2ftype_2eproto;
21 extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fsource_5fcontext_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto;
22 PROTOBUF_NAMESPACE_OPEN
23 class TypeDefaultTypeInternal {
24 public:
25 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Type> _instance;
26 } _Type_default_instance_;
27 class FieldDefaultTypeInternal {
28 public:
29 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Field> _instance;
30 } _Field_default_instance_;
31 class EnumDefaultTypeInternal {
32 public:
33 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Enum> _instance;
34 } _Enum_default_instance_;
35 class EnumValueDefaultTypeInternal {
36 public:
37 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<EnumValue> _instance;
38 } _EnumValue_default_instance_;
39 class OptionDefaultTypeInternal {
40 public:
41 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Option> _instance;
42 } _Option_default_instance_;
43 PROTOBUF_NAMESPACE_CLOSE
InitDefaultsscc_info_Enum_google_2fprotobuf_2ftype_2eproto()44 static void InitDefaultsscc_info_Enum_google_2fprotobuf_2ftype_2eproto() {
45 GOOGLE_PROTOBUF_VERIFY_VERSION;
46
47 {
48 void* ptr = &PROTOBUF_NAMESPACE_ID::_Enum_default_instance_;
49 new (ptr) PROTOBUF_NAMESPACE_ID::Enum();
50 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
51 }
52 }
53
54 PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_Enum_google_2fprotobuf_2ftype_2eproto =
55 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, 0, InitDefaultsscc_info_Enum_google_2fprotobuf_2ftype_2eproto}, {
56 &scc_info_EnumValue_google_2fprotobuf_2ftype_2eproto.base,
57 &scc_info_Option_google_2fprotobuf_2ftype_2eproto.base,
58 &scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto.base,}};
59
InitDefaultsscc_info_EnumValue_google_2fprotobuf_2ftype_2eproto()60 static void InitDefaultsscc_info_EnumValue_google_2fprotobuf_2ftype_2eproto() {
61 GOOGLE_PROTOBUF_VERIFY_VERSION;
62
63 {
64 void* ptr = &PROTOBUF_NAMESPACE_ID::_EnumValue_default_instance_;
65 new (ptr) PROTOBUF_NAMESPACE_ID::EnumValue();
66 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
67 }
68 }
69
70 PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_EnumValue_google_2fprotobuf_2ftype_2eproto =
71 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_EnumValue_google_2fprotobuf_2ftype_2eproto}, {
72 &scc_info_Option_google_2fprotobuf_2ftype_2eproto.base,}};
73
InitDefaultsscc_info_Field_google_2fprotobuf_2ftype_2eproto()74 static void InitDefaultsscc_info_Field_google_2fprotobuf_2ftype_2eproto() {
75 GOOGLE_PROTOBUF_VERIFY_VERSION;
76
77 {
78 void* ptr = &PROTOBUF_NAMESPACE_ID::_Field_default_instance_;
79 new (ptr) PROTOBUF_NAMESPACE_ID::Field();
80 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
81 }
82 }
83
84 PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Field_google_2fprotobuf_2ftype_2eproto =
85 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Field_google_2fprotobuf_2ftype_2eproto}, {
86 &scc_info_Option_google_2fprotobuf_2ftype_2eproto.base,}};
87
InitDefaultsscc_info_Option_google_2fprotobuf_2ftype_2eproto()88 static void InitDefaultsscc_info_Option_google_2fprotobuf_2ftype_2eproto() {
89 GOOGLE_PROTOBUF_VERIFY_VERSION;
90
91 {
92 void* ptr = &PROTOBUF_NAMESPACE_ID::_Option_default_instance_;
93 new (ptr) PROTOBUF_NAMESPACE_ID::Option();
94 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
95 }
96 }
97
98 PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Option_google_2fprotobuf_2ftype_2eproto =
99 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Option_google_2fprotobuf_2ftype_2eproto}, {
100 &scc_info_Any_google_2fprotobuf_2fany_2eproto.base,}};
101
InitDefaultsscc_info_Type_google_2fprotobuf_2ftype_2eproto()102 static void InitDefaultsscc_info_Type_google_2fprotobuf_2ftype_2eproto() {
103 GOOGLE_PROTOBUF_VERIFY_VERSION;
104
105 {
106 void* ptr = &PROTOBUF_NAMESPACE_ID::_Type_default_instance_;
107 new (ptr) PROTOBUF_NAMESPACE_ID::Type();
108 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
109 }
110 }
111
112 PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_Type_google_2fprotobuf_2ftype_2eproto =
113 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, 0, InitDefaultsscc_info_Type_google_2fprotobuf_2ftype_2eproto}, {
114 &scc_info_Field_google_2fprotobuf_2ftype_2eproto.base,
115 &scc_info_Option_google_2fprotobuf_2ftype_2eproto.base,
116 &scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto.base,}};
117
118 static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2ftype_2eproto[5];
119 static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto[3];
120 static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2ftype_2eproto = nullptr;
121
122 const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2ftype_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
123 ~0u, // no _has_bits_
124 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, _internal_metadata_),
125 ~0u, // no _extensions_
126 ~0u, // no _oneof_case_
127 ~0u, // no _weak_field_map_
128 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, name_),
129 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, fields_),
130 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, oneofs_),
131 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, options_),
132 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, source_context_),
133 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, syntax_),
134 ~0u, // no _has_bits_
135 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, _internal_metadata_),
136 ~0u, // no _extensions_
137 ~0u, // no _oneof_case_
138 ~0u, // no _weak_field_map_
139 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, kind_),
140 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, cardinality_),
141 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, number_),
142 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, name_),
143 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, type_url_),
144 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, oneof_index_),
145 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, packed_),
146 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, options_),
147 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, json_name_),
148 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, default_value_),
149 ~0u, // no _has_bits_
150 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Enum, _internal_metadata_),
151 ~0u, // no _extensions_
152 ~0u, // no _oneof_case_
153 ~0u, // no _weak_field_map_
154 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Enum, name_),
155 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Enum, enumvalue_),
156 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Enum, options_),
157 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Enum, source_context_),
158 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Enum, syntax_),
159 ~0u, // no _has_bits_
160 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValue, _internal_metadata_),
161 ~0u, // no _extensions_
162 ~0u, // no _oneof_case_
163 ~0u, // no _weak_field_map_
164 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValue, name_),
165 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValue, number_),
166 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValue, options_),
167 ~0u, // no _has_bits_
168 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Option, _internal_metadata_),
169 ~0u, // no _extensions_
170 ~0u, // no _oneof_case_
171 ~0u, // no _weak_field_map_
172 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Option, name_),
173 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Option, value_),
174 };
175 static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
176 { 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::Type)},
177 { 11, -1, sizeof(PROTOBUF_NAMESPACE_ID::Field)},
178 { 26, -1, sizeof(PROTOBUF_NAMESPACE_ID::Enum)},
179 { 36, -1, sizeof(PROTOBUF_NAMESPACE_ID::EnumValue)},
180 { 44, -1, sizeof(PROTOBUF_NAMESPACE_ID::Option)},
181 };
182
183 static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
184 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Type_default_instance_),
185 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Field_default_instance_),
186 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Enum_default_instance_),
187 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_EnumValue_default_instance_),
188 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Option_default_instance_),
189 };
190
191 const char descriptor_table_protodef_google_2fprotobuf_2ftype_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
192 "\n\032google/protobuf/type.proto\022\017google.pro"
193 "tobuf\032\031google/protobuf/any.proto\032$google"
194 "/protobuf/source_context.proto\"\327\001\n\004Type\022"
195 "\014\n\004name\030\001 \001(\t\022&\n\006fields\030\002 \003(\0132\026.google.p"
196 "rotobuf.Field\022\016\n\006oneofs\030\003 \003(\t\022(\n\007options"
197 "\030\004 \003(\0132\027.google.protobuf.Option\0226\n\016sourc"
198 "e_context\030\005 \001(\0132\036.google.protobuf.Source"
199 "Context\022\'\n\006syntax\030\006 \001(\0162\027.google.protobu"
200 "f.Syntax\"\325\005\n\005Field\022)\n\004kind\030\001 \001(\0162\033.googl"
201 "e.protobuf.Field.Kind\0227\n\013cardinality\030\002 \001"
202 "(\0162\".google.protobuf.Field.Cardinality\022\016"
203 "\n\006number\030\003 \001(\005\022\014\n\004name\030\004 \001(\t\022\020\n\010type_url"
204 "\030\006 \001(\t\022\023\n\013oneof_index\030\007 \001(\005\022\016\n\006packed\030\010 "
205 "\001(\010\022(\n\007options\030\t \003(\0132\027.google.protobuf.O"
206 "ption\022\021\n\tjson_name\030\n \001(\t\022\025\n\rdefault_valu"
207 "e\030\013 \001(\t\"\310\002\n\004Kind\022\020\n\014TYPE_UNKNOWN\020\000\022\017\n\013TY"
208 "PE_DOUBLE\020\001\022\016\n\nTYPE_FLOAT\020\002\022\016\n\nTYPE_INT6"
209 "4\020\003\022\017\n\013TYPE_UINT64\020\004\022\016\n\nTYPE_INT32\020\005\022\020\n\014"
210 "TYPE_FIXED64\020\006\022\020\n\014TYPE_FIXED32\020\007\022\r\n\tTYPE"
211 "_BOOL\020\010\022\017\n\013TYPE_STRING\020\t\022\016\n\nTYPE_GROUP\020\n"
212 "\022\020\n\014TYPE_MESSAGE\020\013\022\016\n\nTYPE_BYTES\020\014\022\017\n\013TY"
213 "PE_UINT32\020\r\022\r\n\tTYPE_ENUM\020\016\022\021\n\rTYPE_SFIXE"
214 "D32\020\017\022\021\n\rTYPE_SFIXED64\020\020\022\017\n\013TYPE_SINT32\020"
215 "\021\022\017\n\013TYPE_SINT64\020\022\"t\n\013Cardinality\022\027\n\023CAR"
216 "DINALITY_UNKNOWN\020\000\022\030\n\024CARDINALITY_OPTION"
217 "AL\020\001\022\030\n\024CARDINALITY_REQUIRED\020\002\022\030\n\024CARDIN"
218 "ALITY_REPEATED\020\003\"\316\001\n\004Enum\022\014\n\004name\030\001 \001(\t\022"
219 "-\n\tenumvalue\030\002 \003(\0132\032.google.protobuf.Enu"
220 "mValue\022(\n\007options\030\003 \003(\0132\027.google.protobu"
221 "f.Option\0226\n\016source_context\030\004 \001(\0132\036.googl"
222 "e.protobuf.SourceContext\022\'\n\006syntax\030\005 \001(\016"
223 "2\027.google.protobuf.Syntax\"S\n\tEnumValue\022\014"
224 "\n\004name\030\001 \001(\t\022\016\n\006number\030\002 \001(\005\022(\n\007options\030"
225 "\003 \003(\0132\027.google.protobuf.Option\";\n\006Option"
226 "\022\014\n\004name\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.google.p"
227 "rotobuf.Any*.\n\006Syntax\022\021\n\rSYNTAX_PROTO2\020\000"
228 "\022\021\n\rSYNTAX_PROTO3\020\001B{\n\023com.google.protob"
229 "ufB\tTypeProtoP\001Z-google.golang.org/proto"
230 "buf/types/known/typepb\370\001\001\242\002\003GPB\252\002\036Google"
231 ".Protobuf.WellKnownTypesb\006proto3"
232 ;
233 static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_google_2fprotobuf_2ftype_2eproto_deps[2] = {
234 &::descriptor_table_google_2fprotobuf_2fany_2eproto,
235 &::descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto,
236 };
237 static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_google_2fprotobuf_2ftype_2eproto_sccs[5] = {
238 &scc_info_Enum_google_2fprotobuf_2ftype_2eproto.base,
239 &scc_info_EnumValue_google_2fprotobuf_2ftype_2eproto.base,
240 &scc_info_Field_google_2fprotobuf_2ftype_2eproto.base,
241 &scc_info_Option_google_2fprotobuf_2ftype_2eproto.base,
242 &scc_info_Type_google_2fprotobuf_2ftype_2eproto.base,
243 };
244 static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2ftype_2eproto_once;
245 const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2ftype_2eproto = {
246 false, false, descriptor_table_protodef_google_2fprotobuf_2ftype_2eproto, "google/protobuf/type.proto", 1592,
247 &descriptor_table_google_2fprotobuf_2ftype_2eproto_once, descriptor_table_google_2fprotobuf_2ftype_2eproto_sccs, descriptor_table_google_2fprotobuf_2ftype_2eproto_deps, 5, 2,
248 schemas, file_default_instances, TableStruct_google_2fprotobuf_2ftype_2eproto::offsets,
249 file_level_metadata_google_2fprotobuf_2ftype_2eproto, 5, file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto, file_level_service_descriptors_google_2fprotobuf_2ftype_2eproto,
250 };
251
252 // Force running AddDescriptors() at dynamic initialization time.
253 static bool dynamic_init_dummy_google_2fprotobuf_2ftype_2eproto = (static_cast<void>(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2ftype_2eproto)), true);
254 PROTOBUF_NAMESPACE_OPEN
Field_Kind_descriptor()255 const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Field_Kind_descriptor() {
256 ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2ftype_2eproto);
257 return file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto[0];
258 }
Field_Kind_IsValid(int value)259 bool Field_Kind_IsValid(int value) {
260 switch (value) {
261 case 0:
262 case 1:
263 case 2:
264 case 3:
265 case 4:
266 case 5:
267 case 6:
268 case 7:
269 case 8:
270 case 9:
271 case 10:
272 case 11:
273 case 12:
274 case 13:
275 case 14:
276 case 15:
277 case 16:
278 case 17:
279 case 18:
280 return true;
281 default:
282 return false;
283 }
284 }
285
286 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
287 constexpr Field_Kind Field::TYPE_UNKNOWN;
288 constexpr Field_Kind Field::TYPE_DOUBLE;
289 constexpr Field_Kind Field::TYPE_FLOAT;
290 constexpr Field_Kind Field::TYPE_INT64;
291 constexpr Field_Kind Field::TYPE_UINT64;
292 constexpr Field_Kind Field::TYPE_INT32;
293 constexpr Field_Kind Field::TYPE_FIXED64;
294 constexpr Field_Kind Field::TYPE_FIXED32;
295 constexpr Field_Kind Field::TYPE_BOOL;
296 constexpr Field_Kind Field::TYPE_STRING;
297 constexpr Field_Kind Field::TYPE_GROUP;
298 constexpr Field_Kind Field::TYPE_MESSAGE;
299 constexpr Field_Kind Field::TYPE_BYTES;
300 constexpr Field_Kind Field::TYPE_UINT32;
301 constexpr Field_Kind Field::TYPE_ENUM;
302 constexpr Field_Kind Field::TYPE_SFIXED32;
303 constexpr Field_Kind Field::TYPE_SFIXED64;
304 constexpr Field_Kind Field::TYPE_SINT32;
305 constexpr Field_Kind Field::TYPE_SINT64;
306 constexpr Field_Kind Field::Kind_MIN;
307 constexpr Field_Kind Field::Kind_MAX;
308 constexpr int Field::Kind_ARRAYSIZE;
309 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
Field_Cardinality_descriptor()310 const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Field_Cardinality_descriptor() {
311 ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2ftype_2eproto);
312 return file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto[1];
313 }
Field_Cardinality_IsValid(int value)314 bool Field_Cardinality_IsValid(int value) {
315 switch (value) {
316 case 0:
317 case 1:
318 case 2:
319 case 3:
320 return true;
321 default:
322 return false;
323 }
324 }
325
326 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
327 constexpr Field_Cardinality Field::CARDINALITY_UNKNOWN;
328 constexpr Field_Cardinality Field::CARDINALITY_OPTIONAL;
329 constexpr Field_Cardinality Field::CARDINALITY_REQUIRED;
330 constexpr Field_Cardinality Field::CARDINALITY_REPEATED;
331 constexpr Field_Cardinality Field::Cardinality_MIN;
332 constexpr Field_Cardinality Field::Cardinality_MAX;
333 constexpr int Field::Cardinality_ARRAYSIZE;
334 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
Syntax_descriptor()335 const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Syntax_descriptor() {
336 ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2ftype_2eproto);
337 return file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto[2];
338 }
Syntax_IsValid(int value)339 bool Syntax_IsValid(int value) {
340 switch (value) {
341 case 0:
342 case 1:
343 return true;
344 default:
345 return false;
346 }
347 }
348
349
350 // ===================================================================
351
352 class Type::_Internal {
353 public:
354 static const PROTOBUF_NAMESPACE_ID::SourceContext& source_context(const Type* msg);
355 };
356
357 const PROTOBUF_NAMESPACE_ID::SourceContext&
source_context(const Type * msg)358 Type::_Internal::source_context(const Type* msg) {
359 return *msg->source_context_;
360 }
clear_source_context()361 void Type::clear_source_context() {
362 if (GetArena() == nullptr && source_context_ != nullptr) {
363 delete source_context_;
364 }
365 source_context_ = nullptr;
366 }
Type(::PROTOBUF_NAMESPACE_ID::Arena * arena)367 Type::Type(::PROTOBUF_NAMESPACE_ID::Arena* arena)
368 : ::PROTOBUF_NAMESPACE_ID::Message(arena),
369 fields_(arena),
370 oneofs_(arena),
371 options_(arena) {
372 SharedCtor();
373 RegisterArenaDtor(arena);
374 // @@protoc_insertion_point(arena_constructor:google.protobuf.Type)
375 }
Type(const Type & from)376 Type::Type(const Type& from)
377 : ::PROTOBUF_NAMESPACE_ID::Message(),
378 fields_(from.fields_),
379 oneofs_(from.oneofs_),
380 options_(from.options_) {
381 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
382 name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
383 if (!from._internal_name().empty()) {
384 name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
385 GetArena());
386 }
387 if (from._internal_has_source_context()) {
388 source_context_ = new PROTOBUF_NAMESPACE_ID::SourceContext(*from.source_context_);
389 } else {
390 source_context_ = nullptr;
391 }
392 syntax_ = from.syntax_;
393 // @@protoc_insertion_point(copy_constructor:google.protobuf.Type)
394 }
395
SharedCtor()396 void Type::SharedCtor() {
397 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Type_google_2fprotobuf_2ftype_2eproto.base);
398 name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
399 ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
400 reinterpret_cast<char*>(&source_context_) - reinterpret_cast<char*>(this)),
401 0, static_cast<size_t>(reinterpret_cast<char*>(&syntax_) -
402 reinterpret_cast<char*>(&source_context_)) + sizeof(syntax_));
403 }
404
~Type()405 Type::~Type() {
406 // @@protoc_insertion_point(destructor:google.protobuf.Type)
407 SharedDtor();
408 _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
409 }
410
SharedDtor()411 void Type::SharedDtor() {
412 GOOGLE_DCHECK(GetArena() == nullptr);
413 name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
414 if (this != internal_default_instance()) delete source_context_;
415 }
416
ArenaDtor(void * object)417 void Type::ArenaDtor(void* object) {
418 Type* _this = reinterpret_cast< Type* >(object);
419 (void)_this;
420 }
RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *)421 void Type::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
422 }
SetCachedSize(int size) const423 void Type::SetCachedSize(int size) const {
424 _cached_size_.Set(size);
425 }
default_instance()426 const Type& Type::default_instance() {
427 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Type_google_2fprotobuf_2ftype_2eproto.base);
428 return *internal_default_instance();
429 }
430
431
Clear()432 void Type::Clear() {
433 // @@protoc_insertion_point(message_clear_start:google.protobuf.Type)
434 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
435 // Prevent compiler warnings about cached_has_bits being unused
436 (void) cached_has_bits;
437
438 fields_.Clear();
439 oneofs_.Clear();
440 options_.Clear();
441 name_.ClearToEmpty();
442 if (GetArena() == nullptr && source_context_ != nullptr) {
443 delete source_context_;
444 }
445 source_context_ = nullptr;
446 syntax_ = 0;
447 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
448 }
449
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)450 const char* Type::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
451 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
452 while (!ctx->Done(&ptr)) {
453 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
454 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
455 CHK_(ptr);
456 switch (tag >> 3) {
457 // string name = 1;
458 case 1:
459 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
460 auto str = _internal_mutable_name();
461 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
462 CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Type.name"));
463 CHK_(ptr);
464 } else goto handle_unusual;
465 continue;
466 // repeated .google.protobuf.Field fields = 2;
467 case 2:
468 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
469 ptr -= 1;
470 do {
471 ptr += 1;
472 ptr = ctx->ParseMessage(_internal_add_fields(), ptr);
473 CHK_(ptr);
474 if (!ctx->DataAvailable(ptr)) break;
475 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
476 } else goto handle_unusual;
477 continue;
478 // repeated string oneofs = 3;
479 case 3:
480 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
481 ptr -= 1;
482 do {
483 ptr += 1;
484 auto str = _internal_add_oneofs();
485 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
486 CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Type.oneofs"));
487 CHK_(ptr);
488 if (!ctx->DataAvailable(ptr)) break;
489 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
490 } else goto handle_unusual;
491 continue;
492 // repeated .google.protobuf.Option options = 4;
493 case 4:
494 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
495 ptr -= 1;
496 do {
497 ptr += 1;
498 ptr = ctx->ParseMessage(_internal_add_options(), ptr);
499 CHK_(ptr);
500 if (!ctx->DataAvailable(ptr)) break;
501 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
502 } else goto handle_unusual;
503 continue;
504 // .google.protobuf.SourceContext source_context = 5;
505 case 5:
506 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
507 ptr = ctx->ParseMessage(_internal_mutable_source_context(), ptr);
508 CHK_(ptr);
509 } else goto handle_unusual;
510 continue;
511 // .google.protobuf.Syntax syntax = 6;
512 case 6:
513 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) {
514 ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
515 CHK_(ptr);
516 _internal_set_syntax(static_cast<PROTOBUF_NAMESPACE_ID::Syntax>(val));
517 } else goto handle_unusual;
518 continue;
519 default: {
520 handle_unusual:
521 if ((tag & 7) == 4 || tag == 0) {
522 ctx->SetLastTag(tag);
523 goto success;
524 }
525 ptr = UnknownFieldParse(tag,
526 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
527 ptr, ctx);
528 CHK_(ptr != nullptr);
529 continue;
530 }
531 } // switch
532 } // while
533 success:
534 return ptr;
535 failure:
536 ptr = nullptr;
537 goto success;
538 #undef CHK_
539 }
540
_InternalSerialize(::PROTOBUF_NAMESPACE_ID::uint8 * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const541 ::PROTOBUF_NAMESPACE_ID::uint8* Type::_InternalSerialize(
542 ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
543 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Type)
544 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
545 (void) cached_has_bits;
546
547 // string name = 1;
548 if (this->name().size() > 0) {
549 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
550 this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
551 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
552 "google.protobuf.Type.name");
553 target = stream->WriteStringMaybeAliased(
554 1, this->_internal_name(), target);
555 }
556
557 // repeated .google.protobuf.Field fields = 2;
558 for (unsigned int i = 0,
559 n = static_cast<unsigned int>(this->_internal_fields_size()); i < n; i++) {
560 target = stream->EnsureSpace(target);
561 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
562 InternalWriteMessage(2, this->_internal_fields(i), target, stream);
563 }
564
565 // repeated string oneofs = 3;
566 for (int i = 0, n = this->_internal_oneofs_size(); i < n; i++) {
567 const auto& s = this->_internal_oneofs(i);
568 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
569 s.data(), static_cast<int>(s.length()),
570 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
571 "google.protobuf.Type.oneofs");
572 target = stream->WriteString(3, s, target);
573 }
574
575 // repeated .google.protobuf.Option options = 4;
576 for (unsigned int i = 0,
577 n = static_cast<unsigned int>(this->_internal_options_size()); i < n; i++) {
578 target = stream->EnsureSpace(target);
579 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
580 InternalWriteMessage(4, this->_internal_options(i), target, stream);
581 }
582
583 // .google.protobuf.SourceContext source_context = 5;
584 if (this->has_source_context()) {
585 target = stream->EnsureSpace(target);
586 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
587 InternalWriteMessage(
588 5, _Internal::source_context(this), target, stream);
589 }
590
591 // .google.protobuf.Syntax syntax = 6;
592 if (this->syntax() != 0) {
593 target = stream->EnsureSpace(target);
594 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
595 6, this->_internal_syntax(), target);
596 }
597
598 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
599 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
600 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
601 }
602 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Type)
603 return target;
604 }
605
ByteSizeLong() const606 size_t Type::ByteSizeLong() const {
607 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Type)
608 size_t total_size = 0;
609
610 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
611 // Prevent compiler warnings about cached_has_bits being unused
612 (void) cached_has_bits;
613
614 // repeated .google.protobuf.Field fields = 2;
615 total_size += 1UL * this->_internal_fields_size();
616 for (const auto& msg : this->fields_) {
617 total_size +=
618 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
619 }
620
621 // repeated string oneofs = 3;
622 total_size += 1 *
623 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(oneofs_.size());
624 for (int i = 0, n = oneofs_.size(); i < n; i++) {
625 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
626 oneofs_.Get(i));
627 }
628
629 // repeated .google.protobuf.Option options = 4;
630 total_size += 1UL * this->_internal_options_size();
631 for (const auto& msg : this->options_) {
632 total_size +=
633 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
634 }
635
636 // string name = 1;
637 if (this->name().size() > 0) {
638 total_size += 1 +
639 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
640 this->_internal_name());
641 }
642
643 // .google.protobuf.SourceContext source_context = 5;
644 if (this->has_source_context()) {
645 total_size += 1 +
646 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
647 *source_context_);
648 }
649
650 // .google.protobuf.Syntax syntax = 6;
651 if (this->syntax() != 0) {
652 total_size += 1 +
653 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_syntax());
654 }
655
656 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
657 return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
658 _internal_metadata_, total_size, &_cached_size_);
659 }
660 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
661 SetCachedSize(cached_size);
662 return total_size;
663 }
664
MergeFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)665 void Type::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
666 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Type)
667 GOOGLE_DCHECK_NE(&from, this);
668 const Type* source =
669 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Type>(
670 &from);
671 if (source == nullptr) {
672 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Type)
673 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
674 } else {
675 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Type)
676 MergeFrom(*source);
677 }
678 }
679
MergeFrom(const Type & from)680 void Type::MergeFrom(const Type& from) {
681 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Type)
682 GOOGLE_DCHECK_NE(&from, this);
683 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
684 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
685 (void) cached_has_bits;
686
687 fields_.MergeFrom(from.fields_);
688 oneofs_.MergeFrom(from.oneofs_);
689 options_.MergeFrom(from.options_);
690 if (from.name().size() > 0) {
691 _internal_set_name(from._internal_name());
692 }
693 if (from.has_source_context()) {
694 _internal_mutable_source_context()->PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(from._internal_source_context());
695 }
696 if (from.syntax() != 0) {
697 _internal_set_syntax(from._internal_syntax());
698 }
699 }
700
CopyFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)701 void Type::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
702 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Type)
703 if (&from == this) return;
704 Clear();
705 MergeFrom(from);
706 }
707
CopyFrom(const Type & from)708 void Type::CopyFrom(const Type& from) {
709 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Type)
710 if (&from == this) return;
711 Clear();
712 MergeFrom(from);
713 }
714
IsInitialized() const715 bool Type::IsInitialized() const {
716 return true;
717 }
718
InternalSwap(Type * other)719 void Type::InternalSwap(Type* other) {
720 using std::swap;
721 _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
722 fields_.InternalSwap(&other->fields_);
723 oneofs_.InternalSwap(&other->oneofs_);
724 options_.InternalSwap(&other->options_);
725 name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
726 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
727 PROTOBUF_FIELD_OFFSET(Type, syntax_)
728 + sizeof(Type::syntax_)
729 - PROTOBUF_FIELD_OFFSET(Type, source_context_)>(
730 reinterpret_cast<char*>(&source_context_),
731 reinterpret_cast<char*>(&other->source_context_));
732 }
733
GetMetadata() const734 ::PROTOBUF_NAMESPACE_ID::Metadata Type::GetMetadata() const {
735 return GetMetadataStatic();
736 }
737
738
739 // ===================================================================
740
741 class Field::_Internal {
742 public:
743 };
744
Field(::PROTOBUF_NAMESPACE_ID::Arena * arena)745 Field::Field(::PROTOBUF_NAMESPACE_ID::Arena* arena)
746 : ::PROTOBUF_NAMESPACE_ID::Message(arena),
747 options_(arena) {
748 SharedCtor();
749 RegisterArenaDtor(arena);
750 // @@protoc_insertion_point(arena_constructor:google.protobuf.Field)
751 }
Field(const Field & from)752 Field::Field(const Field& from)
753 : ::PROTOBUF_NAMESPACE_ID::Message(),
754 options_(from.options_) {
755 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
756 name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
757 if (!from._internal_name().empty()) {
758 name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
759 GetArena());
760 }
761 type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
762 if (!from._internal_type_url().empty()) {
763 type_url_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_type_url(),
764 GetArena());
765 }
766 json_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
767 if (!from._internal_json_name().empty()) {
768 json_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_json_name(),
769 GetArena());
770 }
771 default_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
772 if (!from._internal_default_value().empty()) {
773 default_value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_default_value(),
774 GetArena());
775 }
776 ::memcpy(&kind_, &from.kind_,
777 static_cast<size_t>(reinterpret_cast<char*>(&packed_) -
778 reinterpret_cast<char*>(&kind_)) + sizeof(packed_));
779 // @@protoc_insertion_point(copy_constructor:google.protobuf.Field)
780 }
781
SharedCtor()782 void Field::SharedCtor() {
783 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Field_google_2fprotobuf_2ftype_2eproto.base);
784 name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
785 type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
786 json_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
787 default_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
788 ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
789 reinterpret_cast<char*>(&kind_) - reinterpret_cast<char*>(this)),
790 0, static_cast<size_t>(reinterpret_cast<char*>(&packed_) -
791 reinterpret_cast<char*>(&kind_)) + sizeof(packed_));
792 }
793
~Field()794 Field::~Field() {
795 // @@protoc_insertion_point(destructor:google.protobuf.Field)
796 SharedDtor();
797 _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
798 }
799
SharedDtor()800 void Field::SharedDtor() {
801 GOOGLE_DCHECK(GetArena() == nullptr);
802 name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
803 type_url_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
804 json_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
805 default_value_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
806 }
807
ArenaDtor(void * object)808 void Field::ArenaDtor(void* object) {
809 Field* _this = reinterpret_cast< Field* >(object);
810 (void)_this;
811 }
RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *)812 void Field::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
813 }
SetCachedSize(int size) const814 void Field::SetCachedSize(int size) const {
815 _cached_size_.Set(size);
816 }
default_instance()817 const Field& Field::default_instance() {
818 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Field_google_2fprotobuf_2ftype_2eproto.base);
819 return *internal_default_instance();
820 }
821
822
Clear()823 void Field::Clear() {
824 // @@protoc_insertion_point(message_clear_start:google.protobuf.Field)
825 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
826 // Prevent compiler warnings about cached_has_bits being unused
827 (void) cached_has_bits;
828
829 options_.Clear();
830 name_.ClearToEmpty();
831 type_url_.ClearToEmpty();
832 json_name_.ClearToEmpty();
833 default_value_.ClearToEmpty();
834 ::memset(&kind_, 0, static_cast<size_t>(
835 reinterpret_cast<char*>(&packed_) -
836 reinterpret_cast<char*>(&kind_)) + sizeof(packed_));
837 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
838 }
839
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)840 const char* Field::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
841 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
842 while (!ctx->Done(&ptr)) {
843 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
844 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
845 CHK_(ptr);
846 switch (tag >> 3) {
847 // .google.protobuf.Field.Kind kind = 1;
848 case 1:
849 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
850 ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
851 CHK_(ptr);
852 _internal_set_kind(static_cast<PROTOBUF_NAMESPACE_ID::Field_Kind>(val));
853 } else goto handle_unusual;
854 continue;
855 // .google.protobuf.Field.Cardinality cardinality = 2;
856 case 2:
857 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
858 ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
859 CHK_(ptr);
860 _internal_set_cardinality(static_cast<PROTOBUF_NAMESPACE_ID::Field_Cardinality>(val));
861 } else goto handle_unusual;
862 continue;
863 // int32 number = 3;
864 case 3:
865 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
866 number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
867 CHK_(ptr);
868 } else goto handle_unusual;
869 continue;
870 // string name = 4;
871 case 4:
872 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
873 auto str = _internal_mutable_name();
874 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
875 CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Field.name"));
876 CHK_(ptr);
877 } else goto handle_unusual;
878 continue;
879 // string type_url = 6;
880 case 6:
881 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
882 auto str = _internal_mutable_type_url();
883 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
884 CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Field.type_url"));
885 CHK_(ptr);
886 } else goto handle_unusual;
887 continue;
888 // int32 oneof_index = 7;
889 case 7:
890 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) {
891 oneof_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
892 CHK_(ptr);
893 } else goto handle_unusual;
894 continue;
895 // bool packed = 8;
896 case 8:
897 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) {
898 packed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
899 CHK_(ptr);
900 } else goto handle_unusual;
901 continue;
902 // repeated .google.protobuf.Option options = 9;
903 case 9:
904 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 74)) {
905 ptr -= 1;
906 do {
907 ptr += 1;
908 ptr = ctx->ParseMessage(_internal_add_options(), ptr);
909 CHK_(ptr);
910 if (!ctx->DataAvailable(ptr)) break;
911 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<74>(ptr));
912 } else goto handle_unusual;
913 continue;
914 // string json_name = 10;
915 case 10:
916 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82)) {
917 auto str = _internal_mutable_json_name();
918 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
919 CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Field.json_name"));
920 CHK_(ptr);
921 } else goto handle_unusual;
922 continue;
923 // string default_value = 11;
924 case 11:
925 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 90)) {
926 auto str = _internal_mutable_default_value();
927 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
928 CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Field.default_value"));
929 CHK_(ptr);
930 } else goto handle_unusual;
931 continue;
932 default: {
933 handle_unusual:
934 if ((tag & 7) == 4 || tag == 0) {
935 ctx->SetLastTag(tag);
936 goto success;
937 }
938 ptr = UnknownFieldParse(tag,
939 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
940 ptr, ctx);
941 CHK_(ptr != nullptr);
942 continue;
943 }
944 } // switch
945 } // while
946 success:
947 return ptr;
948 failure:
949 ptr = nullptr;
950 goto success;
951 #undef CHK_
952 }
953
_InternalSerialize(::PROTOBUF_NAMESPACE_ID::uint8 * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const954 ::PROTOBUF_NAMESPACE_ID::uint8* Field::_InternalSerialize(
955 ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
956 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Field)
957 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
958 (void) cached_has_bits;
959
960 // .google.protobuf.Field.Kind kind = 1;
961 if (this->kind() != 0) {
962 target = stream->EnsureSpace(target);
963 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
964 1, this->_internal_kind(), target);
965 }
966
967 // .google.protobuf.Field.Cardinality cardinality = 2;
968 if (this->cardinality() != 0) {
969 target = stream->EnsureSpace(target);
970 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
971 2, this->_internal_cardinality(), target);
972 }
973
974 // int32 number = 3;
975 if (this->number() != 0) {
976 target = stream->EnsureSpace(target);
977 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_number(), target);
978 }
979
980 // string name = 4;
981 if (this->name().size() > 0) {
982 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
983 this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
984 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
985 "google.protobuf.Field.name");
986 target = stream->WriteStringMaybeAliased(
987 4, this->_internal_name(), target);
988 }
989
990 // string type_url = 6;
991 if (this->type_url().size() > 0) {
992 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
993 this->_internal_type_url().data(), static_cast<int>(this->_internal_type_url().length()),
994 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
995 "google.protobuf.Field.type_url");
996 target = stream->WriteStringMaybeAliased(
997 6, this->_internal_type_url(), target);
998 }
999
1000 // int32 oneof_index = 7;
1001 if (this->oneof_index() != 0) {
1002 target = stream->EnsureSpace(target);
1003 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(7, this->_internal_oneof_index(), target);
1004 }
1005
1006 // bool packed = 8;
1007 if (this->packed() != 0) {
1008 target = stream->EnsureSpace(target);
1009 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_packed(), target);
1010 }
1011
1012 // repeated .google.protobuf.Option options = 9;
1013 for (unsigned int i = 0,
1014 n = static_cast<unsigned int>(this->_internal_options_size()); i < n; i++) {
1015 target = stream->EnsureSpace(target);
1016 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1017 InternalWriteMessage(9, this->_internal_options(i), target, stream);
1018 }
1019
1020 // string json_name = 10;
1021 if (this->json_name().size() > 0) {
1022 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1023 this->_internal_json_name().data(), static_cast<int>(this->_internal_json_name().length()),
1024 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1025 "google.protobuf.Field.json_name");
1026 target = stream->WriteStringMaybeAliased(
1027 10, this->_internal_json_name(), target);
1028 }
1029
1030 // string default_value = 11;
1031 if (this->default_value().size() > 0) {
1032 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1033 this->_internal_default_value().data(), static_cast<int>(this->_internal_default_value().length()),
1034 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1035 "google.protobuf.Field.default_value");
1036 target = stream->WriteStringMaybeAliased(
1037 11, this->_internal_default_value(), target);
1038 }
1039
1040 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1041 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
1042 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
1043 }
1044 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Field)
1045 return target;
1046 }
1047
ByteSizeLong() const1048 size_t Field::ByteSizeLong() const {
1049 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Field)
1050 size_t total_size = 0;
1051
1052 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1053 // Prevent compiler warnings about cached_has_bits being unused
1054 (void) cached_has_bits;
1055
1056 // repeated .google.protobuf.Option options = 9;
1057 total_size += 1UL * this->_internal_options_size();
1058 for (const auto& msg : this->options_) {
1059 total_size +=
1060 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1061 }
1062
1063 // string name = 4;
1064 if (this->name().size() > 0) {
1065 total_size += 1 +
1066 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1067 this->_internal_name());
1068 }
1069
1070 // string type_url = 6;
1071 if (this->type_url().size() > 0) {
1072 total_size += 1 +
1073 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1074 this->_internal_type_url());
1075 }
1076
1077 // string json_name = 10;
1078 if (this->json_name().size() > 0) {
1079 total_size += 1 +
1080 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1081 this->_internal_json_name());
1082 }
1083
1084 // string default_value = 11;
1085 if (this->default_value().size() > 0) {
1086 total_size += 1 +
1087 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1088 this->_internal_default_value());
1089 }
1090
1091 // .google.protobuf.Field.Kind kind = 1;
1092 if (this->kind() != 0) {
1093 total_size += 1 +
1094 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_kind());
1095 }
1096
1097 // .google.protobuf.Field.Cardinality cardinality = 2;
1098 if (this->cardinality() != 0) {
1099 total_size += 1 +
1100 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_cardinality());
1101 }
1102
1103 // int32 number = 3;
1104 if (this->number() != 0) {
1105 total_size += 1 +
1106 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1107 this->_internal_number());
1108 }
1109
1110 // int32 oneof_index = 7;
1111 if (this->oneof_index() != 0) {
1112 total_size += 1 +
1113 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1114 this->_internal_oneof_index());
1115 }
1116
1117 // bool packed = 8;
1118 if (this->packed() != 0) {
1119 total_size += 1 + 1;
1120 }
1121
1122 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1123 return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
1124 _internal_metadata_, total_size, &_cached_size_);
1125 }
1126 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
1127 SetCachedSize(cached_size);
1128 return total_size;
1129 }
1130
MergeFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)1131 void Field::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1132 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Field)
1133 GOOGLE_DCHECK_NE(&from, this);
1134 const Field* source =
1135 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Field>(
1136 &from);
1137 if (source == nullptr) {
1138 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Field)
1139 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
1140 } else {
1141 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Field)
1142 MergeFrom(*source);
1143 }
1144 }
1145
MergeFrom(const Field & from)1146 void Field::MergeFrom(const Field& from) {
1147 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Field)
1148 GOOGLE_DCHECK_NE(&from, this);
1149 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
1150 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1151 (void) cached_has_bits;
1152
1153 options_.MergeFrom(from.options_);
1154 if (from.name().size() > 0) {
1155 _internal_set_name(from._internal_name());
1156 }
1157 if (from.type_url().size() > 0) {
1158 _internal_set_type_url(from._internal_type_url());
1159 }
1160 if (from.json_name().size() > 0) {
1161 _internal_set_json_name(from._internal_json_name());
1162 }
1163 if (from.default_value().size() > 0) {
1164 _internal_set_default_value(from._internal_default_value());
1165 }
1166 if (from.kind() != 0) {
1167 _internal_set_kind(from._internal_kind());
1168 }
1169 if (from.cardinality() != 0) {
1170 _internal_set_cardinality(from._internal_cardinality());
1171 }
1172 if (from.number() != 0) {
1173 _internal_set_number(from._internal_number());
1174 }
1175 if (from.oneof_index() != 0) {
1176 _internal_set_oneof_index(from._internal_oneof_index());
1177 }
1178 if (from.packed() != 0) {
1179 _internal_set_packed(from._internal_packed());
1180 }
1181 }
1182
CopyFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)1183 void Field::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1184 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Field)
1185 if (&from == this) return;
1186 Clear();
1187 MergeFrom(from);
1188 }
1189
CopyFrom(const Field & from)1190 void Field::CopyFrom(const Field& from) {
1191 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Field)
1192 if (&from == this) return;
1193 Clear();
1194 MergeFrom(from);
1195 }
1196
IsInitialized() const1197 bool Field::IsInitialized() const {
1198 return true;
1199 }
1200
InternalSwap(Field * other)1201 void Field::InternalSwap(Field* other) {
1202 using std::swap;
1203 _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
1204 options_.InternalSwap(&other->options_);
1205 name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
1206 type_url_.Swap(&other->type_url_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
1207 json_name_.Swap(&other->json_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
1208 default_value_.Swap(&other->default_value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
1209 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1210 PROTOBUF_FIELD_OFFSET(Field, packed_)
1211 + sizeof(Field::packed_)
1212 - PROTOBUF_FIELD_OFFSET(Field, kind_)>(
1213 reinterpret_cast<char*>(&kind_),
1214 reinterpret_cast<char*>(&other->kind_));
1215 }
1216
GetMetadata() const1217 ::PROTOBUF_NAMESPACE_ID::Metadata Field::GetMetadata() const {
1218 return GetMetadataStatic();
1219 }
1220
1221
1222 // ===================================================================
1223
1224 class Enum::_Internal {
1225 public:
1226 static const PROTOBUF_NAMESPACE_ID::SourceContext& source_context(const Enum* msg);
1227 };
1228
1229 const PROTOBUF_NAMESPACE_ID::SourceContext&
source_context(const Enum * msg)1230 Enum::_Internal::source_context(const Enum* msg) {
1231 return *msg->source_context_;
1232 }
clear_source_context()1233 void Enum::clear_source_context() {
1234 if (GetArena() == nullptr && source_context_ != nullptr) {
1235 delete source_context_;
1236 }
1237 source_context_ = nullptr;
1238 }
Enum(::PROTOBUF_NAMESPACE_ID::Arena * arena)1239 Enum::Enum(::PROTOBUF_NAMESPACE_ID::Arena* arena)
1240 : ::PROTOBUF_NAMESPACE_ID::Message(arena),
1241 enumvalue_(arena),
1242 options_(arena) {
1243 SharedCtor();
1244 RegisterArenaDtor(arena);
1245 // @@protoc_insertion_point(arena_constructor:google.protobuf.Enum)
1246 }
Enum(const Enum & from)1247 Enum::Enum(const Enum& from)
1248 : ::PROTOBUF_NAMESPACE_ID::Message(),
1249 enumvalue_(from.enumvalue_),
1250 options_(from.options_) {
1251 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
1252 name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1253 if (!from._internal_name().empty()) {
1254 name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
1255 GetArena());
1256 }
1257 if (from._internal_has_source_context()) {
1258 source_context_ = new PROTOBUF_NAMESPACE_ID::SourceContext(*from.source_context_);
1259 } else {
1260 source_context_ = nullptr;
1261 }
1262 syntax_ = from.syntax_;
1263 // @@protoc_insertion_point(copy_constructor:google.protobuf.Enum)
1264 }
1265
SharedCtor()1266 void Enum::SharedCtor() {
1267 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Enum_google_2fprotobuf_2ftype_2eproto.base);
1268 name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1269 ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
1270 reinterpret_cast<char*>(&source_context_) - reinterpret_cast<char*>(this)),
1271 0, static_cast<size_t>(reinterpret_cast<char*>(&syntax_) -
1272 reinterpret_cast<char*>(&source_context_)) + sizeof(syntax_));
1273 }
1274
~Enum()1275 Enum::~Enum() {
1276 // @@protoc_insertion_point(destructor:google.protobuf.Enum)
1277 SharedDtor();
1278 _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
1279 }
1280
SharedDtor()1281 void Enum::SharedDtor() {
1282 GOOGLE_DCHECK(GetArena() == nullptr);
1283 name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1284 if (this != internal_default_instance()) delete source_context_;
1285 }
1286
ArenaDtor(void * object)1287 void Enum::ArenaDtor(void* object) {
1288 Enum* _this = reinterpret_cast< Enum* >(object);
1289 (void)_this;
1290 }
RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *)1291 void Enum::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
1292 }
SetCachedSize(int size) const1293 void Enum::SetCachedSize(int size) const {
1294 _cached_size_.Set(size);
1295 }
default_instance()1296 const Enum& Enum::default_instance() {
1297 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Enum_google_2fprotobuf_2ftype_2eproto.base);
1298 return *internal_default_instance();
1299 }
1300
1301
Clear()1302 void Enum::Clear() {
1303 // @@protoc_insertion_point(message_clear_start:google.protobuf.Enum)
1304 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1305 // Prevent compiler warnings about cached_has_bits being unused
1306 (void) cached_has_bits;
1307
1308 enumvalue_.Clear();
1309 options_.Clear();
1310 name_.ClearToEmpty();
1311 if (GetArena() == nullptr && source_context_ != nullptr) {
1312 delete source_context_;
1313 }
1314 source_context_ = nullptr;
1315 syntax_ = 0;
1316 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
1317 }
1318
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)1319 const char* Enum::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
1320 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1321 while (!ctx->Done(&ptr)) {
1322 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1323 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
1324 CHK_(ptr);
1325 switch (tag >> 3) {
1326 // string name = 1;
1327 case 1:
1328 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
1329 auto str = _internal_mutable_name();
1330 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
1331 CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Enum.name"));
1332 CHK_(ptr);
1333 } else goto handle_unusual;
1334 continue;
1335 // repeated .google.protobuf.EnumValue enumvalue = 2;
1336 case 2:
1337 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
1338 ptr -= 1;
1339 do {
1340 ptr += 1;
1341 ptr = ctx->ParseMessage(_internal_add_enumvalue(), ptr);
1342 CHK_(ptr);
1343 if (!ctx->DataAvailable(ptr)) break;
1344 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
1345 } else goto handle_unusual;
1346 continue;
1347 // repeated .google.protobuf.Option options = 3;
1348 case 3:
1349 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
1350 ptr -= 1;
1351 do {
1352 ptr += 1;
1353 ptr = ctx->ParseMessage(_internal_add_options(), ptr);
1354 CHK_(ptr);
1355 if (!ctx->DataAvailable(ptr)) break;
1356 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
1357 } else goto handle_unusual;
1358 continue;
1359 // .google.protobuf.SourceContext source_context = 4;
1360 case 4:
1361 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
1362 ptr = ctx->ParseMessage(_internal_mutable_source_context(), ptr);
1363 CHK_(ptr);
1364 } else goto handle_unusual;
1365 continue;
1366 // .google.protobuf.Syntax syntax = 5;
1367 case 5:
1368 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
1369 ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1370 CHK_(ptr);
1371 _internal_set_syntax(static_cast<PROTOBUF_NAMESPACE_ID::Syntax>(val));
1372 } else goto handle_unusual;
1373 continue;
1374 default: {
1375 handle_unusual:
1376 if ((tag & 7) == 4 || tag == 0) {
1377 ctx->SetLastTag(tag);
1378 goto success;
1379 }
1380 ptr = UnknownFieldParse(tag,
1381 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
1382 ptr, ctx);
1383 CHK_(ptr != nullptr);
1384 continue;
1385 }
1386 } // switch
1387 } // while
1388 success:
1389 return ptr;
1390 failure:
1391 ptr = nullptr;
1392 goto success;
1393 #undef CHK_
1394 }
1395
_InternalSerialize(::PROTOBUF_NAMESPACE_ID::uint8 * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1396 ::PROTOBUF_NAMESPACE_ID::uint8* Enum::_InternalSerialize(
1397 ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1398 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Enum)
1399 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1400 (void) cached_has_bits;
1401
1402 // string name = 1;
1403 if (this->name().size() > 0) {
1404 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1405 this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
1406 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1407 "google.protobuf.Enum.name");
1408 target = stream->WriteStringMaybeAliased(
1409 1, this->_internal_name(), target);
1410 }
1411
1412 // repeated .google.protobuf.EnumValue enumvalue = 2;
1413 for (unsigned int i = 0,
1414 n = static_cast<unsigned int>(this->_internal_enumvalue_size()); i < n; i++) {
1415 target = stream->EnsureSpace(target);
1416 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1417 InternalWriteMessage(2, this->_internal_enumvalue(i), target, stream);
1418 }
1419
1420 // repeated .google.protobuf.Option options = 3;
1421 for (unsigned int i = 0,
1422 n = static_cast<unsigned int>(this->_internal_options_size()); i < n; i++) {
1423 target = stream->EnsureSpace(target);
1424 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1425 InternalWriteMessage(3, this->_internal_options(i), target, stream);
1426 }
1427
1428 // .google.protobuf.SourceContext source_context = 4;
1429 if (this->has_source_context()) {
1430 target = stream->EnsureSpace(target);
1431 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1432 InternalWriteMessage(
1433 4, _Internal::source_context(this), target, stream);
1434 }
1435
1436 // .google.protobuf.Syntax syntax = 5;
1437 if (this->syntax() != 0) {
1438 target = stream->EnsureSpace(target);
1439 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
1440 5, this->_internal_syntax(), target);
1441 }
1442
1443 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1444 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
1445 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
1446 }
1447 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Enum)
1448 return target;
1449 }
1450
ByteSizeLong() const1451 size_t Enum::ByteSizeLong() const {
1452 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Enum)
1453 size_t total_size = 0;
1454
1455 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1456 // Prevent compiler warnings about cached_has_bits being unused
1457 (void) cached_has_bits;
1458
1459 // repeated .google.protobuf.EnumValue enumvalue = 2;
1460 total_size += 1UL * this->_internal_enumvalue_size();
1461 for (const auto& msg : this->enumvalue_) {
1462 total_size +=
1463 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1464 }
1465
1466 // repeated .google.protobuf.Option options = 3;
1467 total_size += 1UL * this->_internal_options_size();
1468 for (const auto& msg : this->options_) {
1469 total_size +=
1470 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1471 }
1472
1473 // string name = 1;
1474 if (this->name().size() > 0) {
1475 total_size += 1 +
1476 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1477 this->_internal_name());
1478 }
1479
1480 // .google.protobuf.SourceContext source_context = 4;
1481 if (this->has_source_context()) {
1482 total_size += 1 +
1483 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1484 *source_context_);
1485 }
1486
1487 // .google.protobuf.Syntax syntax = 5;
1488 if (this->syntax() != 0) {
1489 total_size += 1 +
1490 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_syntax());
1491 }
1492
1493 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1494 return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
1495 _internal_metadata_, total_size, &_cached_size_);
1496 }
1497 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
1498 SetCachedSize(cached_size);
1499 return total_size;
1500 }
1501
MergeFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)1502 void Enum::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1503 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Enum)
1504 GOOGLE_DCHECK_NE(&from, this);
1505 const Enum* source =
1506 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Enum>(
1507 &from);
1508 if (source == nullptr) {
1509 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Enum)
1510 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
1511 } else {
1512 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Enum)
1513 MergeFrom(*source);
1514 }
1515 }
1516
MergeFrom(const Enum & from)1517 void Enum::MergeFrom(const Enum& from) {
1518 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Enum)
1519 GOOGLE_DCHECK_NE(&from, this);
1520 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
1521 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1522 (void) cached_has_bits;
1523
1524 enumvalue_.MergeFrom(from.enumvalue_);
1525 options_.MergeFrom(from.options_);
1526 if (from.name().size() > 0) {
1527 _internal_set_name(from._internal_name());
1528 }
1529 if (from.has_source_context()) {
1530 _internal_mutable_source_context()->PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(from._internal_source_context());
1531 }
1532 if (from.syntax() != 0) {
1533 _internal_set_syntax(from._internal_syntax());
1534 }
1535 }
1536
CopyFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)1537 void Enum::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1538 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Enum)
1539 if (&from == this) return;
1540 Clear();
1541 MergeFrom(from);
1542 }
1543
CopyFrom(const Enum & from)1544 void Enum::CopyFrom(const Enum& from) {
1545 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Enum)
1546 if (&from == this) return;
1547 Clear();
1548 MergeFrom(from);
1549 }
1550
IsInitialized() const1551 bool Enum::IsInitialized() const {
1552 return true;
1553 }
1554
InternalSwap(Enum * other)1555 void Enum::InternalSwap(Enum* other) {
1556 using std::swap;
1557 _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
1558 enumvalue_.InternalSwap(&other->enumvalue_);
1559 options_.InternalSwap(&other->options_);
1560 name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
1561 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1562 PROTOBUF_FIELD_OFFSET(Enum, syntax_)
1563 + sizeof(Enum::syntax_)
1564 - PROTOBUF_FIELD_OFFSET(Enum, source_context_)>(
1565 reinterpret_cast<char*>(&source_context_),
1566 reinterpret_cast<char*>(&other->source_context_));
1567 }
1568
GetMetadata() const1569 ::PROTOBUF_NAMESPACE_ID::Metadata Enum::GetMetadata() const {
1570 return GetMetadataStatic();
1571 }
1572
1573
1574 // ===================================================================
1575
1576 class EnumValue::_Internal {
1577 public:
1578 };
1579
EnumValue(::PROTOBUF_NAMESPACE_ID::Arena * arena)1580 EnumValue::EnumValue(::PROTOBUF_NAMESPACE_ID::Arena* arena)
1581 : ::PROTOBUF_NAMESPACE_ID::Message(arena),
1582 options_(arena) {
1583 SharedCtor();
1584 RegisterArenaDtor(arena);
1585 // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumValue)
1586 }
EnumValue(const EnumValue & from)1587 EnumValue::EnumValue(const EnumValue& from)
1588 : ::PROTOBUF_NAMESPACE_ID::Message(),
1589 options_(from.options_) {
1590 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
1591 name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1592 if (!from._internal_name().empty()) {
1593 name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
1594 GetArena());
1595 }
1596 number_ = from.number_;
1597 // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValue)
1598 }
1599
SharedCtor()1600 void EnumValue::SharedCtor() {
1601 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_EnumValue_google_2fprotobuf_2ftype_2eproto.base);
1602 name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1603 number_ = 0;
1604 }
1605
~EnumValue()1606 EnumValue::~EnumValue() {
1607 // @@protoc_insertion_point(destructor:google.protobuf.EnumValue)
1608 SharedDtor();
1609 _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
1610 }
1611
SharedDtor()1612 void EnumValue::SharedDtor() {
1613 GOOGLE_DCHECK(GetArena() == nullptr);
1614 name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1615 }
1616
ArenaDtor(void * object)1617 void EnumValue::ArenaDtor(void* object) {
1618 EnumValue* _this = reinterpret_cast< EnumValue* >(object);
1619 (void)_this;
1620 }
RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *)1621 void EnumValue::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
1622 }
SetCachedSize(int size) const1623 void EnumValue::SetCachedSize(int size) const {
1624 _cached_size_.Set(size);
1625 }
default_instance()1626 const EnumValue& EnumValue::default_instance() {
1627 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_EnumValue_google_2fprotobuf_2ftype_2eproto.base);
1628 return *internal_default_instance();
1629 }
1630
1631
Clear()1632 void EnumValue::Clear() {
1633 // @@protoc_insertion_point(message_clear_start:google.protobuf.EnumValue)
1634 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1635 // Prevent compiler warnings about cached_has_bits being unused
1636 (void) cached_has_bits;
1637
1638 options_.Clear();
1639 name_.ClearToEmpty();
1640 number_ = 0;
1641 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
1642 }
1643
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)1644 const char* EnumValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
1645 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1646 while (!ctx->Done(&ptr)) {
1647 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1648 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
1649 CHK_(ptr);
1650 switch (tag >> 3) {
1651 // string name = 1;
1652 case 1:
1653 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
1654 auto str = _internal_mutable_name();
1655 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
1656 CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.EnumValue.name"));
1657 CHK_(ptr);
1658 } else goto handle_unusual;
1659 continue;
1660 // int32 number = 2;
1661 case 2:
1662 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
1663 number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1664 CHK_(ptr);
1665 } else goto handle_unusual;
1666 continue;
1667 // repeated .google.protobuf.Option options = 3;
1668 case 3:
1669 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
1670 ptr -= 1;
1671 do {
1672 ptr += 1;
1673 ptr = ctx->ParseMessage(_internal_add_options(), ptr);
1674 CHK_(ptr);
1675 if (!ctx->DataAvailable(ptr)) break;
1676 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
1677 } else goto handle_unusual;
1678 continue;
1679 default: {
1680 handle_unusual:
1681 if ((tag & 7) == 4 || tag == 0) {
1682 ctx->SetLastTag(tag);
1683 goto success;
1684 }
1685 ptr = UnknownFieldParse(tag,
1686 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
1687 ptr, ctx);
1688 CHK_(ptr != nullptr);
1689 continue;
1690 }
1691 } // switch
1692 } // while
1693 success:
1694 return ptr;
1695 failure:
1696 ptr = nullptr;
1697 goto success;
1698 #undef CHK_
1699 }
1700
_InternalSerialize(::PROTOBUF_NAMESPACE_ID::uint8 * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1701 ::PROTOBUF_NAMESPACE_ID::uint8* EnumValue::_InternalSerialize(
1702 ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1703 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValue)
1704 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1705 (void) cached_has_bits;
1706
1707 // string name = 1;
1708 if (this->name().size() > 0) {
1709 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1710 this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
1711 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1712 "google.protobuf.EnumValue.name");
1713 target = stream->WriteStringMaybeAliased(
1714 1, this->_internal_name(), target);
1715 }
1716
1717 // int32 number = 2;
1718 if (this->number() != 0) {
1719 target = stream->EnsureSpace(target);
1720 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_number(), target);
1721 }
1722
1723 // repeated .google.protobuf.Option options = 3;
1724 for (unsigned int i = 0,
1725 n = static_cast<unsigned int>(this->_internal_options_size()); i < n; i++) {
1726 target = stream->EnsureSpace(target);
1727 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1728 InternalWriteMessage(3, this->_internal_options(i), target, stream);
1729 }
1730
1731 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1732 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
1733 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
1734 }
1735 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValue)
1736 return target;
1737 }
1738
ByteSizeLong() const1739 size_t EnumValue::ByteSizeLong() const {
1740 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumValue)
1741 size_t total_size = 0;
1742
1743 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1744 // Prevent compiler warnings about cached_has_bits being unused
1745 (void) cached_has_bits;
1746
1747 // repeated .google.protobuf.Option options = 3;
1748 total_size += 1UL * this->_internal_options_size();
1749 for (const auto& msg : this->options_) {
1750 total_size +=
1751 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1752 }
1753
1754 // string name = 1;
1755 if (this->name().size() > 0) {
1756 total_size += 1 +
1757 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1758 this->_internal_name());
1759 }
1760
1761 // int32 number = 2;
1762 if (this->number() != 0) {
1763 total_size += 1 +
1764 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1765 this->_internal_number());
1766 }
1767
1768 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1769 return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
1770 _internal_metadata_, total_size, &_cached_size_);
1771 }
1772 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
1773 SetCachedSize(cached_size);
1774 return total_size;
1775 }
1776
MergeFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)1777 void EnumValue::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1778 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.EnumValue)
1779 GOOGLE_DCHECK_NE(&from, this);
1780 const EnumValue* source =
1781 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<EnumValue>(
1782 &from);
1783 if (source == nullptr) {
1784 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.EnumValue)
1785 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
1786 } else {
1787 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.EnumValue)
1788 MergeFrom(*source);
1789 }
1790 }
1791
MergeFrom(const EnumValue & from)1792 void EnumValue::MergeFrom(const EnumValue& from) {
1793 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValue)
1794 GOOGLE_DCHECK_NE(&from, this);
1795 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
1796 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1797 (void) cached_has_bits;
1798
1799 options_.MergeFrom(from.options_);
1800 if (from.name().size() > 0) {
1801 _internal_set_name(from._internal_name());
1802 }
1803 if (from.number() != 0) {
1804 _internal_set_number(from._internal_number());
1805 }
1806 }
1807
CopyFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)1808 void EnumValue::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1809 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.EnumValue)
1810 if (&from == this) return;
1811 Clear();
1812 MergeFrom(from);
1813 }
1814
CopyFrom(const EnumValue & from)1815 void EnumValue::CopyFrom(const EnumValue& from) {
1816 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.EnumValue)
1817 if (&from == this) return;
1818 Clear();
1819 MergeFrom(from);
1820 }
1821
IsInitialized() const1822 bool EnumValue::IsInitialized() const {
1823 return true;
1824 }
1825
InternalSwap(EnumValue * other)1826 void EnumValue::InternalSwap(EnumValue* other) {
1827 using std::swap;
1828 _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
1829 options_.InternalSwap(&other->options_);
1830 name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
1831 swap(number_, other->number_);
1832 }
1833
GetMetadata() const1834 ::PROTOBUF_NAMESPACE_ID::Metadata EnumValue::GetMetadata() const {
1835 return GetMetadataStatic();
1836 }
1837
1838
1839 // ===================================================================
1840
1841 class Option::_Internal {
1842 public:
1843 static const PROTOBUF_NAMESPACE_ID::Any& value(const Option* msg);
1844 };
1845
1846 const PROTOBUF_NAMESPACE_ID::Any&
value(const Option * msg)1847 Option::_Internal::value(const Option* msg) {
1848 return *msg->value_;
1849 }
clear_value()1850 void Option::clear_value() {
1851 if (GetArena() == nullptr && value_ != nullptr) {
1852 delete value_;
1853 }
1854 value_ = nullptr;
1855 }
Option(::PROTOBUF_NAMESPACE_ID::Arena * arena)1856 Option::Option(::PROTOBUF_NAMESPACE_ID::Arena* arena)
1857 : ::PROTOBUF_NAMESPACE_ID::Message(arena) {
1858 SharedCtor();
1859 RegisterArenaDtor(arena);
1860 // @@protoc_insertion_point(arena_constructor:google.protobuf.Option)
1861 }
Option(const Option & from)1862 Option::Option(const Option& from)
1863 : ::PROTOBUF_NAMESPACE_ID::Message() {
1864 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
1865 name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1866 if (!from._internal_name().empty()) {
1867 name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
1868 GetArena());
1869 }
1870 if (from._internal_has_value()) {
1871 value_ = new PROTOBUF_NAMESPACE_ID::Any(*from.value_);
1872 } else {
1873 value_ = nullptr;
1874 }
1875 // @@protoc_insertion_point(copy_constructor:google.protobuf.Option)
1876 }
1877
SharedCtor()1878 void Option::SharedCtor() {
1879 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Option_google_2fprotobuf_2ftype_2eproto.base);
1880 name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1881 value_ = nullptr;
1882 }
1883
~Option()1884 Option::~Option() {
1885 // @@protoc_insertion_point(destructor:google.protobuf.Option)
1886 SharedDtor();
1887 _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
1888 }
1889
SharedDtor()1890 void Option::SharedDtor() {
1891 GOOGLE_DCHECK(GetArena() == nullptr);
1892 name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1893 if (this != internal_default_instance()) delete value_;
1894 }
1895
ArenaDtor(void * object)1896 void Option::ArenaDtor(void* object) {
1897 Option* _this = reinterpret_cast< Option* >(object);
1898 (void)_this;
1899 }
RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *)1900 void Option::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
1901 }
SetCachedSize(int size) const1902 void Option::SetCachedSize(int size) const {
1903 _cached_size_.Set(size);
1904 }
default_instance()1905 const Option& Option::default_instance() {
1906 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Option_google_2fprotobuf_2ftype_2eproto.base);
1907 return *internal_default_instance();
1908 }
1909
1910
Clear()1911 void Option::Clear() {
1912 // @@protoc_insertion_point(message_clear_start:google.protobuf.Option)
1913 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1914 // Prevent compiler warnings about cached_has_bits being unused
1915 (void) cached_has_bits;
1916
1917 name_.ClearToEmpty();
1918 if (GetArena() == nullptr && value_ != nullptr) {
1919 delete value_;
1920 }
1921 value_ = nullptr;
1922 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
1923 }
1924
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)1925 const char* Option::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
1926 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1927 while (!ctx->Done(&ptr)) {
1928 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1929 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
1930 CHK_(ptr);
1931 switch (tag >> 3) {
1932 // string name = 1;
1933 case 1:
1934 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
1935 auto str = _internal_mutable_name();
1936 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
1937 CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Option.name"));
1938 CHK_(ptr);
1939 } else goto handle_unusual;
1940 continue;
1941 // .google.protobuf.Any value = 2;
1942 case 2:
1943 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
1944 ptr = ctx->ParseMessage(_internal_mutable_value(), ptr);
1945 CHK_(ptr);
1946 } else goto handle_unusual;
1947 continue;
1948 default: {
1949 handle_unusual:
1950 if ((tag & 7) == 4 || tag == 0) {
1951 ctx->SetLastTag(tag);
1952 goto success;
1953 }
1954 ptr = UnknownFieldParse(tag,
1955 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
1956 ptr, ctx);
1957 CHK_(ptr != nullptr);
1958 continue;
1959 }
1960 } // switch
1961 } // while
1962 success:
1963 return ptr;
1964 failure:
1965 ptr = nullptr;
1966 goto success;
1967 #undef CHK_
1968 }
1969
_InternalSerialize(::PROTOBUF_NAMESPACE_ID::uint8 * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1970 ::PROTOBUF_NAMESPACE_ID::uint8* Option::_InternalSerialize(
1971 ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1972 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Option)
1973 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1974 (void) cached_has_bits;
1975
1976 // string name = 1;
1977 if (this->name().size() > 0) {
1978 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1979 this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
1980 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1981 "google.protobuf.Option.name");
1982 target = stream->WriteStringMaybeAliased(
1983 1, this->_internal_name(), target);
1984 }
1985
1986 // .google.protobuf.Any value = 2;
1987 if (this->has_value()) {
1988 target = stream->EnsureSpace(target);
1989 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1990 InternalWriteMessage(
1991 2, _Internal::value(this), target, stream);
1992 }
1993
1994 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1995 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
1996 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
1997 }
1998 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Option)
1999 return target;
2000 }
2001
ByteSizeLong() const2002 size_t Option::ByteSizeLong() const {
2003 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Option)
2004 size_t total_size = 0;
2005
2006 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
2007 // Prevent compiler warnings about cached_has_bits being unused
2008 (void) cached_has_bits;
2009
2010 // string name = 1;
2011 if (this->name().size() > 0) {
2012 total_size += 1 +
2013 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2014 this->_internal_name());
2015 }
2016
2017 // .google.protobuf.Any value = 2;
2018 if (this->has_value()) {
2019 total_size += 1 +
2020 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2021 *value_);
2022 }
2023
2024 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2025 return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
2026 _internal_metadata_, total_size, &_cached_size_);
2027 }
2028 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
2029 SetCachedSize(cached_size);
2030 return total_size;
2031 }
2032
MergeFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)2033 void Option::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
2034 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Option)
2035 GOOGLE_DCHECK_NE(&from, this);
2036 const Option* source =
2037 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Option>(
2038 &from);
2039 if (source == nullptr) {
2040 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Option)
2041 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
2042 } else {
2043 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Option)
2044 MergeFrom(*source);
2045 }
2046 }
2047
MergeFrom(const Option & from)2048 void Option::MergeFrom(const Option& from) {
2049 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Option)
2050 GOOGLE_DCHECK_NE(&from, this);
2051 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
2052 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
2053 (void) cached_has_bits;
2054
2055 if (from.name().size() > 0) {
2056 _internal_set_name(from._internal_name());
2057 }
2058 if (from.has_value()) {
2059 _internal_mutable_value()->PROTOBUF_NAMESPACE_ID::Any::MergeFrom(from._internal_value());
2060 }
2061 }
2062
CopyFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)2063 void Option::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
2064 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Option)
2065 if (&from == this) return;
2066 Clear();
2067 MergeFrom(from);
2068 }
2069
CopyFrom(const Option & from)2070 void Option::CopyFrom(const Option& from) {
2071 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Option)
2072 if (&from == this) return;
2073 Clear();
2074 MergeFrom(from);
2075 }
2076
IsInitialized() const2077 bool Option::IsInitialized() const {
2078 return true;
2079 }
2080
InternalSwap(Option * other)2081 void Option::InternalSwap(Option* other) {
2082 using std::swap;
2083 _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
2084 name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
2085 swap(value_, other->value_);
2086 }
2087
GetMetadata() const2088 ::PROTOBUF_NAMESPACE_ID::Metadata Option::GetMetadata() const {
2089 return GetMetadataStatic();
2090 }
2091
2092
2093 // @@protoc_insertion_point(namespace_scope)
2094 PROTOBUF_NAMESPACE_CLOSE
2095 PROTOBUF_NAMESPACE_OPEN
CreateMaybeMessage(Arena * arena)2096 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Type* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Type >(Arena* arena) {
2097 return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Type >(arena);
2098 }
CreateMaybeMessage(Arena * arena)2099 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Field* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Field >(Arena* arena) {
2100 return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Field >(arena);
2101 }
CreateMaybeMessage(Arena * arena)2102 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Enum* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Enum >(Arena* arena) {
2103 return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Enum >(arena);
2104 }
CreateMaybeMessage(Arena * arena)2105 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::EnumValue* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::EnumValue >(Arena* arena) {
2106 return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::EnumValue >(arena);
2107 }
CreateMaybeMessage(Arena * arena)2108 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Option* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Option >(Arena* arena) {
2109 return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Option >(arena);
2110 }
2111 PROTOBUF_NAMESPACE_CLOSE
2112
2113 // @@protoc_insertion_point(global_scope)
2114 #include <google/protobuf/port_undef.inc>
2115