api.pb.cc 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/api.proto
  3. #include "google/protobuf/api.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. // Must be included last.
  14. #include "google/protobuf/port_def.inc"
  15. PROTOBUF_PRAGMA_INIT_SEG
  16. namespace _pb = ::PROTOBUF_NAMESPACE_ID;
  17. namespace _pbi = ::PROTOBUF_NAMESPACE_ID::internal;
  18. PROTOBUF_NAMESPACE_OPEN
  19. PROTOBUF_CONSTEXPR Api::Api(
  20. ::_pbi::ConstantInitialized): _impl_{
  21. /*decltype(_impl_.methods_)*/{}
  22. , /*decltype(_impl_.options_)*/{}
  23. , /*decltype(_impl_.mixins_)*/{}
  24. , /*decltype(_impl_.name_)*/ {
  25. &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  26. }
  27. , /*decltype(_impl_.version_)*/ {
  28. &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  29. }
  30. , /*decltype(_impl_.source_context_)*/nullptr
  31. , /*decltype(_impl_.syntax_)*/ 0
  32. , /*decltype(_impl_._cached_size_)*/{}} {}
  33. struct ApiDefaultTypeInternal {
  34. PROTOBUF_CONSTEXPR ApiDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  35. ~ApiDefaultTypeInternal() {}
  36. union {
  37. Api _instance;
  38. };
  39. };
  40. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  41. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ApiDefaultTypeInternal _Api_default_instance_;
  42. PROTOBUF_CONSTEXPR Method::Method(
  43. ::_pbi::ConstantInitialized): _impl_{
  44. /*decltype(_impl_.options_)*/{}
  45. , /*decltype(_impl_.name_)*/ {
  46. &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  47. }
  48. , /*decltype(_impl_.request_type_url_)*/ {
  49. &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  50. }
  51. , /*decltype(_impl_.response_type_url_)*/ {
  52. &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  53. }
  54. , /*decltype(_impl_.request_streaming_)*/ false
  55. , /*decltype(_impl_.response_streaming_)*/ false
  56. , /*decltype(_impl_.syntax_)*/ 0
  57. , /*decltype(_impl_._cached_size_)*/{}} {}
  58. struct MethodDefaultTypeInternal {
  59. PROTOBUF_CONSTEXPR MethodDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  60. ~MethodDefaultTypeInternal() {}
  61. union {
  62. Method _instance;
  63. };
  64. };
  65. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  66. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MethodDefaultTypeInternal _Method_default_instance_;
  67. PROTOBUF_CONSTEXPR Mixin::Mixin(
  68. ::_pbi::ConstantInitialized): _impl_{
  69. /*decltype(_impl_.name_)*/ {
  70. &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  71. }
  72. , /*decltype(_impl_.root_)*/ {
  73. &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  74. }
  75. , /*decltype(_impl_._cached_size_)*/{}} {}
  76. struct MixinDefaultTypeInternal {
  77. PROTOBUF_CONSTEXPR MixinDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  78. ~MixinDefaultTypeInternal() {}
  79. union {
  80. Mixin _instance;
  81. };
  82. };
  83. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  84. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MixinDefaultTypeInternal _Mixin_default_instance_;
  85. PROTOBUF_NAMESPACE_CLOSE
  86. static ::_pb::Metadata file_level_metadata_google_2fprotobuf_2fapi_2eproto[3];
  87. static constexpr const ::_pb::EnumDescriptor**
  88. file_level_enum_descriptors_google_2fprotobuf_2fapi_2eproto = nullptr;
  89. static constexpr const ::_pb::ServiceDescriptor**
  90. file_level_service_descriptors_google_2fprotobuf_2fapi_2eproto = nullptr;
  91. const ::uint32_t TableStruct_google_2fprotobuf_2fapi_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(
  92. protodesc_cold) = {
  93. ~0u, // no _has_bits_
  94. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, _internal_metadata_),
  95. ~0u, // no _extensions_
  96. ~0u, // no _oneof_case_
  97. ~0u, // no _weak_field_map_
  98. ~0u, // no _inlined_string_donated_
  99. ~0u, // no _split_
  100. ~0u, // no sizeof(Split)
  101. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, _impl_.name_),
  102. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, _impl_.methods_),
  103. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, _impl_.options_),
  104. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, _impl_.version_),
  105. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, _impl_.source_context_),
  106. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, _impl_.mixins_),
  107. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, _impl_.syntax_),
  108. ~0u, // no _has_bits_
  109. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, _internal_metadata_),
  110. ~0u, // no _extensions_
  111. ~0u, // no _oneof_case_
  112. ~0u, // no _weak_field_map_
  113. ~0u, // no _inlined_string_donated_
  114. ~0u, // no _split_
  115. ~0u, // no sizeof(Split)
  116. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, _impl_.name_),
  117. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, _impl_.request_type_url_),
  118. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, _impl_.request_streaming_),
  119. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, _impl_.response_type_url_),
  120. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, _impl_.response_streaming_),
  121. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, _impl_.options_),
  122. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, _impl_.syntax_),
  123. ~0u, // no _has_bits_
  124. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Mixin, _internal_metadata_),
  125. ~0u, // no _extensions_
  126. ~0u, // no _oneof_case_
  127. ~0u, // no _weak_field_map_
  128. ~0u, // no _inlined_string_donated_
  129. ~0u, // no _split_
  130. ~0u, // no sizeof(Split)
  131. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Mixin, _impl_.name_),
  132. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Mixin, _impl_.root_),
  133. };
  134. static const ::_pbi::MigrationSchema
  135. schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  136. { 0, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Api)},
  137. { 15, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Method)},
  138. { 30, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Mixin)},
  139. };
  140. static const ::_pb::Message* const file_default_instances[] = {
  141. &::PROTOBUF_NAMESPACE_ID::_Api_default_instance_._instance,
  142. &::PROTOBUF_NAMESPACE_ID::_Method_default_instance_._instance,
  143. &::PROTOBUF_NAMESPACE_ID::_Mixin_default_instance_._instance,
  144. };
  145. const char descriptor_table_protodef_google_2fprotobuf_2fapi_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  146. "\n\031google/protobuf/api.proto\022\017google.prot"
  147. "obuf\032$google/protobuf/source_context.pro"
  148. "to\032\032google/protobuf/type.proto\"\201\002\n\003Api\022\014"
  149. "\n\004name\030\001 \001(\t\022(\n\007methods\030\002 \003(\0132\027.google.p"
  150. "rotobuf.Method\022(\n\007options\030\003 \003(\0132\027.google"
  151. ".protobuf.Option\022\017\n\007version\030\004 \001(\t\0226\n\016sou"
  152. "rce_context\030\005 \001(\0132\036.google.protobuf.Sour"
  153. "ceContext\022&\n\006mixins\030\006 \003(\0132\026.google.proto"
  154. "buf.Mixin\022\'\n\006syntax\030\007 \001(\0162\027.google.proto"
  155. "buf.Syntax\"\325\001\n\006Method\022\014\n\004name\030\001 \001(\t\022\030\n\020r"
  156. "equest_type_url\030\002 \001(\t\022\031\n\021request_streami"
  157. "ng\030\003 \001(\010\022\031\n\021response_type_url\030\004 \001(\t\022\032\n\022r"
  158. "esponse_streaming\030\005 \001(\010\022(\n\007options\030\006 \003(\013"
  159. "2\027.google.protobuf.Option\022\'\n\006syntax\030\007 \001("
  160. "\0162\027.google.protobuf.Syntax\"#\n\005Mixin\022\014\n\004n"
  161. "ame\030\001 \001(\t\022\014\n\004root\030\002 \001(\tBv\n\023com.google.pr"
  162. "otobufB\010ApiProtoP\001Z,google.golang.org/pr"
  163. "otobuf/types/known/apipb\242\002\003GPB\252\002\036Google."
  164. "Protobuf.WellKnownTypesb\006proto3"
  165. };
  166. static const ::_pbi::DescriptorTable* const descriptor_table_google_2fprotobuf_2fapi_2eproto_deps[2] =
  167. {
  168. &::descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto,
  169. &::descriptor_table_google_2fprotobuf_2ftype_2eproto,
  170. };
  171. static ::absl::once_flag descriptor_table_google_2fprotobuf_2fapi_2eproto_once;
  172. const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2fapi_2eproto = {
  173. false,
  174. false,
  175. 751,
  176. descriptor_table_protodef_google_2fprotobuf_2fapi_2eproto,
  177. "google/protobuf/api.proto",
  178. &descriptor_table_google_2fprotobuf_2fapi_2eproto_once,
  179. descriptor_table_google_2fprotobuf_2fapi_2eproto_deps,
  180. 2,
  181. 3,
  182. schemas,
  183. file_default_instances,
  184. TableStruct_google_2fprotobuf_2fapi_2eproto::offsets,
  185. file_level_metadata_google_2fprotobuf_2fapi_2eproto,
  186. file_level_enum_descriptors_google_2fprotobuf_2fapi_2eproto,
  187. file_level_service_descriptors_google_2fprotobuf_2fapi_2eproto,
  188. };
  189. // This function exists to be marked as weak.
  190. // It can significantly speed up compilation by breaking up LLVM's SCC
  191. // in the .pb.cc translation units. Large translation units see a
  192. // reduction of more than 35% of walltime for optimized builds. Without
  193. // the weak attribute all the messages in the file, including all the
  194. // vtables and everything they use become part of the same SCC through
  195. // a cycle like:
  196. // GetMetadata -> descriptor table -> default instances ->
  197. // vtables -> GetMetadata
  198. // By adding a weak function here we break the connection from the
  199. // individual vtables back into the descriptor table.
  200. PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_google_2fprotobuf_2fapi_2eproto_getter() {
  201. return &descriptor_table_google_2fprotobuf_2fapi_2eproto;
  202. }
  203. // Force running AddDescriptors() at dynamic initialization time.
  204. PROTOBUF_ATTRIBUTE_INIT_PRIORITY2
  205. static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_google_2fprotobuf_2fapi_2eproto(&descriptor_table_google_2fprotobuf_2fapi_2eproto);
  206. PROTOBUF_NAMESPACE_OPEN
  207. // ===================================================================
  208. class Api::_Internal {
  209. public:
  210. static const ::PROTOBUF_NAMESPACE_ID::SourceContext& source_context(const Api* msg);
  211. };
  212. const ::PROTOBUF_NAMESPACE_ID::SourceContext&
  213. Api::_Internal::source_context(const Api* msg) {
  214. return *msg->_impl_.source_context_;
  215. }
  216. void Api::clear_options() {
  217. _impl_.options_.Clear();
  218. }
  219. void Api::clear_source_context() {
  220. if (GetArenaForAllocation() == nullptr && _impl_.source_context_ != nullptr) {
  221. delete _impl_.source_context_;
  222. }
  223. _impl_.source_context_ = nullptr;
  224. }
  225. Api::Api(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  226. : ::PROTOBUF_NAMESPACE_ID::Message(arena) {
  227. SharedCtor(arena);
  228. // @@protoc_insertion_point(arena_constructor:google.protobuf.Api)
  229. }
  230. Api::Api(const Api& from)
  231. : ::PROTOBUF_NAMESPACE_ID::Message() {
  232. Api* const _this = this; (void)_this;
  233. new (&_impl_) Impl_{
  234. decltype(_impl_.methods_){from._impl_.methods_}
  235. , decltype(_impl_.options_){from._impl_.options_}
  236. , decltype(_impl_.mixins_){from._impl_.mixins_}
  237. , decltype(_impl_.name_) {}
  238. , decltype(_impl_.version_) {}
  239. , decltype(_impl_.source_context_){nullptr}
  240. , decltype(_impl_.syntax_) {}
  241. , /*decltype(_impl_._cached_size_)*/{}};
  242. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  243. _impl_.name_.InitDefault();
  244. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  245. _impl_.name_.Set("", GetArenaForAllocation());
  246. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  247. if (!from._internal_name().empty()) {
  248. _this->_impl_.name_.Set(from._internal_name(), _this->GetArenaForAllocation());
  249. }
  250. _impl_.version_.InitDefault();
  251. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  252. _impl_.version_.Set("", GetArenaForAllocation());
  253. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  254. if (!from._internal_version().empty()) {
  255. _this->_impl_.version_.Set(from._internal_version(), _this->GetArenaForAllocation());
  256. }
  257. if (from._internal_has_source_context()) {
  258. _this->_impl_.source_context_ = new ::PROTOBUF_NAMESPACE_ID::SourceContext(*from._impl_.source_context_);
  259. }
  260. _this->_impl_.syntax_ = from._impl_.syntax_;
  261. // @@protoc_insertion_point(copy_constructor:google.protobuf.Api)
  262. }
  263. inline void Api::SharedCtor(::_pb::Arena* arena) {
  264. (void)arena;
  265. new (&_impl_) Impl_{
  266. decltype(_impl_.methods_){arena}
  267. , decltype(_impl_.options_){arena}
  268. , decltype(_impl_.mixins_){arena}
  269. , decltype(_impl_.name_) {}
  270. , decltype(_impl_.version_) {}
  271. , decltype(_impl_.source_context_){nullptr}
  272. , decltype(_impl_.syntax_) { 0 }
  273. , /*decltype(_impl_._cached_size_)*/{}
  274. };
  275. _impl_.name_.InitDefault();
  276. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  277. _impl_.name_.Set("", GetArenaForAllocation());
  278. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  279. _impl_.version_.InitDefault();
  280. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  281. _impl_.version_.Set("", GetArenaForAllocation());
  282. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  283. }
  284. Api::~Api() {
  285. // @@protoc_insertion_point(destructor:google.protobuf.Api)
  286. if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  287. (void)arena;
  288. return;
  289. }
  290. SharedDtor();
  291. }
  292. inline void Api::SharedDtor() {
  293. ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  294. _impl_.methods_.~RepeatedPtrField();
  295. _impl_.options_.~RepeatedPtrField();
  296. _impl_.mixins_.~RepeatedPtrField();
  297. _impl_.name_.Destroy();
  298. _impl_.version_.Destroy();
  299. if (this != internal_default_instance()) delete _impl_.source_context_;
  300. }
  301. void Api::SetCachedSize(int size) const {
  302. _impl_._cached_size_.Set(size);
  303. }
  304. void Api::Clear() {
  305. // @@protoc_insertion_point(message_clear_start:google.protobuf.Api)
  306. ::uint32_t cached_has_bits = 0;
  307. // Prevent compiler warnings about cached_has_bits being unused
  308. (void) cached_has_bits;
  309. _impl_.methods_.Clear();
  310. _impl_.options_.Clear();
  311. _impl_.mixins_.Clear();
  312. _impl_.name_.ClearToEmpty();
  313. _impl_.version_.ClearToEmpty();
  314. if (GetArenaForAllocation() == nullptr && _impl_.source_context_ != nullptr) {
  315. delete _impl_.source_context_;
  316. }
  317. _impl_.source_context_ = nullptr;
  318. _impl_.syntax_ = 0;
  319. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  320. }
  321. const char* Api::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
  322. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  323. while (!ctx->Done(&ptr)) {
  324. ::uint32_t tag;
  325. ptr = ::_pbi::ReadTag(ptr, &tag);
  326. switch (tag >> 3) {
  327. // string name = 1;
  328. case 1:
  329. if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
  330. auto str = _internal_mutable_name();
  331. ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
  332. CHK_(ptr);
  333. CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.Api.name"));
  334. } else {
  335. goto handle_unusual;
  336. }
  337. continue;
  338. // repeated .google.protobuf.Method methods = 2;
  339. case 2:
  340. if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
  341. ptr -= 1;
  342. do {
  343. ptr += 1;
  344. ptr = ctx->ParseMessage(_internal_add_methods(), ptr);
  345. CHK_(ptr);
  346. if (!ctx->DataAvailable(ptr)) break;
  347. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
  348. } else {
  349. goto handle_unusual;
  350. }
  351. continue;
  352. // repeated .google.protobuf.Option options = 3;
  353. case 3:
  354. if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
  355. ptr -= 1;
  356. do {
  357. ptr += 1;
  358. ptr = ctx->ParseMessage(_internal_add_options(), ptr);
  359. CHK_(ptr);
  360. if (!ctx->DataAvailable(ptr)) break;
  361. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
  362. } else {
  363. goto handle_unusual;
  364. }
  365. continue;
  366. // string version = 4;
  367. case 4:
  368. if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
  369. auto str = _internal_mutable_version();
  370. ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
  371. CHK_(ptr);
  372. CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.Api.version"));
  373. } else {
  374. goto handle_unusual;
  375. }
  376. continue;
  377. // .google.protobuf.SourceContext source_context = 5;
  378. case 5:
  379. if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
  380. ptr = ctx->ParseMessage(_internal_mutable_source_context(), ptr);
  381. CHK_(ptr);
  382. } else {
  383. goto handle_unusual;
  384. }
  385. continue;
  386. // repeated .google.protobuf.Mixin mixins = 6;
  387. case 6:
  388. if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
  389. ptr -= 1;
  390. do {
  391. ptr += 1;
  392. ptr = ctx->ParseMessage(_internal_add_mixins(), ptr);
  393. CHK_(ptr);
  394. if (!ctx->DataAvailable(ptr)) break;
  395. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
  396. } else {
  397. goto handle_unusual;
  398. }
  399. continue;
  400. // .google.protobuf.Syntax syntax = 7;
  401. case 7:
  402. if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
  403. ::uint32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
  404. CHK_(ptr);
  405. _internal_set_syntax(static_cast<::PROTOBUF_NAMESPACE_ID::Syntax>(val));
  406. } else {
  407. goto handle_unusual;
  408. }
  409. continue;
  410. default:
  411. goto handle_unusual;
  412. } // switch
  413. handle_unusual:
  414. if ((tag == 0) || ((tag & 7) == 4)) {
  415. CHK_(ptr);
  416. ctx->SetLastTag(tag);
  417. goto message_done;
  418. }
  419. ptr = UnknownFieldParse(
  420. tag,
  421. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  422. ptr, ctx);
  423. CHK_(ptr != nullptr);
  424. } // while
  425. message_done:
  426. return ptr;
  427. failure:
  428. ptr = nullptr;
  429. goto message_done;
  430. #undef CHK_
  431. }
  432. ::uint8_t* Api::_InternalSerialize(
  433. ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  434. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Api)
  435. ::uint32_t cached_has_bits = 0;
  436. (void) cached_has_bits;
  437. // string name = 1;
  438. if (!this->_internal_name().empty()) {
  439. const std::string& _s = this->_internal_name();
  440. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  441. _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Api.name");
  442. target = stream->WriteStringMaybeAliased(1, _s, target);
  443. }
  444. // repeated .google.protobuf.Method methods = 2;
  445. for (unsigned i = 0,
  446. n = static_cast<unsigned>(this->_internal_methods_size()); i < n; i++) {
  447. const auto& repfield = this->_internal_methods(i);
  448. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  449. InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
  450. }
  451. // repeated .google.protobuf.Option options = 3;
  452. for (unsigned i = 0,
  453. n = static_cast<unsigned>(this->_internal_options_size()); i < n; i++) {
  454. const auto& repfield = this->_internal_options(i);
  455. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  456. InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
  457. }
  458. // string version = 4;
  459. if (!this->_internal_version().empty()) {
  460. const std::string& _s = this->_internal_version();
  461. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  462. _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Api.version");
  463. target = stream->WriteStringMaybeAliased(4, _s, target);
  464. }
  465. // .google.protobuf.SourceContext source_context = 5;
  466. if (this->_internal_has_source_context()) {
  467. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  468. InternalWriteMessage(5, _Internal::source_context(this),
  469. _Internal::source_context(this).GetCachedSize(), target, stream);
  470. }
  471. // repeated .google.protobuf.Mixin mixins = 6;
  472. for (unsigned i = 0,
  473. n = static_cast<unsigned>(this->_internal_mixins_size()); i < n; i++) {
  474. const auto& repfield = this->_internal_mixins(i);
  475. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  476. InternalWriteMessage(6, repfield, repfield.GetCachedSize(), target, stream);
  477. }
  478. // .google.protobuf.Syntax syntax = 7;
  479. if (this->_internal_syntax() != 0) {
  480. target = stream->EnsureSpace(target);
  481. target = ::_pbi::WireFormatLite::WriteEnumToArray(
  482. 7, this->_internal_syntax(), target);
  483. }
  484. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  485. target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  486. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  487. }
  488. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Api)
  489. return target;
  490. }
  491. ::size_t Api::ByteSizeLong() const {
  492. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Api)
  493. ::size_t total_size = 0;
  494. ::uint32_t cached_has_bits = 0;
  495. // Prevent compiler warnings about cached_has_bits being unused
  496. (void) cached_has_bits;
  497. // repeated .google.protobuf.Method methods = 2;
  498. total_size += 1UL * this->_internal_methods_size();
  499. for (const auto& msg : this->_impl_.methods_) {
  500. total_size +=
  501. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  502. }
  503. // repeated .google.protobuf.Option options = 3;
  504. total_size += 1UL * this->_internal_options_size();
  505. for (const auto& msg : this->_impl_.options_) {
  506. total_size +=
  507. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  508. }
  509. // repeated .google.protobuf.Mixin mixins = 6;
  510. total_size += 1UL * this->_internal_mixins_size();
  511. for (const auto& msg : this->_impl_.mixins_) {
  512. total_size +=
  513. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  514. }
  515. // string name = 1;
  516. if (!this->_internal_name().empty()) {
  517. total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  518. this->_internal_name());
  519. }
  520. // string version = 4;
  521. if (!this->_internal_version().empty()) {
  522. total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  523. this->_internal_version());
  524. }
  525. // .google.protobuf.SourceContext source_context = 5;
  526. if (this->_internal_has_source_context()) {
  527. total_size += 1 +
  528. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  529. *_impl_.source_context_);
  530. }
  531. // .google.protobuf.Syntax syntax = 7;
  532. if (this->_internal_syntax() != 0) {
  533. total_size += 1 +
  534. ::_pbi::WireFormatLite::EnumSize(this->_internal_syntax());
  535. }
  536. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  537. }
  538. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Api::_class_data_ = {
  539. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
  540. Api::MergeImpl
  541. };
  542. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Api::GetClassData() const { return &_class_data_; }
  543. void Api::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  544. auto* const _this = static_cast<Api*>(&to_msg);
  545. auto& from = static_cast<const Api&>(from_msg);
  546. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Api)
  547. ABSL_DCHECK_NE(&from, _this);
  548. ::uint32_t cached_has_bits = 0;
  549. (void) cached_has_bits;
  550. _this->_impl_.methods_.MergeFrom(from._impl_.methods_);
  551. _this->_impl_.options_.MergeFrom(from._impl_.options_);
  552. _this->_impl_.mixins_.MergeFrom(from._impl_.mixins_);
  553. if (!from._internal_name().empty()) {
  554. _this->_internal_set_name(from._internal_name());
  555. }
  556. if (!from._internal_version().empty()) {
  557. _this->_internal_set_version(from._internal_version());
  558. }
  559. if (from._internal_has_source_context()) {
  560. _this->_internal_mutable_source_context()->::PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(
  561. from._internal_source_context());
  562. }
  563. if (from._internal_syntax() != 0) {
  564. _this->_internal_set_syntax(from._internal_syntax());
  565. }
  566. _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  567. }
  568. void Api::CopyFrom(const Api& from) {
  569. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Api)
  570. if (&from == this) return;
  571. Clear();
  572. MergeFrom(from);
  573. }
  574. bool Api::IsInitialized() const {
  575. return true;
  576. }
  577. void Api::InternalSwap(Api* other) {
  578. using std::swap;
  579. auto* lhs_arena = GetArenaForAllocation();
  580. auto* rhs_arena = other->GetArenaForAllocation();
  581. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  582. _impl_.methods_.InternalSwap(&other->_impl_.methods_);
  583. _impl_.options_.InternalSwap(&other->_impl_.options_);
  584. _impl_.mixins_.InternalSwap(&other->_impl_.mixins_);
  585. ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, lhs_arena,
  586. &other->_impl_.name_, rhs_arena);
  587. ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.version_, lhs_arena,
  588. &other->_impl_.version_, rhs_arena);
  589. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  590. PROTOBUF_FIELD_OFFSET(Api, _impl_.syntax_)
  591. + sizeof(Api::_impl_.syntax_)
  592. - PROTOBUF_FIELD_OFFSET(Api, _impl_.source_context_)>(
  593. reinterpret_cast<char*>(&_impl_.source_context_),
  594. reinterpret_cast<char*>(&other->_impl_.source_context_));
  595. }
  596. ::PROTOBUF_NAMESPACE_ID::Metadata Api::GetMetadata() const {
  597. return ::_pbi::AssignDescriptors(
  598. &descriptor_table_google_2fprotobuf_2fapi_2eproto_getter, &descriptor_table_google_2fprotobuf_2fapi_2eproto_once,
  599. file_level_metadata_google_2fprotobuf_2fapi_2eproto[0]);
  600. }
  601. // ===================================================================
  602. class Method::_Internal {
  603. public:
  604. };
  605. void Method::clear_options() {
  606. _impl_.options_.Clear();
  607. }
  608. Method::Method(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  609. : ::PROTOBUF_NAMESPACE_ID::Message(arena) {
  610. SharedCtor(arena);
  611. // @@protoc_insertion_point(arena_constructor:google.protobuf.Method)
  612. }
  613. Method::Method(const Method& from)
  614. : ::PROTOBUF_NAMESPACE_ID::Message() {
  615. Method* const _this = this; (void)_this;
  616. new (&_impl_) Impl_{
  617. decltype(_impl_.options_){from._impl_.options_}
  618. , decltype(_impl_.name_) {}
  619. , decltype(_impl_.request_type_url_) {}
  620. , decltype(_impl_.response_type_url_) {}
  621. , decltype(_impl_.request_streaming_) {}
  622. , decltype(_impl_.response_streaming_) {}
  623. , decltype(_impl_.syntax_) {}
  624. , /*decltype(_impl_._cached_size_)*/{}};
  625. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  626. _impl_.name_.InitDefault();
  627. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  628. _impl_.name_.Set("", GetArenaForAllocation());
  629. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  630. if (!from._internal_name().empty()) {
  631. _this->_impl_.name_.Set(from._internal_name(), _this->GetArenaForAllocation());
  632. }
  633. _impl_.request_type_url_.InitDefault();
  634. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  635. _impl_.request_type_url_.Set("", GetArenaForAllocation());
  636. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  637. if (!from._internal_request_type_url().empty()) {
  638. _this->_impl_.request_type_url_.Set(from._internal_request_type_url(), _this->GetArenaForAllocation());
  639. }
  640. _impl_.response_type_url_.InitDefault();
  641. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  642. _impl_.response_type_url_.Set("", GetArenaForAllocation());
  643. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  644. if (!from._internal_response_type_url().empty()) {
  645. _this->_impl_.response_type_url_.Set(from._internal_response_type_url(), _this->GetArenaForAllocation());
  646. }
  647. ::memcpy(&_impl_.request_streaming_, &from._impl_.request_streaming_,
  648. static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.syntax_) -
  649. reinterpret_cast<char*>(&_impl_.request_streaming_)) + sizeof(_impl_.syntax_));
  650. // @@protoc_insertion_point(copy_constructor:google.protobuf.Method)
  651. }
  652. inline void Method::SharedCtor(::_pb::Arena* arena) {
  653. (void)arena;
  654. new (&_impl_) Impl_{
  655. decltype(_impl_.options_){arena}
  656. , decltype(_impl_.name_) {}
  657. , decltype(_impl_.request_type_url_) {}
  658. , decltype(_impl_.response_type_url_) {}
  659. , decltype(_impl_.request_streaming_) { false }
  660. , decltype(_impl_.response_streaming_) { false }
  661. , decltype(_impl_.syntax_) { 0 }
  662. , /*decltype(_impl_._cached_size_)*/{}
  663. };
  664. _impl_.name_.InitDefault();
  665. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  666. _impl_.name_.Set("", GetArenaForAllocation());
  667. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  668. _impl_.request_type_url_.InitDefault();
  669. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  670. _impl_.request_type_url_.Set("", GetArenaForAllocation());
  671. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  672. _impl_.response_type_url_.InitDefault();
  673. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  674. _impl_.response_type_url_.Set("", GetArenaForAllocation());
  675. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  676. }
  677. Method::~Method() {
  678. // @@protoc_insertion_point(destructor:google.protobuf.Method)
  679. if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  680. (void)arena;
  681. return;
  682. }
  683. SharedDtor();
  684. }
  685. inline void Method::SharedDtor() {
  686. ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  687. _impl_.options_.~RepeatedPtrField();
  688. _impl_.name_.Destroy();
  689. _impl_.request_type_url_.Destroy();
  690. _impl_.response_type_url_.Destroy();
  691. }
  692. void Method::SetCachedSize(int size) const {
  693. _impl_._cached_size_.Set(size);
  694. }
  695. void Method::Clear() {
  696. // @@protoc_insertion_point(message_clear_start:google.protobuf.Method)
  697. ::uint32_t cached_has_bits = 0;
  698. // Prevent compiler warnings about cached_has_bits being unused
  699. (void) cached_has_bits;
  700. _impl_.options_.Clear();
  701. _impl_.name_.ClearToEmpty();
  702. _impl_.request_type_url_.ClearToEmpty();
  703. _impl_.response_type_url_.ClearToEmpty();
  704. ::memset(&_impl_.request_streaming_, 0, static_cast<::size_t>(
  705. reinterpret_cast<char*>(&_impl_.syntax_) -
  706. reinterpret_cast<char*>(&_impl_.request_streaming_)) + sizeof(_impl_.syntax_));
  707. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  708. }
  709. const char* Method::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
  710. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  711. while (!ctx->Done(&ptr)) {
  712. ::uint32_t tag;
  713. ptr = ::_pbi::ReadTag(ptr, &tag);
  714. switch (tag >> 3) {
  715. // string name = 1;
  716. case 1:
  717. if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
  718. auto str = _internal_mutable_name();
  719. ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
  720. CHK_(ptr);
  721. CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.Method.name"));
  722. } else {
  723. goto handle_unusual;
  724. }
  725. continue;
  726. // string request_type_url = 2;
  727. case 2:
  728. if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
  729. auto str = _internal_mutable_request_type_url();
  730. ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
  731. CHK_(ptr);
  732. CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.Method.request_type_url"));
  733. } else {
  734. goto handle_unusual;
  735. }
  736. continue;
  737. // bool request_streaming = 3;
  738. case 3:
  739. if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
  740. _impl_.request_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  741. CHK_(ptr);
  742. } else {
  743. goto handle_unusual;
  744. }
  745. continue;
  746. // string response_type_url = 4;
  747. case 4:
  748. if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
  749. auto str = _internal_mutable_response_type_url();
  750. ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
  751. CHK_(ptr);
  752. CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.Method.response_type_url"));
  753. } else {
  754. goto handle_unusual;
  755. }
  756. continue;
  757. // bool response_streaming = 5;
  758. case 5:
  759. if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
  760. _impl_.response_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  761. CHK_(ptr);
  762. } else {
  763. goto handle_unusual;
  764. }
  765. continue;
  766. // repeated .google.protobuf.Option options = 6;
  767. case 6:
  768. if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
  769. ptr -= 1;
  770. do {
  771. ptr += 1;
  772. ptr = ctx->ParseMessage(_internal_add_options(), ptr);
  773. CHK_(ptr);
  774. if (!ctx->DataAvailable(ptr)) break;
  775. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
  776. } else {
  777. goto handle_unusual;
  778. }
  779. continue;
  780. // .google.protobuf.Syntax syntax = 7;
  781. case 7:
  782. if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
  783. ::uint32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
  784. CHK_(ptr);
  785. _internal_set_syntax(static_cast<::PROTOBUF_NAMESPACE_ID::Syntax>(val));
  786. } else {
  787. goto handle_unusual;
  788. }
  789. continue;
  790. default:
  791. goto handle_unusual;
  792. } // switch
  793. handle_unusual:
  794. if ((tag == 0) || ((tag & 7) == 4)) {
  795. CHK_(ptr);
  796. ctx->SetLastTag(tag);
  797. goto message_done;
  798. }
  799. ptr = UnknownFieldParse(
  800. tag,
  801. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  802. ptr, ctx);
  803. CHK_(ptr != nullptr);
  804. } // while
  805. message_done:
  806. return ptr;
  807. failure:
  808. ptr = nullptr;
  809. goto message_done;
  810. #undef CHK_
  811. }
  812. ::uint8_t* Method::_InternalSerialize(
  813. ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  814. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Method)
  815. ::uint32_t cached_has_bits = 0;
  816. (void) cached_has_bits;
  817. // string name = 1;
  818. if (!this->_internal_name().empty()) {
  819. const std::string& _s = this->_internal_name();
  820. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  821. _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Method.name");
  822. target = stream->WriteStringMaybeAliased(1, _s, target);
  823. }
  824. // string request_type_url = 2;
  825. if (!this->_internal_request_type_url().empty()) {
  826. const std::string& _s = this->_internal_request_type_url();
  827. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  828. _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Method.request_type_url");
  829. target = stream->WriteStringMaybeAliased(2, _s, target);
  830. }
  831. // bool request_streaming = 3;
  832. if (this->_internal_request_streaming() != 0) {
  833. target = stream->EnsureSpace(target);
  834. target = ::_pbi::WireFormatLite::WriteBoolToArray(
  835. 3, this->_internal_request_streaming(), target);
  836. }
  837. // string response_type_url = 4;
  838. if (!this->_internal_response_type_url().empty()) {
  839. const std::string& _s = this->_internal_response_type_url();
  840. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  841. _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Method.response_type_url");
  842. target = stream->WriteStringMaybeAliased(4, _s, target);
  843. }
  844. // bool response_streaming = 5;
  845. if (this->_internal_response_streaming() != 0) {
  846. target = stream->EnsureSpace(target);
  847. target = ::_pbi::WireFormatLite::WriteBoolToArray(
  848. 5, this->_internal_response_streaming(), target);
  849. }
  850. // repeated .google.protobuf.Option options = 6;
  851. for (unsigned i = 0,
  852. n = static_cast<unsigned>(this->_internal_options_size()); i < n; i++) {
  853. const auto& repfield = this->_internal_options(i);
  854. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  855. InternalWriteMessage(6, repfield, repfield.GetCachedSize(), target, stream);
  856. }
  857. // .google.protobuf.Syntax syntax = 7;
  858. if (this->_internal_syntax() != 0) {
  859. target = stream->EnsureSpace(target);
  860. target = ::_pbi::WireFormatLite::WriteEnumToArray(
  861. 7, this->_internal_syntax(), target);
  862. }
  863. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  864. target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  865. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  866. }
  867. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Method)
  868. return target;
  869. }
  870. ::size_t Method::ByteSizeLong() const {
  871. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Method)
  872. ::size_t total_size = 0;
  873. ::uint32_t cached_has_bits = 0;
  874. // Prevent compiler warnings about cached_has_bits being unused
  875. (void) cached_has_bits;
  876. // repeated .google.protobuf.Option options = 6;
  877. total_size += 1UL * this->_internal_options_size();
  878. for (const auto& msg : this->_impl_.options_) {
  879. total_size +=
  880. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  881. }
  882. // string name = 1;
  883. if (!this->_internal_name().empty()) {
  884. total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  885. this->_internal_name());
  886. }
  887. // string request_type_url = 2;
  888. if (!this->_internal_request_type_url().empty()) {
  889. total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  890. this->_internal_request_type_url());
  891. }
  892. // string response_type_url = 4;
  893. if (!this->_internal_response_type_url().empty()) {
  894. total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  895. this->_internal_response_type_url());
  896. }
  897. // bool request_streaming = 3;
  898. if (this->_internal_request_streaming() != 0) {
  899. total_size += 2;
  900. }
  901. // bool response_streaming = 5;
  902. if (this->_internal_response_streaming() != 0) {
  903. total_size += 2;
  904. }
  905. // .google.protobuf.Syntax syntax = 7;
  906. if (this->_internal_syntax() != 0) {
  907. total_size += 1 +
  908. ::_pbi::WireFormatLite::EnumSize(this->_internal_syntax());
  909. }
  910. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  911. }
  912. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Method::_class_data_ = {
  913. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
  914. Method::MergeImpl
  915. };
  916. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Method::GetClassData() const { return &_class_data_; }
  917. void Method::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  918. auto* const _this = static_cast<Method*>(&to_msg);
  919. auto& from = static_cast<const Method&>(from_msg);
  920. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Method)
  921. ABSL_DCHECK_NE(&from, _this);
  922. ::uint32_t cached_has_bits = 0;
  923. (void) cached_has_bits;
  924. _this->_impl_.options_.MergeFrom(from._impl_.options_);
  925. if (!from._internal_name().empty()) {
  926. _this->_internal_set_name(from._internal_name());
  927. }
  928. if (!from._internal_request_type_url().empty()) {
  929. _this->_internal_set_request_type_url(from._internal_request_type_url());
  930. }
  931. if (!from._internal_response_type_url().empty()) {
  932. _this->_internal_set_response_type_url(from._internal_response_type_url());
  933. }
  934. if (from._internal_request_streaming() != 0) {
  935. _this->_internal_set_request_streaming(from._internal_request_streaming());
  936. }
  937. if (from._internal_response_streaming() != 0) {
  938. _this->_internal_set_response_streaming(from._internal_response_streaming());
  939. }
  940. if (from._internal_syntax() != 0) {
  941. _this->_internal_set_syntax(from._internal_syntax());
  942. }
  943. _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  944. }
  945. void Method::CopyFrom(const Method& from) {
  946. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Method)
  947. if (&from == this) return;
  948. Clear();
  949. MergeFrom(from);
  950. }
  951. bool Method::IsInitialized() const {
  952. return true;
  953. }
  954. void Method::InternalSwap(Method* other) {
  955. using std::swap;
  956. auto* lhs_arena = GetArenaForAllocation();
  957. auto* rhs_arena = other->GetArenaForAllocation();
  958. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  959. _impl_.options_.InternalSwap(&other->_impl_.options_);
  960. ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, lhs_arena,
  961. &other->_impl_.name_, rhs_arena);
  962. ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.request_type_url_, lhs_arena,
  963. &other->_impl_.request_type_url_, rhs_arena);
  964. ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.response_type_url_, lhs_arena,
  965. &other->_impl_.response_type_url_, rhs_arena);
  966. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  967. PROTOBUF_FIELD_OFFSET(Method, _impl_.syntax_)
  968. + sizeof(Method::_impl_.syntax_)
  969. - PROTOBUF_FIELD_OFFSET(Method, _impl_.request_streaming_)>(
  970. reinterpret_cast<char*>(&_impl_.request_streaming_),
  971. reinterpret_cast<char*>(&other->_impl_.request_streaming_));
  972. }
  973. ::PROTOBUF_NAMESPACE_ID::Metadata Method::GetMetadata() const {
  974. return ::_pbi::AssignDescriptors(
  975. &descriptor_table_google_2fprotobuf_2fapi_2eproto_getter, &descriptor_table_google_2fprotobuf_2fapi_2eproto_once,
  976. file_level_metadata_google_2fprotobuf_2fapi_2eproto[1]);
  977. }
  978. // ===================================================================
  979. class Mixin::_Internal {
  980. public:
  981. };
  982. Mixin::Mixin(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  983. : ::PROTOBUF_NAMESPACE_ID::Message(arena) {
  984. SharedCtor(arena);
  985. // @@protoc_insertion_point(arena_constructor:google.protobuf.Mixin)
  986. }
  987. Mixin::Mixin(const Mixin& from)
  988. : ::PROTOBUF_NAMESPACE_ID::Message() {
  989. Mixin* const _this = this; (void)_this;
  990. new (&_impl_) Impl_{
  991. decltype(_impl_.name_) {}
  992. , decltype(_impl_.root_) {}
  993. , /*decltype(_impl_._cached_size_)*/{}};
  994. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  995. _impl_.name_.InitDefault();
  996. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  997. _impl_.name_.Set("", GetArenaForAllocation());
  998. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  999. if (!from._internal_name().empty()) {
  1000. _this->_impl_.name_.Set(from._internal_name(), _this->GetArenaForAllocation());
  1001. }
  1002. _impl_.root_.InitDefault();
  1003. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1004. _impl_.root_.Set("", GetArenaForAllocation());
  1005. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1006. if (!from._internal_root().empty()) {
  1007. _this->_impl_.root_.Set(from._internal_root(), _this->GetArenaForAllocation());
  1008. }
  1009. // @@protoc_insertion_point(copy_constructor:google.protobuf.Mixin)
  1010. }
  1011. inline void Mixin::SharedCtor(::_pb::Arena* arena) {
  1012. (void)arena;
  1013. new (&_impl_) Impl_{
  1014. decltype(_impl_.name_) {}
  1015. , decltype(_impl_.root_) {}
  1016. , /*decltype(_impl_._cached_size_)*/{}
  1017. };
  1018. _impl_.name_.InitDefault();
  1019. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1020. _impl_.name_.Set("", GetArenaForAllocation());
  1021. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1022. _impl_.root_.InitDefault();
  1023. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1024. _impl_.root_.Set("", GetArenaForAllocation());
  1025. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1026. }
  1027. Mixin::~Mixin() {
  1028. // @@protoc_insertion_point(destructor:google.protobuf.Mixin)
  1029. if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  1030. (void)arena;
  1031. return;
  1032. }
  1033. SharedDtor();
  1034. }
  1035. inline void Mixin::SharedDtor() {
  1036. ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  1037. _impl_.name_.Destroy();
  1038. _impl_.root_.Destroy();
  1039. }
  1040. void Mixin::SetCachedSize(int size) const {
  1041. _impl_._cached_size_.Set(size);
  1042. }
  1043. void Mixin::Clear() {
  1044. // @@protoc_insertion_point(message_clear_start:google.protobuf.Mixin)
  1045. ::uint32_t cached_has_bits = 0;
  1046. // Prevent compiler warnings about cached_has_bits being unused
  1047. (void) cached_has_bits;
  1048. _impl_.name_.ClearToEmpty();
  1049. _impl_.root_.ClearToEmpty();
  1050. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  1051. }
  1052. const char* Mixin::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
  1053. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  1054. while (!ctx->Done(&ptr)) {
  1055. ::uint32_t tag;
  1056. ptr = ::_pbi::ReadTag(ptr, &tag);
  1057. switch (tag >> 3) {
  1058. // string name = 1;
  1059. case 1:
  1060. if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
  1061. auto str = _internal_mutable_name();
  1062. ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
  1063. CHK_(ptr);
  1064. CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.Mixin.name"));
  1065. } else {
  1066. goto handle_unusual;
  1067. }
  1068. continue;
  1069. // string root = 2;
  1070. case 2:
  1071. if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
  1072. auto str = _internal_mutable_root();
  1073. ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
  1074. CHK_(ptr);
  1075. CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.Mixin.root"));
  1076. } else {
  1077. goto handle_unusual;
  1078. }
  1079. continue;
  1080. default:
  1081. goto handle_unusual;
  1082. } // switch
  1083. handle_unusual:
  1084. if ((tag == 0) || ((tag & 7) == 4)) {
  1085. CHK_(ptr);
  1086. ctx->SetLastTag(tag);
  1087. goto message_done;
  1088. }
  1089. ptr = UnknownFieldParse(
  1090. tag,
  1091. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  1092. ptr, ctx);
  1093. CHK_(ptr != nullptr);
  1094. } // while
  1095. message_done:
  1096. return ptr;
  1097. failure:
  1098. ptr = nullptr;
  1099. goto message_done;
  1100. #undef CHK_
  1101. }
  1102. ::uint8_t* Mixin::_InternalSerialize(
  1103. ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  1104. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Mixin)
  1105. ::uint32_t cached_has_bits = 0;
  1106. (void) cached_has_bits;
  1107. // string name = 1;
  1108. if (!this->_internal_name().empty()) {
  1109. const std::string& _s = this->_internal_name();
  1110. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  1111. _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Mixin.name");
  1112. target = stream->WriteStringMaybeAliased(1, _s, target);
  1113. }
  1114. // string root = 2;
  1115. if (!this->_internal_root().empty()) {
  1116. const std::string& _s = this->_internal_root();
  1117. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  1118. _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Mixin.root");
  1119. target = stream->WriteStringMaybeAliased(2, _s, target);
  1120. }
  1121. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  1122. target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  1123. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  1124. }
  1125. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Mixin)
  1126. return target;
  1127. }
  1128. ::size_t Mixin::ByteSizeLong() const {
  1129. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Mixin)
  1130. ::size_t total_size = 0;
  1131. ::uint32_t cached_has_bits = 0;
  1132. // Prevent compiler warnings about cached_has_bits being unused
  1133. (void) cached_has_bits;
  1134. // string name = 1;
  1135. if (!this->_internal_name().empty()) {
  1136. total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  1137. this->_internal_name());
  1138. }
  1139. // string root = 2;
  1140. if (!this->_internal_root().empty()) {
  1141. total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  1142. this->_internal_root());
  1143. }
  1144. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  1145. }
  1146. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Mixin::_class_data_ = {
  1147. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
  1148. Mixin::MergeImpl
  1149. };
  1150. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Mixin::GetClassData() const { return &_class_data_; }
  1151. void Mixin::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  1152. auto* const _this = static_cast<Mixin*>(&to_msg);
  1153. auto& from = static_cast<const Mixin&>(from_msg);
  1154. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Mixin)
  1155. ABSL_DCHECK_NE(&from, _this);
  1156. ::uint32_t cached_has_bits = 0;
  1157. (void) cached_has_bits;
  1158. if (!from._internal_name().empty()) {
  1159. _this->_internal_set_name(from._internal_name());
  1160. }
  1161. if (!from._internal_root().empty()) {
  1162. _this->_internal_set_root(from._internal_root());
  1163. }
  1164. _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  1165. }
  1166. void Mixin::CopyFrom(const Mixin& from) {
  1167. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Mixin)
  1168. if (&from == this) return;
  1169. Clear();
  1170. MergeFrom(from);
  1171. }
  1172. bool Mixin::IsInitialized() const {
  1173. return true;
  1174. }
  1175. void Mixin::InternalSwap(Mixin* other) {
  1176. using std::swap;
  1177. auto* lhs_arena = GetArenaForAllocation();
  1178. auto* rhs_arena = other->GetArenaForAllocation();
  1179. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  1180. ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, lhs_arena,
  1181. &other->_impl_.name_, rhs_arena);
  1182. ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.root_, lhs_arena,
  1183. &other->_impl_.root_, rhs_arena);
  1184. }
  1185. ::PROTOBUF_NAMESPACE_ID::Metadata Mixin::GetMetadata() const {
  1186. return ::_pbi::AssignDescriptors(
  1187. &descriptor_table_google_2fprotobuf_2fapi_2eproto_getter, &descriptor_table_google_2fprotobuf_2fapi_2eproto_once,
  1188. file_level_metadata_google_2fprotobuf_2fapi_2eproto[2]);
  1189. }
  1190. // @@protoc_insertion_point(namespace_scope)
  1191. PROTOBUF_NAMESPACE_CLOSE
  1192. PROTOBUF_NAMESPACE_OPEN
  1193. template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Api*
  1194. Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Api >(Arena* arena) {
  1195. return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Api >(arena);
  1196. }
  1197. template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Method*
  1198. Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Method >(Arena* arena) {
  1199. return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Method >(arena);
  1200. }
  1201. template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Mixin*
  1202. Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Mixin >(Arena* arena) {
  1203. return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Mixin >(arena);
  1204. }
  1205. PROTOBUF_NAMESPACE_CLOSE
  1206. // @@protoc_insertion_point(global_scope)
  1207. #include "google/protobuf/port_undef.inc"