type.pb.cc 79 KB

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