api.pb.cc 61 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590
  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/stubs/common.h>
  6. #include <google/protobuf/stubs/port.h>
  7. #include <google/protobuf/io/coded_stream.h>
  8. #include <google/protobuf/wire_format_lite_inl.h>
  9. #include <google/protobuf/descriptor.h>
  10. #include <google/protobuf/generated_message_reflection.h>
  11. #include <google/protobuf/reflection_ops.h>
  12. #include <google/protobuf/wire_format.h>
  13. // This is a temporary google only hack
  14. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  15. #include "third_party/protobuf/version.h"
  16. #endif
  17. // @@protoc_insertion_point(includes)
  18. namespace protobuf_google_2fprotobuf_2fapi_2eproto {
  19. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fapi_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Mixin;
  20. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fapi_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Method;
  21. } // namespace protobuf_google_2fprotobuf_2fapi_2eproto
  22. namespace protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto {
  23. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_SourceContext;
  24. } // namespace protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto
  25. namespace protobuf_google_2fprotobuf_2ftype_2eproto {
  26. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2ftype_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Option;
  27. } // namespace protobuf_google_2fprotobuf_2ftype_2eproto
  28. namespace google {
  29. namespace protobuf {
  30. class ApiDefaultTypeInternal {
  31. public:
  32. ::google::protobuf::internal::ExplicitlyConstructed<Api>
  33. _instance;
  34. } _Api_default_instance_;
  35. class MethodDefaultTypeInternal {
  36. public:
  37. ::google::protobuf::internal::ExplicitlyConstructed<Method>
  38. _instance;
  39. } _Method_default_instance_;
  40. class MixinDefaultTypeInternal {
  41. public:
  42. ::google::protobuf::internal::ExplicitlyConstructed<Mixin>
  43. _instance;
  44. } _Mixin_default_instance_;
  45. } // namespace protobuf
  46. } // namespace google
  47. namespace protobuf_google_2fprotobuf_2fapi_2eproto {
  48. static void InitDefaultsApi() {
  49. GOOGLE_PROTOBUF_VERIFY_VERSION;
  50. {
  51. void* ptr = &::google::protobuf::_Api_default_instance_;
  52. new (ptr) ::google::protobuf::Api();
  53. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  54. }
  55. ::google::protobuf::Api::InitAsDefaultInstance();
  56. }
  57. LIBPROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<4> scc_info_Api =
  58. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsApi}, {
  59. &protobuf_google_2fprotobuf_2fapi_2eproto::scc_info_Method.base,
  60. &protobuf_google_2fprotobuf_2ftype_2eproto::scc_info_Option.base,
  61. &protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto::scc_info_SourceContext.base,
  62. &protobuf_google_2fprotobuf_2fapi_2eproto::scc_info_Mixin.base,}};
  63. static void InitDefaultsMethod() {
  64. GOOGLE_PROTOBUF_VERIFY_VERSION;
  65. {
  66. void* ptr = &::google::protobuf::_Method_default_instance_;
  67. new (ptr) ::google::protobuf::Method();
  68. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  69. }
  70. ::google::protobuf::Method::InitAsDefaultInstance();
  71. }
  72. LIBPROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_Method =
  73. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMethod}, {
  74. &protobuf_google_2fprotobuf_2ftype_2eproto::scc_info_Option.base,}};
  75. static void InitDefaultsMixin() {
  76. GOOGLE_PROTOBUF_VERIFY_VERSION;
  77. {
  78. void* ptr = &::google::protobuf::_Mixin_default_instance_;
  79. new (ptr) ::google::protobuf::Mixin();
  80. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  81. }
  82. ::google::protobuf::Mixin::InitAsDefaultInstance();
  83. }
  84. LIBPROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_Mixin =
  85. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMixin}, {}};
  86. void InitDefaults() {
  87. ::google::protobuf::internal::InitSCC(&scc_info_Api.base);
  88. ::google::protobuf::internal::InitSCC(&scc_info_Method.base);
  89. ::google::protobuf::internal::InitSCC(&scc_info_Mixin.base);
  90. }
  91. ::google::protobuf::Metadata file_level_metadata[3];
  92. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  93. ~0u, // no _has_bits_
  94. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Api, _internal_metadata_),
  95. ~0u, // no _extensions_
  96. ~0u, // no _oneof_case_
  97. ~0u, // no _weak_field_map_
  98. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Api, name_),
  99. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Api, methods_),
  100. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Api, options_),
  101. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Api, version_),
  102. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Api, source_context_),
  103. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Api, mixins_),
  104. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Api, syntax_),
  105. ~0u, // no _has_bits_
  106. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Method, _internal_metadata_),
  107. ~0u, // no _extensions_
  108. ~0u, // no _oneof_case_
  109. ~0u, // no _weak_field_map_
  110. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Method, name_),
  111. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Method, request_type_url_),
  112. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Method, request_streaming_),
  113. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Method, response_type_url_),
  114. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Method, response_streaming_),
  115. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Method, options_),
  116. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Method, syntax_),
  117. ~0u, // no _has_bits_
  118. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Mixin, _internal_metadata_),
  119. ~0u, // no _extensions_
  120. ~0u, // no _oneof_case_
  121. ~0u, // no _weak_field_map_
  122. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Mixin, name_),
  123. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Mixin, root_),
  124. };
  125. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  126. { 0, -1, sizeof(::google::protobuf::Api)},
  127. { 12, -1, sizeof(::google::protobuf::Method)},
  128. { 24, -1, sizeof(::google::protobuf::Mixin)},
  129. };
  130. static ::google::protobuf::Message const * const file_default_instances[] = {
  131. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_Api_default_instance_),
  132. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_Method_default_instance_),
  133. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_Mixin_default_instance_),
  134. };
  135. void protobuf_AssignDescriptors() {
  136. AddDescriptors();
  137. AssignDescriptors(
  138. "google/protobuf/api.proto", schemas, file_default_instances, TableStruct::offsets,
  139. file_level_metadata, NULL, NULL);
  140. }
  141. void protobuf_AssignDescriptorsOnce() {
  142. static ::google::protobuf::internal::once_flag once;
  143. ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
  144. }
  145. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  146. void protobuf_RegisterTypes(const ::std::string&) {
  147. protobuf_AssignDescriptorsOnce();
  148. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 3);
  149. }
  150. void AddDescriptorsImpl() {
  151. InitDefaults();
  152. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  153. "\n\031google/protobuf/api.proto\022\017google.prot"
  154. "obuf\032$google/protobuf/source_context.pro"
  155. "to\032\032google/protobuf/type.proto\"\201\002\n\003Api\022\014"
  156. "\n\004name\030\001 \001(\t\022(\n\007methods\030\002 \003(\0132\027.google.p"
  157. "rotobuf.Method\022(\n\007options\030\003 \003(\0132\027.google"
  158. ".protobuf.Option\022\017\n\007version\030\004 \001(\t\0226\n\016sou"
  159. "rce_context\030\005 \001(\0132\036.google.protobuf.Sour"
  160. "ceContext\022&\n\006mixins\030\006 \003(\0132\026.google.proto"
  161. "buf.Mixin\022\'\n\006syntax\030\007 \001(\0162\027.google.proto"
  162. "buf.Syntax\"\325\001\n\006Method\022\014\n\004name\030\001 \001(\t\022\030\n\020r"
  163. "equest_type_url\030\002 \001(\t\022\031\n\021request_streami"
  164. "ng\030\003 \001(\010\022\031\n\021response_type_url\030\004 \001(\t\022\032\n\022r"
  165. "esponse_streaming\030\005 \001(\010\022(\n\007options\030\006 \003(\013"
  166. "2\027.google.protobuf.Option\022\'\n\006syntax\030\007 \001("
  167. "\0162\027.google.protobuf.Syntax\"#\n\005Mixin\022\014\n\004n"
  168. "ame\030\001 \001(\t\022\014\n\004root\030\002 \001(\tBu\n\023com.google.pr"
  169. "otobufB\010ApiProtoP\001Z+google.golang.org/ge"
  170. "nproto/protobuf/api;api\242\002\003GPB\252\002\036Google.P"
  171. "rotobuf.WellKnownTypesb\006proto3"
  172. };
  173. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  174. descriptor, 750);
  175. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  176. "google/protobuf/api.proto", &protobuf_RegisterTypes);
  177. ::protobuf_google_2fprotobuf_2fsource_5fcontext_2eproto::AddDescriptors();
  178. ::protobuf_google_2fprotobuf_2ftype_2eproto::AddDescriptors();
  179. }
  180. void AddDescriptors() {
  181. static ::google::protobuf::internal::once_flag once;
  182. ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
  183. }
  184. // Force AddDescriptors() to be called at dynamic initialization time.
  185. struct StaticDescriptorInitializer {
  186. StaticDescriptorInitializer() {
  187. AddDescriptors();
  188. }
  189. } static_descriptor_initializer;
  190. } // namespace protobuf_google_2fprotobuf_2fapi_2eproto
  191. namespace google {
  192. namespace protobuf {
  193. // ===================================================================
  194. void Api::InitAsDefaultInstance() {
  195. ::google::protobuf::_Api_default_instance_._instance.get_mutable()->source_context_ = const_cast< ::google::protobuf::SourceContext*>(
  196. ::google::protobuf::SourceContext::internal_default_instance());
  197. }
  198. void Api::clear_options() {
  199. options_.Clear();
  200. }
  201. void Api::clear_source_context() {
  202. if (GetArenaNoVirtual() == NULL && source_context_ != NULL) {
  203. delete source_context_;
  204. }
  205. source_context_ = NULL;
  206. }
  207. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  208. const int Api::kNameFieldNumber;
  209. const int Api::kMethodsFieldNumber;
  210. const int Api::kOptionsFieldNumber;
  211. const int Api::kVersionFieldNumber;
  212. const int Api::kSourceContextFieldNumber;
  213. const int Api::kMixinsFieldNumber;
  214. const int Api::kSyntaxFieldNumber;
  215. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  216. Api::Api()
  217. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  218. ::google::protobuf::internal::InitSCC(
  219. &protobuf_google_2fprotobuf_2fapi_2eproto::scc_info_Api.base);
  220. SharedCtor();
  221. // @@protoc_insertion_point(constructor:google.protobuf.Api)
  222. }
  223. Api::Api(const Api& from)
  224. : ::google::protobuf::Message(),
  225. _internal_metadata_(NULL),
  226. methods_(from.methods_),
  227. options_(from.options_),
  228. mixins_(from.mixins_) {
  229. _internal_metadata_.MergeFrom(from._internal_metadata_);
  230. name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  231. if (from.name().size() > 0) {
  232. name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  233. }
  234. version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  235. if (from.version().size() > 0) {
  236. version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.version_);
  237. }
  238. if (from.has_source_context()) {
  239. source_context_ = new ::google::protobuf::SourceContext(*from.source_context_);
  240. } else {
  241. source_context_ = NULL;
  242. }
  243. syntax_ = from.syntax_;
  244. // @@protoc_insertion_point(copy_constructor:google.protobuf.Api)
  245. }
  246. void Api::SharedCtor() {
  247. name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  248. version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  249. ::memset(&source_context_, 0, static_cast<size_t>(
  250. reinterpret_cast<char*>(&syntax_) -
  251. reinterpret_cast<char*>(&source_context_)) + sizeof(syntax_));
  252. }
  253. Api::~Api() {
  254. // @@protoc_insertion_point(destructor:google.protobuf.Api)
  255. SharedDtor();
  256. }
  257. void Api::SharedDtor() {
  258. name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  259. version_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  260. if (this != internal_default_instance()) delete source_context_;
  261. }
  262. void Api::SetCachedSize(int size) const {
  263. _cached_size_.Set(size);
  264. }
  265. const ::google::protobuf::Descriptor* Api::descriptor() {
  266. ::protobuf_google_2fprotobuf_2fapi_2eproto::protobuf_AssignDescriptorsOnce();
  267. return ::protobuf_google_2fprotobuf_2fapi_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  268. }
  269. const Api& Api::default_instance() {
  270. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fapi_2eproto::scc_info_Api.base);
  271. return *internal_default_instance();
  272. }
  273. void Api::Clear() {
  274. // @@protoc_insertion_point(message_clear_start:google.protobuf.Api)
  275. ::google::protobuf::uint32 cached_has_bits = 0;
  276. // Prevent compiler warnings about cached_has_bits being unused
  277. (void) cached_has_bits;
  278. methods_.Clear();
  279. options_.Clear();
  280. mixins_.Clear();
  281. name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  282. version_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  283. if (GetArenaNoVirtual() == NULL && source_context_ != NULL) {
  284. delete source_context_;
  285. }
  286. source_context_ = NULL;
  287. syntax_ = 0;
  288. _internal_metadata_.Clear();
  289. }
  290. bool Api::MergePartialFromCodedStream(
  291. ::google::protobuf::io::CodedInputStream* input) {
  292. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  293. ::google::protobuf::uint32 tag;
  294. // @@protoc_insertion_point(parse_start:google.protobuf.Api)
  295. for (;;) {
  296. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  297. tag = p.first;
  298. if (!p.second) goto handle_unusual;
  299. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  300. // string name = 1;
  301. case 1: {
  302. if (static_cast< ::google::protobuf::uint8>(tag) ==
  303. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  304. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  305. input, this->mutable_name()));
  306. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  307. this->name().data(), static_cast<int>(this->name().length()),
  308. ::google::protobuf::internal::WireFormatLite::PARSE,
  309. "google.protobuf.Api.name"));
  310. } else {
  311. goto handle_unusual;
  312. }
  313. break;
  314. }
  315. // repeated .google.protobuf.Method methods = 2;
  316. case 2: {
  317. if (static_cast< ::google::protobuf::uint8>(tag) ==
  318. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  319. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  320. input, add_methods()));
  321. } else {
  322. goto handle_unusual;
  323. }
  324. break;
  325. }
  326. // repeated .google.protobuf.Option options = 3;
  327. case 3: {
  328. if (static_cast< ::google::protobuf::uint8>(tag) ==
  329. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  330. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  331. input, add_options()));
  332. } else {
  333. goto handle_unusual;
  334. }
  335. break;
  336. }
  337. // string version = 4;
  338. case 4: {
  339. if (static_cast< ::google::protobuf::uint8>(tag) ==
  340. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  341. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  342. input, this->mutable_version()));
  343. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  344. this->version().data(), static_cast<int>(this->version().length()),
  345. ::google::protobuf::internal::WireFormatLite::PARSE,
  346. "google.protobuf.Api.version"));
  347. } else {
  348. goto handle_unusual;
  349. }
  350. break;
  351. }
  352. // .google.protobuf.SourceContext source_context = 5;
  353. case 5: {
  354. if (static_cast< ::google::protobuf::uint8>(tag) ==
  355. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  356. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  357. input, mutable_source_context()));
  358. } else {
  359. goto handle_unusual;
  360. }
  361. break;
  362. }
  363. // repeated .google.protobuf.Mixin mixins = 6;
  364. case 6: {
  365. if (static_cast< ::google::protobuf::uint8>(tag) ==
  366. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  367. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  368. input, add_mixins()));
  369. } else {
  370. goto handle_unusual;
  371. }
  372. break;
  373. }
  374. // .google.protobuf.Syntax syntax = 7;
  375. case 7: {
  376. if (static_cast< ::google::protobuf::uint8>(tag) ==
  377. static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) {
  378. int value;
  379. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  380. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  381. input, &value)));
  382. set_syntax(static_cast< ::google::protobuf::Syntax >(value));
  383. } else {
  384. goto handle_unusual;
  385. }
  386. break;
  387. }
  388. default: {
  389. handle_unusual:
  390. if (tag == 0) {
  391. goto success;
  392. }
  393. DO_(::google::protobuf::internal::WireFormat::SkipField(
  394. input, tag, _internal_metadata_.mutable_unknown_fields()));
  395. break;
  396. }
  397. }
  398. }
  399. success:
  400. // @@protoc_insertion_point(parse_success:google.protobuf.Api)
  401. return true;
  402. failure:
  403. // @@protoc_insertion_point(parse_failure:google.protobuf.Api)
  404. return false;
  405. #undef DO_
  406. }
  407. void Api::SerializeWithCachedSizes(
  408. ::google::protobuf::io::CodedOutputStream* output) const {
  409. // @@protoc_insertion_point(serialize_start:google.protobuf.Api)
  410. ::google::protobuf::uint32 cached_has_bits = 0;
  411. (void) cached_has_bits;
  412. // string name = 1;
  413. if (this->name().size() > 0) {
  414. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  415. this->name().data(), static_cast<int>(this->name().length()),
  416. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  417. "google.protobuf.Api.name");
  418. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  419. 1, this->name(), output);
  420. }
  421. // repeated .google.protobuf.Method methods = 2;
  422. for (unsigned int i = 0,
  423. n = static_cast<unsigned int>(this->methods_size()); i < n; i++) {
  424. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  425. 2,
  426. this->methods(static_cast<int>(i)),
  427. output);
  428. }
  429. // repeated .google.protobuf.Option options = 3;
  430. for (unsigned int i = 0,
  431. n = static_cast<unsigned int>(this->options_size()); i < n; i++) {
  432. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  433. 3,
  434. this->options(static_cast<int>(i)),
  435. output);
  436. }
  437. // string version = 4;
  438. if (this->version().size() > 0) {
  439. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  440. this->version().data(), static_cast<int>(this->version().length()),
  441. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  442. "google.protobuf.Api.version");
  443. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  444. 4, this->version(), output);
  445. }
  446. // .google.protobuf.SourceContext source_context = 5;
  447. if (this->has_source_context()) {
  448. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  449. 5, this->_internal_source_context(), output);
  450. }
  451. // repeated .google.protobuf.Mixin mixins = 6;
  452. for (unsigned int i = 0,
  453. n = static_cast<unsigned int>(this->mixins_size()); i < n; i++) {
  454. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  455. 6,
  456. this->mixins(static_cast<int>(i)),
  457. output);
  458. }
  459. // .google.protobuf.Syntax syntax = 7;
  460. if (this->syntax() != 0) {
  461. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  462. 7, this->syntax(), output);
  463. }
  464. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  465. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  466. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  467. }
  468. // @@protoc_insertion_point(serialize_end:google.protobuf.Api)
  469. }
  470. ::google::protobuf::uint8* Api::InternalSerializeWithCachedSizesToArray(
  471. bool deterministic, ::google::protobuf::uint8* target) const {
  472. (void)deterministic; // Unused
  473. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Api)
  474. ::google::protobuf::uint32 cached_has_bits = 0;
  475. (void) cached_has_bits;
  476. // string name = 1;
  477. if (this->name().size() > 0) {
  478. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  479. this->name().data(), static_cast<int>(this->name().length()),
  480. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  481. "google.protobuf.Api.name");
  482. target =
  483. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  484. 1, this->name(), target);
  485. }
  486. // repeated .google.protobuf.Method methods = 2;
  487. for (unsigned int i = 0,
  488. n = static_cast<unsigned int>(this->methods_size()); i < n; i++) {
  489. target = ::google::protobuf::internal::WireFormatLite::
  490. InternalWriteMessageToArray(
  491. 2, this->methods(static_cast<int>(i)), deterministic, target);
  492. }
  493. // repeated .google.protobuf.Option options = 3;
  494. for (unsigned int i = 0,
  495. n = static_cast<unsigned int>(this->options_size()); i < n; i++) {
  496. target = ::google::protobuf::internal::WireFormatLite::
  497. InternalWriteMessageToArray(
  498. 3, this->options(static_cast<int>(i)), deterministic, target);
  499. }
  500. // string version = 4;
  501. if (this->version().size() > 0) {
  502. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  503. this->version().data(), static_cast<int>(this->version().length()),
  504. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  505. "google.protobuf.Api.version");
  506. target =
  507. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  508. 4, this->version(), target);
  509. }
  510. // .google.protobuf.SourceContext source_context = 5;
  511. if (this->has_source_context()) {
  512. target = ::google::protobuf::internal::WireFormatLite::
  513. InternalWriteMessageToArray(
  514. 5, this->_internal_source_context(), deterministic, target);
  515. }
  516. // repeated .google.protobuf.Mixin mixins = 6;
  517. for (unsigned int i = 0,
  518. n = static_cast<unsigned int>(this->mixins_size()); i < n; i++) {
  519. target = ::google::protobuf::internal::WireFormatLite::
  520. InternalWriteMessageToArray(
  521. 6, this->mixins(static_cast<int>(i)), deterministic, target);
  522. }
  523. // .google.protobuf.Syntax syntax = 7;
  524. if (this->syntax() != 0) {
  525. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  526. 7, this->syntax(), target);
  527. }
  528. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  529. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  530. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  531. }
  532. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Api)
  533. return target;
  534. }
  535. size_t Api::ByteSizeLong() const {
  536. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Api)
  537. size_t total_size = 0;
  538. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  539. total_size +=
  540. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  541. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  542. }
  543. // repeated .google.protobuf.Method methods = 2;
  544. {
  545. unsigned int count = static_cast<unsigned int>(this->methods_size());
  546. total_size += 1UL * count;
  547. for (unsigned int i = 0; i < count; i++) {
  548. total_size +=
  549. ::google::protobuf::internal::WireFormatLite::MessageSize(
  550. this->methods(static_cast<int>(i)));
  551. }
  552. }
  553. // repeated .google.protobuf.Option options = 3;
  554. {
  555. unsigned int count = static_cast<unsigned int>(this->options_size());
  556. total_size += 1UL * count;
  557. for (unsigned int i = 0; i < count; i++) {
  558. total_size +=
  559. ::google::protobuf::internal::WireFormatLite::MessageSize(
  560. this->options(static_cast<int>(i)));
  561. }
  562. }
  563. // repeated .google.protobuf.Mixin mixins = 6;
  564. {
  565. unsigned int count = static_cast<unsigned int>(this->mixins_size());
  566. total_size += 1UL * count;
  567. for (unsigned int i = 0; i < count; i++) {
  568. total_size +=
  569. ::google::protobuf::internal::WireFormatLite::MessageSize(
  570. this->mixins(static_cast<int>(i)));
  571. }
  572. }
  573. // string name = 1;
  574. if (this->name().size() > 0) {
  575. total_size += 1 +
  576. ::google::protobuf::internal::WireFormatLite::StringSize(
  577. this->name());
  578. }
  579. // string version = 4;
  580. if (this->version().size() > 0) {
  581. total_size += 1 +
  582. ::google::protobuf::internal::WireFormatLite::StringSize(
  583. this->version());
  584. }
  585. // .google.protobuf.SourceContext source_context = 5;
  586. if (this->has_source_context()) {
  587. total_size += 1 +
  588. ::google::protobuf::internal::WireFormatLite::MessageSize(
  589. *source_context_);
  590. }
  591. // .google.protobuf.Syntax syntax = 7;
  592. if (this->syntax() != 0) {
  593. total_size += 1 +
  594. ::google::protobuf::internal::WireFormatLite::EnumSize(this->syntax());
  595. }
  596. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  597. SetCachedSize(cached_size);
  598. return total_size;
  599. }
  600. void Api::MergeFrom(const ::google::protobuf::Message& from) {
  601. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Api)
  602. GOOGLE_DCHECK_NE(&from, this);
  603. const Api* source =
  604. ::google::protobuf::internal::DynamicCastToGenerated<const Api>(
  605. &from);
  606. if (source == NULL) {
  607. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Api)
  608. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  609. } else {
  610. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Api)
  611. MergeFrom(*source);
  612. }
  613. }
  614. void Api::MergeFrom(const Api& from) {
  615. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Api)
  616. GOOGLE_DCHECK_NE(&from, this);
  617. _internal_metadata_.MergeFrom(from._internal_metadata_);
  618. ::google::protobuf::uint32 cached_has_bits = 0;
  619. (void) cached_has_bits;
  620. methods_.MergeFrom(from.methods_);
  621. options_.MergeFrom(from.options_);
  622. mixins_.MergeFrom(from.mixins_);
  623. if (from.name().size() > 0) {
  624. name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  625. }
  626. if (from.version().size() > 0) {
  627. version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.version_);
  628. }
  629. if (from.has_source_context()) {
  630. mutable_source_context()->::google::protobuf::SourceContext::MergeFrom(from.source_context());
  631. }
  632. if (from.syntax() != 0) {
  633. set_syntax(from.syntax());
  634. }
  635. }
  636. void Api::CopyFrom(const ::google::protobuf::Message& from) {
  637. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Api)
  638. if (&from == this) return;
  639. Clear();
  640. MergeFrom(from);
  641. }
  642. void Api::CopyFrom(const Api& from) {
  643. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Api)
  644. if (&from == this) return;
  645. Clear();
  646. MergeFrom(from);
  647. }
  648. bool Api::IsInitialized() const {
  649. return true;
  650. }
  651. void Api::Swap(Api* other) {
  652. if (other == this) return;
  653. InternalSwap(other);
  654. }
  655. void Api::InternalSwap(Api* other) {
  656. using std::swap;
  657. CastToBase(&methods_)->InternalSwap(CastToBase(&other->methods_));
  658. CastToBase(&options_)->InternalSwap(CastToBase(&other->options_));
  659. CastToBase(&mixins_)->InternalSwap(CastToBase(&other->mixins_));
  660. name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  661. GetArenaNoVirtual());
  662. version_.Swap(&other->version_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  663. GetArenaNoVirtual());
  664. swap(source_context_, other->source_context_);
  665. swap(syntax_, other->syntax_);
  666. _internal_metadata_.Swap(&other->_internal_metadata_);
  667. }
  668. ::google::protobuf::Metadata Api::GetMetadata() const {
  669. protobuf_google_2fprotobuf_2fapi_2eproto::protobuf_AssignDescriptorsOnce();
  670. return ::protobuf_google_2fprotobuf_2fapi_2eproto::file_level_metadata[kIndexInFileMessages];
  671. }
  672. // ===================================================================
  673. void Method::InitAsDefaultInstance() {
  674. }
  675. void Method::clear_options() {
  676. options_.Clear();
  677. }
  678. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  679. const int Method::kNameFieldNumber;
  680. const int Method::kRequestTypeUrlFieldNumber;
  681. const int Method::kRequestStreamingFieldNumber;
  682. const int Method::kResponseTypeUrlFieldNumber;
  683. const int Method::kResponseStreamingFieldNumber;
  684. const int Method::kOptionsFieldNumber;
  685. const int Method::kSyntaxFieldNumber;
  686. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  687. Method::Method()
  688. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  689. ::google::protobuf::internal::InitSCC(
  690. &protobuf_google_2fprotobuf_2fapi_2eproto::scc_info_Method.base);
  691. SharedCtor();
  692. // @@protoc_insertion_point(constructor:google.protobuf.Method)
  693. }
  694. Method::Method(const Method& from)
  695. : ::google::protobuf::Message(),
  696. _internal_metadata_(NULL),
  697. options_(from.options_) {
  698. _internal_metadata_.MergeFrom(from._internal_metadata_);
  699. name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  700. if (from.name().size() > 0) {
  701. name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  702. }
  703. request_type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  704. if (from.request_type_url().size() > 0) {
  705. request_type_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.request_type_url_);
  706. }
  707. response_type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  708. if (from.response_type_url().size() > 0) {
  709. response_type_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.response_type_url_);
  710. }
  711. ::memcpy(&request_streaming_, &from.request_streaming_,
  712. static_cast<size_t>(reinterpret_cast<char*>(&syntax_) -
  713. reinterpret_cast<char*>(&request_streaming_)) + sizeof(syntax_));
  714. // @@protoc_insertion_point(copy_constructor:google.protobuf.Method)
  715. }
  716. void Method::SharedCtor() {
  717. name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  718. request_type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  719. response_type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  720. ::memset(&request_streaming_, 0, static_cast<size_t>(
  721. reinterpret_cast<char*>(&syntax_) -
  722. reinterpret_cast<char*>(&request_streaming_)) + sizeof(syntax_));
  723. }
  724. Method::~Method() {
  725. // @@protoc_insertion_point(destructor:google.protobuf.Method)
  726. SharedDtor();
  727. }
  728. void Method::SharedDtor() {
  729. name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  730. request_type_url_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  731. response_type_url_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  732. }
  733. void Method::SetCachedSize(int size) const {
  734. _cached_size_.Set(size);
  735. }
  736. const ::google::protobuf::Descriptor* Method::descriptor() {
  737. ::protobuf_google_2fprotobuf_2fapi_2eproto::protobuf_AssignDescriptorsOnce();
  738. return ::protobuf_google_2fprotobuf_2fapi_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  739. }
  740. const Method& Method::default_instance() {
  741. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fapi_2eproto::scc_info_Method.base);
  742. return *internal_default_instance();
  743. }
  744. void Method::Clear() {
  745. // @@protoc_insertion_point(message_clear_start:google.protobuf.Method)
  746. ::google::protobuf::uint32 cached_has_bits = 0;
  747. // Prevent compiler warnings about cached_has_bits being unused
  748. (void) cached_has_bits;
  749. options_.Clear();
  750. name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  751. request_type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  752. response_type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  753. ::memset(&request_streaming_, 0, static_cast<size_t>(
  754. reinterpret_cast<char*>(&syntax_) -
  755. reinterpret_cast<char*>(&request_streaming_)) + sizeof(syntax_));
  756. _internal_metadata_.Clear();
  757. }
  758. bool Method::MergePartialFromCodedStream(
  759. ::google::protobuf::io::CodedInputStream* input) {
  760. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  761. ::google::protobuf::uint32 tag;
  762. // @@protoc_insertion_point(parse_start:google.protobuf.Method)
  763. for (;;) {
  764. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  765. tag = p.first;
  766. if (!p.second) goto handle_unusual;
  767. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  768. // string name = 1;
  769. case 1: {
  770. if (static_cast< ::google::protobuf::uint8>(tag) ==
  771. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  772. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  773. input, this->mutable_name()));
  774. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  775. this->name().data(), static_cast<int>(this->name().length()),
  776. ::google::protobuf::internal::WireFormatLite::PARSE,
  777. "google.protobuf.Method.name"));
  778. } else {
  779. goto handle_unusual;
  780. }
  781. break;
  782. }
  783. // string request_type_url = 2;
  784. case 2: {
  785. if (static_cast< ::google::protobuf::uint8>(tag) ==
  786. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  787. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  788. input, this->mutable_request_type_url()));
  789. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  790. this->request_type_url().data(), static_cast<int>(this->request_type_url().length()),
  791. ::google::protobuf::internal::WireFormatLite::PARSE,
  792. "google.protobuf.Method.request_type_url"));
  793. } else {
  794. goto handle_unusual;
  795. }
  796. break;
  797. }
  798. // bool request_streaming = 3;
  799. case 3: {
  800. if (static_cast< ::google::protobuf::uint8>(tag) ==
  801. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  802. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  803. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  804. input, &request_streaming_)));
  805. } else {
  806. goto handle_unusual;
  807. }
  808. break;
  809. }
  810. // string response_type_url = 4;
  811. case 4: {
  812. if (static_cast< ::google::protobuf::uint8>(tag) ==
  813. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  814. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  815. input, this->mutable_response_type_url()));
  816. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  817. this->response_type_url().data(), static_cast<int>(this->response_type_url().length()),
  818. ::google::protobuf::internal::WireFormatLite::PARSE,
  819. "google.protobuf.Method.response_type_url"));
  820. } else {
  821. goto handle_unusual;
  822. }
  823. break;
  824. }
  825. // bool response_streaming = 5;
  826. case 5: {
  827. if (static_cast< ::google::protobuf::uint8>(tag) ==
  828. static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
  829. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  830. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  831. input, &response_streaming_)));
  832. } else {
  833. goto handle_unusual;
  834. }
  835. break;
  836. }
  837. // repeated .google.protobuf.Option options = 6;
  838. case 6: {
  839. if (static_cast< ::google::protobuf::uint8>(tag) ==
  840. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  841. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  842. input, add_options()));
  843. } else {
  844. goto handle_unusual;
  845. }
  846. break;
  847. }
  848. // .google.protobuf.Syntax syntax = 7;
  849. case 7: {
  850. if (static_cast< ::google::protobuf::uint8>(tag) ==
  851. static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) {
  852. int value;
  853. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  854. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  855. input, &value)));
  856. set_syntax(static_cast< ::google::protobuf::Syntax >(value));
  857. } else {
  858. goto handle_unusual;
  859. }
  860. break;
  861. }
  862. default: {
  863. handle_unusual:
  864. if (tag == 0) {
  865. goto success;
  866. }
  867. DO_(::google::protobuf::internal::WireFormat::SkipField(
  868. input, tag, _internal_metadata_.mutable_unknown_fields()));
  869. break;
  870. }
  871. }
  872. }
  873. success:
  874. // @@protoc_insertion_point(parse_success:google.protobuf.Method)
  875. return true;
  876. failure:
  877. // @@protoc_insertion_point(parse_failure:google.protobuf.Method)
  878. return false;
  879. #undef DO_
  880. }
  881. void Method::SerializeWithCachedSizes(
  882. ::google::protobuf::io::CodedOutputStream* output) const {
  883. // @@protoc_insertion_point(serialize_start:google.protobuf.Method)
  884. ::google::protobuf::uint32 cached_has_bits = 0;
  885. (void) cached_has_bits;
  886. // string name = 1;
  887. if (this->name().size() > 0) {
  888. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  889. this->name().data(), static_cast<int>(this->name().length()),
  890. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  891. "google.protobuf.Method.name");
  892. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  893. 1, this->name(), output);
  894. }
  895. // string request_type_url = 2;
  896. if (this->request_type_url().size() > 0) {
  897. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  898. this->request_type_url().data(), static_cast<int>(this->request_type_url().length()),
  899. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  900. "google.protobuf.Method.request_type_url");
  901. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  902. 2, this->request_type_url(), output);
  903. }
  904. // bool request_streaming = 3;
  905. if (this->request_streaming() != 0) {
  906. ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->request_streaming(), output);
  907. }
  908. // string response_type_url = 4;
  909. if (this->response_type_url().size() > 0) {
  910. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  911. this->response_type_url().data(), static_cast<int>(this->response_type_url().length()),
  912. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  913. "google.protobuf.Method.response_type_url");
  914. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  915. 4, this->response_type_url(), output);
  916. }
  917. // bool response_streaming = 5;
  918. if (this->response_streaming() != 0) {
  919. ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->response_streaming(), output);
  920. }
  921. // repeated .google.protobuf.Option options = 6;
  922. for (unsigned int i = 0,
  923. n = static_cast<unsigned int>(this->options_size()); i < n; i++) {
  924. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  925. 6,
  926. this->options(static_cast<int>(i)),
  927. output);
  928. }
  929. // .google.protobuf.Syntax syntax = 7;
  930. if (this->syntax() != 0) {
  931. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  932. 7, this->syntax(), output);
  933. }
  934. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  935. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  936. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  937. }
  938. // @@protoc_insertion_point(serialize_end:google.protobuf.Method)
  939. }
  940. ::google::protobuf::uint8* Method::InternalSerializeWithCachedSizesToArray(
  941. bool deterministic, ::google::protobuf::uint8* target) const {
  942. (void)deterministic; // Unused
  943. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Method)
  944. ::google::protobuf::uint32 cached_has_bits = 0;
  945. (void) cached_has_bits;
  946. // string name = 1;
  947. if (this->name().size() > 0) {
  948. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  949. this->name().data(), static_cast<int>(this->name().length()),
  950. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  951. "google.protobuf.Method.name");
  952. target =
  953. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  954. 1, this->name(), target);
  955. }
  956. // string request_type_url = 2;
  957. if (this->request_type_url().size() > 0) {
  958. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  959. this->request_type_url().data(), static_cast<int>(this->request_type_url().length()),
  960. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  961. "google.protobuf.Method.request_type_url");
  962. target =
  963. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  964. 2, this->request_type_url(), target);
  965. }
  966. // bool request_streaming = 3;
  967. if (this->request_streaming() != 0) {
  968. target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->request_streaming(), target);
  969. }
  970. // string response_type_url = 4;
  971. if (this->response_type_url().size() > 0) {
  972. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  973. this->response_type_url().data(), static_cast<int>(this->response_type_url().length()),
  974. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  975. "google.protobuf.Method.response_type_url");
  976. target =
  977. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  978. 4, this->response_type_url(), target);
  979. }
  980. // bool response_streaming = 5;
  981. if (this->response_streaming() != 0) {
  982. target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->response_streaming(), target);
  983. }
  984. // repeated .google.protobuf.Option options = 6;
  985. for (unsigned int i = 0,
  986. n = static_cast<unsigned int>(this->options_size()); i < n; i++) {
  987. target = ::google::protobuf::internal::WireFormatLite::
  988. InternalWriteMessageToArray(
  989. 6, this->options(static_cast<int>(i)), deterministic, target);
  990. }
  991. // .google.protobuf.Syntax syntax = 7;
  992. if (this->syntax() != 0) {
  993. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  994. 7, this->syntax(), target);
  995. }
  996. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  997. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  998. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  999. }
  1000. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Method)
  1001. return target;
  1002. }
  1003. size_t Method::ByteSizeLong() const {
  1004. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Method)
  1005. size_t total_size = 0;
  1006. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1007. total_size +=
  1008. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1009. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1010. }
  1011. // repeated .google.protobuf.Option options = 6;
  1012. {
  1013. unsigned int count = static_cast<unsigned int>(this->options_size());
  1014. total_size += 1UL * count;
  1015. for (unsigned int i = 0; i < count; i++) {
  1016. total_size +=
  1017. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1018. this->options(static_cast<int>(i)));
  1019. }
  1020. }
  1021. // string name = 1;
  1022. if (this->name().size() > 0) {
  1023. total_size += 1 +
  1024. ::google::protobuf::internal::WireFormatLite::StringSize(
  1025. this->name());
  1026. }
  1027. // string request_type_url = 2;
  1028. if (this->request_type_url().size() > 0) {
  1029. total_size += 1 +
  1030. ::google::protobuf::internal::WireFormatLite::StringSize(
  1031. this->request_type_url());
  1032. }
  1033. // string response_type_url = 4;
  1034. if (this->response_type_url().size() > 0) {
  1035. total_size += 1 +
  1036. ::google::protobuf::internal::WireFormatLite::StringSize(
  1037. this->response_type_url());
  1038. }
  1039. // bool request_streaming = 3;
  1040. if (this->request_streaming() != 0) {
  1041. total_size += 1 + 1;
  1042. }
  1043. // bool response_streaming = 5;
  1044. if (this->response_streaming() != 0) {
  1045. total_size += 1 + 1;
  1046. }
  1047. // .google.protobuf.Syntax syntax = 7;
  1048. if (this->syntax() != 0) {
  1049. total_size += 1 +
  1050. ::google::protobuf::internal::WireFormatLite::EnumSize(this->syntax());
  1051. }
  1052. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1053. SetCachedSize(cached_size);
  1054. return total_size;
  1055. }
  1056. void Method::MergeFrom(const ::google::protobuf::Message& from) {
  1057. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Method)
  1058. GOOGLE_DCHECK_NE(&from, this);
  1059. const Method* source =
  1060. ::google::protobuf::internal::DynamicCastToGenerated<const Method>(
  1061. &from);
  1062. if (source == NULL) {
  1063. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Method)
  1064. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1065. } else {
  1066. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Method)
  1067. MergeFrom(*source);
  1068. }
  1069. }
  1070. void Method::MergeFrom(const Method& from) {
  1071. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Method)
  1072. GOOGLE_DCHECK_NE(&from, this);
  1073. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1074. ::google::protobuf::uint32 cached_has_bits = 0;
  1075. (void) cached_has_bits;
  1076. options_.MergeFrom(from.options_);
  1077. if (from.name().size() > 0) {
  1078. name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  1079. }
  1080. if (from.request_type_url().size() > 0) {
  1081. request_type_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.request_type_url_);
  1082. }
  1083. if (from.response_type_url().size() > 0) {
  1084. response_type_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.response_type_url_);
  1085. }
  1086. if (from.request_streaming() != 0) {
  1087. set_request_streaming(from.request_streaming());
  1088. }
  1089. if (from.response_streaming() != 0) {
  1090. set_response_streaming(from.response_streaming());
  1091. }
  1092. if (from.syntax() != 0) {
  1093. set_syntax(from.syntax());
  1094. }
  1095. }
  1096. void Method::CopyFrom(const ::google::protobuf::Message& from) {
  1097. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Method)
  1098. if (&from == this) return;
  1099. Clear();
  1100. MergeFrom(from);
  1101. }
  1102. void Method::CopyFrom(const Method& from) {
  1103. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Method)
  1104. if (&from == this) return;
  1105. Clear();
  1106. MergeFrom(from);
  1107. }
  1108. bool Method::IsInitialized() const {
  1109. return true;
  1110. }
  1111. void Method::Swap(Method* other) {
  1112. if (other == this) return;
  1113. InternalSwap(other);
  1114. }
  1115. void Method::InternalSwap(Method* other) {
  1116. using std::swap;
  1117. CastToBase(&options_)->InternalSwap(CastToBase(&other->options_));
  1118. name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  1119. GetArenaNoVirtual());
  1120. request_type_url_.Swap(&other->request_type_url_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  1121. GetArenaNoVirtual());
  1122. response_type_url_.Swap(&other->response_type_url_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  1123. GetArenaNoVirtual());
  1124. swap(request_streaming_, other->request_streaming_);
  1125. swap(response_streaming_, other->response_streaming_);
  1126. swap(syntax_, other->syntax_);
  1127. _internal_metadata_.Swap(&other->_internal_metadata_);
  1128. }
  1129. ::google::protobuf::Metadata Method::GetMetadata() const {
  1130. protobuf_google_2fprotobuf_2fapi_2eproto::protobuf_AssignDescriptorsOnce();
  1131. return ::protobuf_google_2fprotobuf_2fapi_2eproto::file_level_metadata[kIndexInFileMessages];
  1132. }
  1133. // ===================================================================
  1134. void Mixin::InitAsDefaultInstance() {
  1135. }
  1136. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1137. const int Mixin::kNameFieldNumber;
  1138. const int Mixin::kRootFieldNumber;
  1139. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1140. Mixin::Mixin()
  1141. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1142. ::google::protobuf::internal::InitSCC(
  1143. &protobuf_google_2fprotobuf_2fapi_2eproto::scc_info_Mixin.base);
  1144. SharedCtor();
  1145. // @@protoc_insertion_point(constructor:google.protobuf.Mixin)
  1146. }
  1147. Mixin::Mixin(const Mixin& from)
  1148. : ::google::protobuf::Message(),
  1149. _internal_metadata_(NULL) {
  1150. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1151. name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1152. if (from.name().size() > 0) {
  1153. name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  1154. }
  1155. root_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1156. if (from.root().size() > 0) {
  1157. root_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.root_);
  1158. }
  1159. // @@protoc_insertion_point(copy_constructor:google.protobuf.Mixin)
  1160. }
  1161. void Mixin::SharedCtor() {
  1162. name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1163. root_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1164. }
  1165. Mixin::~Mixin() {
  1166. // @@protoc_insertion_point(destructor:google.protobuf.Mixin)
  1167. SharedDtor();
  1168. }
  1169. void Mixin::SharedDtor() {
  1170. name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1171. root_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1172. }
  1173. void Mixin::SetCachedSize(int size) const {
  1174. _cached_size_.Set(size);
  1175. }
  1176. const ::google::protobuf::Descriptor* Mixin::descriptor() {
  1177. ::protobuf_google_2fprotobuf_2fapi_2eproto::protobuf_AssignDescriptorsOnce();
  1178. return ::protobuf_google_2fprotobuf_2fapi_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1179. }
  1180. const Mixin& Mixin::default_instance() {
  1181. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fapi_2eproto::scc_info_Mixin.base);
  1182. return *internal_default_instance();
  1183. }
  1184. void Mixin::Clear() {
  1185. // @@protoc_insertion_point(message_clear_start:google.protobuf.Mixin)
  1186. ::google::protobuf::uint32 cached_has_bits = 0;
  1187. // Prevent compiler warnings about cached_has_bits being unused
  1188. (void) cached_has_bits;
  1189. name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1190. root_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1191. _internal_metadata_.Clear();
  1192. }
  1193. bool Mixin::MergePartialFromCodedStream(
  1194. ::google::protobuf::io::CodedInputStream* input) {
  1195. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1196. ::google::protobuf::uint32 tag;
  1197. // @@protoc_insertion_point(parse_start:google.protobuf.Mixin)
  1198. for (;;) {
  1199. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1200. tag = p.first;
  1201. if (!p.second) goto handle_unusual;
  1202. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1203. // string name = 1;
  1204. case 1: {
  1205. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1206. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1207. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1208. input, this->mutable_name()));
  1209. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1210. this->name().data(), static_cast<int>(this->name().length()),
  1211. ::google::protobuf::internal::WireFormatLite::PARSE,
  1212. "google.protobuf.Mixin.name"));
  1213. } else {
  1214. goto handle_unusual;
  1215. }
  1216. break;
  1217. }
  1218. // string root = 2;
  1219. case 2: {
  1220. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1221. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1222. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1223. input, this->mutable_root()));
  1224. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1225. this->root().data(), static_cast<int>(this->root().length()),
  1226. ::google::protobuf::internal::WireFormatLite::PARSE,
  1227. "google.protobuf.Mixin.root"));
  1228. } else {
  1229. goto handle_unusual;
  1230. }
  1231. break;
  1232. }
  1233. default: {
  1234. handle_unusual:
  1235. if (tag == 0) {
  1236. goto success;
  1237. }
  1238. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1239. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1240. break;
  1241. }
  1242. }
  1243. }
  1244. success:
  1245. // @@protoc_insertion_point(parse_success:google.protobuf.Mixin)
  1246. return true;
  1247. failure:
  1248. // @@protoc_insertion_point(parse_failure:google.protobuf.Mixin)
  1249. return false;
  1250. #undef DO_
  1251. }
  1252. void Mixin::SerializeWithCachedSizes(
  1253. ::google::protobuf::io::CodedOutputStream* output) const {
  1254. // @@protoc_insertion_point(serialize_start:google.protobuf.Mixin)
  1255. ::google::protobuf::uint32 cached_has_bits = 0;
  1256. (void) cached_has_bits;
  1257. // string name = 1;
  1258. if (this->name().size() > 0) {
  1259. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1260. this->name().data(), static_cast<int>(this->name().length()),
  1261. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1262. "google.protobuf.Mixin.name");
  1263. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  1264. 1, this->name(), output);
  1265. }
  1266. // string root = 2;
  1267. if (this->root().size() > 0) {
  1268. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1269. this->root().data(), static_cast<int>(this->root().length()),
  1270. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1271. "google.protobuf.Mixin.root");
  1272. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  1273. 2, this->root(), output);
  1274. }
  1275. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1276. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1277. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1278. }
  1279. // @@protoc_insertion_point(serialize_end:google.protobuf.Mixin)
  1280. }
  1281. ::google::protobuf::uint8* Mixin::InternalSerializeWithCachedSizesToArray(
  1282. bool deterministic, ::google::protobuf::uint8* target) const {
  1283. (void)deterministic; // Unused
  1284. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Mixin)
  1285. ::google::protobuf::uint32 cached_has_bits = 0;
  1286. (void) cached_has_bits;
  1287. // string name = 1;
  1288. if (this->name().size() > 0) {
  1289. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1290. this->name().data(), static_cast<int>(this->name().length()),
  1291. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1292. "google.protobuf.Mixin.name");
  1293. target =
  1294. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  1295. 1, this->name(), target);
  1296. }
  1297. // string root = 2;
  1298. if (this->root().size() > 0) {
  1299. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1300. this->root().data(), static_cast<int>(this->root().length()),
  1301. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1302. "google.protobuf.Mixin.root");
  1303. target =
  1304. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  1305. 2, this->root(), target);
  1306. }
  1307. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1308. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1309. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1310. }
  1311. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Mixin)
  1312. return target;
  1313. }
  1314. size_t Mixin::ByteSizeLong() const {
  1315. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Mixin)
  1316. size_t total_size = 0;
  1317. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1318. total_size +=
  1319. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1320. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1321. }
  1322. // string name = 1;
  1323. if (this->name().size() > 0) {
  1324. total_size += 1 +
  1325. ::google::protobuf::internal::WireFormatLite::StringSize(
  1326. this->name());
  1327. }
  1328. // string root = 2;
  1329. if (this->root().size() > 0) {
  1330. total_size += 1 +
  1331. ::google::protobuf::internal::WireFormatLite::StringSize(
  1332. this->root());
  1333. }
  1334. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1335. SetCachedSize(cached_size);
  1336. return total_size;
  1337. }
  1338. void Mixin::MergeFrom(const ::google::protobuf::Message& from) {
  1339. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Mixin)
  1340. GOOGLE_DCHECK_NE(&from, this);
  1341. const Mixin* source =
  1342. ::google::protobuf::internal::DynamicCastToGenerated<const Mixin>(
  1343. &from);
  1344. if (source == NULL) {
  1345. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Mixin)
  1346. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1347. } else {
  1348. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Mixin)
  1349. MergeFrom(*source);
  1350. }
  1351. }
  1352. void Mixin::MergeFrom(const Mixin& from) {
  1353. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Mixin)
  1354. GOOGLE_DCHECK_NE(&from, this);
  1355. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1356. ::google::protobuf::uint32 cached_has_bits = 0;
  1357. (void) cached_has_bits;
  1358. if (from.name().size() > 0) {
  1359. name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  1360. }
  1361. if (from.root().size() > 0) {
  1362. root_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.root_);
  1363. }
  1364. }
  1365. void Mixin::CopyFrom(const ::google::protobuf::Message& from) {
  1366. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Mixin)
  1367. if (&from == this) return;
  1368. Clear();
  1369. MergeFrom(from);
  1370. }
  1371. void Mixin::CopyFrom(const Mixin& from) {
  1372. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Mixin)
  1373. if (&from == this) return;
  1374. Clear();
  1375. MergeFrom(from);
  1376. }
  1377. bool Mixin::IsInitialized() const {
  1378. return true;
  1379. }
  1380. void Mixin::Swap(Mixin* other) {
  1381. if (other == this) return;
  1382. InternalSwap(other);
  1383. }
  1384. void Mixin::InternalSwap(Mixin* other) {
  1385. using std::swap;
  1386. name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  1387. GetArenaNoVirtual());
  1388. root_.Swap(&other->root_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  1389. GetArenaNoVirtual());
  1390. _internal_metadata_.Swap(&other->_internal_metadata_);
  1391. }
  1392. ::google::protobuf::Metadata Mixin::GetMetadata() const {
  1393. protobuf_google_2fprotobuf_2fapi_2eproto::protobuf_AssignDescriptorsOnce();
  1394. return ::protobuf_google_2fprotobuf_2fapi_2eproto::file_level_metadata[kIndexInFileMessages];
  1395. }
  1396. // @@protoc_insertion_point(namespace_scope)
  1397. } // namespace protobuf
  1398. } // namespace google
  1399. namespace google {
  1400. namespace protobuf {
  1401. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::Api* Arena::CreateMaybeMessage< ::google::protobuf::Api >(Arena* arena) {
  1402. return Arena::CreateInternal< ::google::protobuf::Api >(arena);
  1403. }
  1404. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::Method* Arena::CreateMaybeMessage< ::google::protobuf::Method >(Arena* arena) {
  1405. return Arena::CreateInternal< ::google::protobuf::Method >(arena);
  1406. }
  1407. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::Mixin* Arena::CreateMaybeMessage< ::google::protobuf::Mixin >(Arena* arena) {
  1408. return Arena::CreateInternal< ::google::protobuf::Mixin >(arena);
  1409. }
  1410. } // namespace protobuf
  1411. } // namespace google
  1412. // @@protoc_insertion_point(global_scope)