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