api.pb.cc 61 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589
  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)