http.pb.cc 60 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659
  1. /*
  2. * Copyright 2018 Google
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. // Generated by the protocol buffer compiler. DO NOT EDIT!
  17. // source: google/api/http.proto
  18. #include "google/api/http.pb.h"
  19. #include <algorithm>
  20. #include <google/protobuf/stubs/common.h>
  21. #include <google/protobuf/stubs/port.h>
  22. #include <google/protobuf/stubs/once.h>
  23. #include <google/protobuf/io/coded_stream.h>
  24. #include <google/protobuf/wire_format_lite_inl.h>
  25. #include <google/protobuf/descriptor.h>
  26. #include <google/protobuf/generated_message_reflection.h>
  27. #include <google/protobuf/reflection_ops.h>
  28. #include <google/protobuf/wire_format.h>
  29. // This is a temporary google only hack
  30. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  31. #include "third_party/protobuf/version.h"
  32. #endif
  33. // @@protoc_insertion_point(includes)
  34. namespace google {
  35. namespace api {
  36. class HttpDefaultTypeInternal {
  37. public:
  38. ::google::protobuf::internal::ExplicitlyConstructed<Http>
  39. _instance;
  40. } _Http_default_instance_;
  41. class HttpRuleDefaultTypeInternal {
  42. public:
  43. ::google::protobuf::internal::ExplicitlyConstructed<HttpRule>
  44. _instance;
  45. ::google::protobuf::internal::ArenaStringPtr get_;
  46. ::google::protobuf::internal::ArenaStringPtr put_;
  47. ::google::protobuf::internal::ArenaStringPtr post_;
  48. ::google::protobuf::internal::ArenaStringPtr delete__;
  49. ::google::protobuf::internal::ArenaStringPtr patch_;
  50. const ::google::api::CustomHttpPattern* custom_;
  51. } _HttpRule_default_instance_;
  52. class CustomHttpPatternDefaultTypeInternal {
  53. public:
  54. ::google::protobuf::internal::ExplicitlyConstructed<CustomHttpPattern>
  55. _instance;
  56. } _CustomHttpPattern_default_instance_;
  57. } // namespace api
  58. } // namespace google
  59. namespace protobuf_google_2fapi_2fhttp_2eproto {
  60. void InitDefaultsHttpImpl() {
  61. GOOGLE_PROTOBUF_VERIFY_VERSION;
  62. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  63. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  64. #else
  65. ::google::protobuf::internal::InitProtobufDefaults();
  66. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  67. protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsHttpRule();
  68. {
  69. void* ptr = &::google::api::_Http_default_instance_;
  70. new (ptr) ::google::api::Http();
  71. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  72. }
  73. ::google::api::Http::InitAsDefaultInstance();
  74. }
  75. void InitDefaultsHttp() {
  76. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  77. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsHttpImpl);
  78. }
  79. void InitDefaultsHttpRuleImpl() {
  80. GOOGLE_PROTOBUF_VERIFY_VERSION;
  81. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  82. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  83. #else
  84. ::google::protobuf::internal::InitProtobufDefaults();
  85. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  86. protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsCustomHttpPattern();
  87. {
  88. void* ptr = &::google::api::_HttpRule_default_instance_;
  89. new (ptr) ::google::api::HttpRule();
  90. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  91. }
  92. ::google::api::HttpRule::InitAsDefaultInstance();
  93. }
  94. void InitDefaultsHttpRule() {
  95. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  96. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsHttpRuleImpl);
  97. }
  98. void InitDefaultsCustomHttpPatternImpl() {
  99. GOOGLE_PROTOBUF_VERIFY_VERSION;
  100. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  101. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  102. #else
  103. ::google::protobuf::internal::InitProtobufDefaults();
  104. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  105. {
  106. void* ptr = &::google::api::_CustomHttpPattern_default_instance_;
  107. new (ptr) ::google::api::CustomHttpPattern();
  108. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  109. }
  110. ::google::api::CustomHttpPattern::InitAsDefaultInstance();
  111. }
  112. void InitDefaultsCustomHttpPattern() {
  113. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  114. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsCustomHttpPatternImpl);
  115. }
  116. ::google::protobuf::Metadata file_level_metadata[3];
  117. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  118. ~0u, // no _has_bits_
  119. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::Http, _internal_metadata_),
  120. ~0u, // no _extensions_
  121. ~0u, // no _oneof_case_
  122. ~0u, // no _weak_field_map_
  123. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::Http, rules_),
  124. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::Http, fully_decode_reserved_expansion_),
  125. ~0u, // no _has_bits_
  126. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::HttpRule, _internal_metadata_),
  127. ~0u, // no _extensions_
  128. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::HttpRule, _oneof_case_[0]),
  129. ~0u, // no _weak_field_map_
  130. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::HttpRule, selector_),
  131. offsetof(::google::api::HttpRuleDefaultTypeInternal, get_),
  132. offsetof(::google::api::HttpRuleDefaultTypeInternal, put_),
  133. offsetof(::google::api::HttpRuleDefaultTypeInternal, post_),
  134. offsetof(::google::api::HttpRuleDefaultTypeInternal, delete__),
  135. offsetof(::google::api::HttpRuleDefaultTypeInternal, patch_),
  136. offsetof(::google::api::HttpRuleDefaultTypeInternal, custom_),
  137. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::HttpRule, body_),
  138. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::HttpRule, additional_bindings_),
  139. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::HttpRule, pattern_),
  140. ~0u, // no _has_bits_
  141. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::CustomHttpPattern, _internal_metadata_),
  142. ~0u, // no _extensions_
  143. ~0u, // no _oneof_case_
  144. ~0u, // no _weak_field_map_
  145. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::CustomHttpPattern, kind_),
  146. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::CustomHttpPattern, path_),
  147. };
  148. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  149. { 0, -1, sizeof(::google::api::Http)},
  150. { 7, -1, sizeof(::google::api::HttpRule)},
  151. { 22, -1, sizeof(::google::api::CustomHttpPattern)},
  152. };
  153. static ::google::protobuf::Message const * const file_default_instances[] = {
  154. reinterpret_cast<const ::google::protobuf::Message*>(&::google::api::_Http_default_instance_),
  155. reinterpret_cast<const ::google::protobuf::Message*>(&::google::api::_HttpRule_default_instance_),
  156. reinterpret_cast<const ::google::protobuf::Message*>(&::google::api::_CustomHttpPattern_default_instance_),
  157. };
  158. void protobuf_AssignDescriptors() {
  159. AddDescriptors();
  160. ::google::protobuf::MessageFactory* factory = NULL;
  161. AssignDescriptors(
  162. "google/api/http.proto", schemas, file_default_instances, TableStruct::offsets, factory,
  163. file_level_metadata, NULL, NULL);
  164. }
  165. void protobuf_AssignDescriptorsOnce() {
  166. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  167. ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
  168. }
  169. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  170. void protobuf_RegisterTypes(const ::std::string&) {
  171. protobuf_AssignDescriptorsOnce();
  172. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 3);
  173. }
  174. void AddDescriptorsImpl() {
  175. InitDefaults();
  176. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  177. "\n\025google/api/http.proto\022\ngoogle.api\"T\n\004H"
  178. "ttp\022#\n\005rules\030\001 \003(\0132\024.google.api.HttpRule"
  179. "\022\'\n\037fully_decode_reserved_expansion\030\002 \001("
  180. "\010\"\352\001\n\010HttpRule\022\020\n\010selector\030\001 \001(\t\022\r\n\003get\030"
  181. "\002 \001(\tH\000\022\r\n\003put\030\003 \001(\tH\000\022\016\n\004post\030\004 \001(\tH\000\022\020"
  182. "\n\006delete\030\005 \001(\tH\000\022\017\n\005patch\030\006 \001(\tH\000\022/\n\006cus"
  183. "tom\030\010 \001(\0132\035.google.api.CustomHttpPattern"
  184. "H\000\022\014\n\004body\030\007 \001(\t\0221\n\023additional_bindings\030"
  185. "\013 \003(\0132\024.google.api.HttpRuleB\t\n\007pattern\"/"
  186. "\n\021CustomHttpPattern\022\014\n\004kind\030\001 \001(\t\022\014\n\004pat"
  187. "h\030\002 \001(\tBj\n\016com.google.apiB\tHttpProtoP\001ZA"
  188. "google.golang.org/genproto/googleapis/ap"
  189. "i/annotations;annotations\370\001\001\242\002\004GAPIb\006pro"
  190. "to3"
  191. };
  192. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  193. descriptor, 523);
  194. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  195. "google/api/http.proto", &protobuf_RegisterTypes);
  196. }
  197. void AddDescriptors() {
  198. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  199. ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
  200. }
  201. // Force AddDescriptors() to be called at dynamic initialization time.
  202. struct StaticDescriptorInitializer {
  203. StaticDescriptorInitializer() {
  204. AddDescriptors();
  205. }
  206. } static_descriptor_initializer;
  207. } // namespace protobuf_google_2fapi_2fhttp_2eproto
  208. namespace google {
  209. namespace api {
  210. // ===================================================================
  211. void Http::InitAsDefaultInstance() {
  212. }
  213. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  214. const int Http::kRulesFieldNumber;
  215. const int Http::kFullyDecodeReservedExpansionFieldNumber;
  216. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  217. Http::Http()
  218. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  219. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  220. ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsHttp();
  221. }
  222. SharedCtor();
  223. // @@protoc_insertion_point(constructor:google.api.Http)
  224. }
  225. Http::Http(::google::protobuf::Arena* arena)
  226. : ::google::protobuf::Message(),
  227. _internal_metadata_(arena),
  228. rules_(arena) {
  229. ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsHttp();
  230. SharedCtor();
  231. RegisterArenaDtor(arena);
  232. // @@protoc_insertion_point(arena_constructor:google.api.Http)
  233. }
  234. Http::Http(const Http& from)
  235. : ::google::protobuf::Message(),
  236. _internal_metadata_(NULL),
  237. rules_(from.rules_),
  238. _cached_size_(0) {
  239. _internal_metadata_.MergeFrom(from._internal_metadata_);
  240. fully_decode_reserved_expansion_ = from.fully_decode_reserved_expansion_;
  241. // @@protoc_insertion_point(copy_constructor:google.api.Http)
  242. }
  243. void Http::SharedCtor() {
  244. fully_decode_reserved_expansion_ = false;
  245. _cached_size_ = 0;
  246. }
  247. Http::~Http() {
  248. // @@protoc_insertion_point(destructor:google.api.Http)
  249. SharedDtor();
  250. }
  251. void Http::SharedDtor() {
  252. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  253. }
  254. void Http::ArenaDtor(void* object) {
  255. Http* _this = reinterpret_cast< Http* >(object);
  256. (void)_this;
  257. }
  258. void Http::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  259. }
  260. void Http::SetCachedSize(int size) const {
  261. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  262. _cached_size_ = size;
  263. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  264. }
  265. const ::google::protobuf::Descriptor* Http::descriptor() {
  266. ::protobuf_google_2fapi_2fhttp_2eproto::protobuf_AssignDescriptorsOnce();
  267. return ::protobuf_google_2fapi_2fhttp_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  268. }
  269. const Http& Http::default_instance() {
  270. ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsHttp();
  271. return *internal_default_instance();
  272. }
  273. Http* Http::New(::google::protobuf::Arena* arena) const {
  274. return ::google::protobuf::Arena::CreateMessage<Http>(arena);
  275. }
  276. void Http::Clear() {
  277. // @@protoc_insertion_point(message_clear_start:google.api.Http)
  278. ::google::protobuf::uint32 cached_has_bits = 0;
  279. // Prevent compiler warnings about cached_has_bits being unused
  280. (void) cached_has_bits;
  281. rules_.Clear();
  282. fully_decode_reserved_expansion_ = false;
  283. _internal_metadata_.Clear();
  284. }
  285. bool Http::MergePartialFromCodedStream(
  286. ::google::protobuf::io::CodedInputStream* input) {
  287. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  288. ::google::protobuf::uint32 tag;
  289. // @@protoc_insertion_point(parse_start:google.api.Http)
  290. for (;;) {
  291. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  292. tag = p.first;
  293. if (!p.second) goto handle_unusual;
  294. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  295. // repeated .google.api.HttpRule rules = 1;
  296. case 1: {
  297. if (static_cast< ::google::protobuf::uint8>(tag) ==
  298. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  299. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_rules()));
  300. } else {
  301. goto handle_unusual;
  302. }
  303. break;
  304. }
  305. // bool fully_decode_reserved_expansion = 2;
  306. case 2: {
  307. if (static_cast< ::google::protobuf::uint8>(tag) ==
  308. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  309. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  310. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  311. input, &fully_decode_reserved_expansion_)));
  312. } else {
  313. goto handle_unusual;
  314. }
  315. break;
  316. }
  317. default: {
  318. handle_unusual:
  319. if (tag == 0) {
  320. goto success;
  321. }
  322. DO_(::google::protobuf::internal::WireFormat::SkipField(
  323. input, tag, _internal_metadata_.mutable_unknown_fields()));
  324. break;
  325. }
  326. }
  327. }
  328. success:
  329. // @@protoc_insertion_point(parse_success:google.api.Http)
  330. return true;
  331. failure:
  332. // @@protoc_insertion_point(parse_failure:google.api.Http)
  333. return false;
  334. #undef DO_
  335. }
  336. void Http::SerializeWithCachedSizes(
  337. ::google::protobuf::io::CodedOutputStream* output) const {
  338. // @@protoc_insertion_point(serialize_start:google.api.Http)
  339. ::google::protobuf::uint32 cached_has_bits = 0;
  340. (void) cached_has_bits;
  341. // repeated .google.api.HttpRule rules = 1;
  342. for (unsigned int i = 0,
  343. n = static_cast<unsigned int>(this->rules_size()); i < n; i++) {
  344. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  345. 1, this->rules(static_cast<int>(i)), output);
  346. }
  347. // bool fully_decode_reserved_expansion = 2;
  348. if (this->fully_decode_reserved_expansion() != 0) {
  349. ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->fully_decode_reserved_expansion(), output);
  350. }
  351. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  352. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  353. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  354. }
  355. // @@protoc_insertion_point(serialize_end:google.api.Http)
  356. }
  357. ::google::protobuf::uint8* Http::InternalSerializeWithCachedSizesToArray(
  358. bool deterministic, ::google::protobuf::uint8* target) const {
  359. (void)deterministic; // Unused
  360. // @@protoc_insertion_point(serialize_to_array_start:google.api.Http)
  361. ::google::protobuf::uint32 cached_has_bits = 0;
  362. (void) cached_has_bits;
  363. // repeated .google.api.HttpRule rules = 1;
  364. for (unsigned int i = 0,
  365. n = static_cast<unsigned int>(this->rules_size()); i < n; i++) {
  366. target = ::google::protobuf::internal::WireFormatLite::
  367. InternalWriteMessageToArray(
  368. 1, this->rules(static_cast<int>(i)), deterministic, target);
  369. }
  370. // bool fully_decode_reserved_expansion = 2;
  371. if (this->fully_decode_reserved_expansion() != 0) {
  372. target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->fully_decode_reserved_expansion(), target);
  373. }
  374. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  375. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  376. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  377. }
  378. // @@protoc_insertion_point(serialize_to_array_end:google.api.Http)
  379. return target;
  380. }
  381. size_t Http::ByteSizeLong() const {
  382. // @@protoc_insertion_point(message_byte_size_start:google.api.Http)
  383. size_t total_size = 0;
  384. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  385. total_size +=
  386. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  387. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  388. }
  389. // repeated .google.api.HttpRule rules = 1;
  390. {
  391. unsigned int count = static_cast<unsigned int>(this->rules_size());
  392. total_size += 1UL * count;
  393. for (unsigned int i = 0; i < count; i++) {
  394. total_size +=
  395. ::google::protobuf::internal::WireFormatLite::MessageSize(
  396. this->rules(static_cast<int>(i)));
  397. }
  398. }
  399. // bool fully_decode_reserved_expansion = 2;
  400. if (this->fully_decode_reserved_expansion() != 0) {
  401. total_size += 1 + 1;
  402. }
  403. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  404. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  405. _cached_size_ = cached_size;
  406. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  407. return total_size;
  408. }
  409. void Http::MergeFrom(const ::google::protobuf::Message& from) {
  410. // @@protoc_insertion_point(generalized_merge_from_start:google.api.Http)
  411. GOOGLE_DCHECK_NE(&from, this);
  412. const Http* source =
  413. ::google::protobuf::internal::DynamicCastToGenerated<const Http>(
  414. &from);
  415. if (source == NULL) {
  416. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.api.Http)
  417. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  418. } else {
  419. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.api.Http)
  420. MergeFrom(*source);
  421. }
  422. }
  423. void Http::MergeFrom(const Http& from) {
  424. // @@protoc_insertion_point(class_specific_merge_from_start:google.api.Http)
  425. GOOGLE_DCHECK_NE(&from, this);
  426. _internal_metadata_.MergeFrom(from._internal_metadata_);
  427. ::google::protobuf::uint32 cached_has_bits = 0;
  428. (void) cached_has_bits;
  429. rules_.MergeFrom(from.rules_);
  430. if (from.fully_decode_reserved_expansion() != 0) {
  431. set_fully_decode_reserved_expansion(from.fully_decode_reserved_expansion());
  432. }
  433. }
  434. void Http::CopyFrom(const ::google::protobuf::Message& from) {
  435. // @@protoc_insertion_point(generalized_copy_from_start:google.api.Http)
  436. if (&from == this) return;
  437. Clear();
  438. MergeFrom(from);
  439. }
  440. void Http::CopyFrom(const Http& from) {
  441. // @@protoc_insertion_point(class_specific_copy_from_start:google.api.Http)
  442. if (&from == this) return;
  443. Clear();
  444. MergeFrom(from);
  445. }
  446. bool Http::IsInitialized() const {
  447. return true;
  448. }
  449. void Http::Swap(Http* other) {
  450. if (other == this) return;
  451. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  452. InternalSwap(other);
  453. } else {
  454. Http* temp = New(GetArenaNoVirtual());
  455. temp->MergeFrom(*other);
  456. other->CopyFrom(*this);
  457. InternalSwap(temp);
  458. if (GetArenaNoVirtual() == NULL) {
  459. delete temp;
  460. }
  461. }
  462. }
  463. void Http::UnsafeArenaSwap(Http* other) {
  464. if (other == this) return;
  465. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  466. InternalSwap(other);
  467. }
  468. void Http::InternalSwap(Http* other) {
  469. using std::swap;
  470. rules_.InternalSwap(&other->rules_);
  471. swap(fully_decode_reserved_expansion_, other->fully_decode_reserved_expansion_);
  472. _internal_metadata_.Swap(&other->_internal_metadata_);
  473. swap(_cached_size_, other->_cached_size_);
  474. }
  475. ::google::protobuf::Metadata Http::GetMetadata() const {
  476. protobuf_google_2fapi_2fhttp_2eproto::protobuf_AssignDescriptorsOnce();
  477. return ::protobuf_google_2fapi_2fhttp_2eproto::file_level_metadata[kIndexInFileMessages];
  478. }
  479. // ===================================================================
  480. void HttpRule::InitAsDefaultInstance() {
  481. ::google::api::_HttpRule_default_instance_.get_.UnsafeSetDefault(
  482. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  483. ::google::api::_HttpRule_default_instance_.put_.UnsafeSetDefault(
  484. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  485. ::google::api::_HttpRule_default_instance_.post_.UnsafeSetDefault(
  486. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  487. ::google::api::_HttpRule_default_instance_.delete__.UnsafeSetDefault(
  488. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  489. ::google::api::_HttpRule_default_instance_.patch_.UnsafeSetDefault(
  490. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  491. ::google::api::_HttpRule_default_instance_.custom_ = const_cast< ::google::api::CustomHttpPattern*>(
  492. ::google::api::CustomHttpPattern::internal_default_instance());
  493. }
  494. void HttpRule::set_allocated_custom(::google::api::CustomHttpPattern* custom) {
  495. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  496. clear_pattern();
  497. if (custom) {
  498. ::google::protobuf::Arena* submessage_arena =
  499. ::google::protobuf::Arena::GetArena(custom);
  500. if (message_arena != submessage_arena) {
  501. custom = ::google::protobuf::internal::GetOwnedMessage(
  502. message_arena, custom, submessage_arena);
  503. }
  504. set_has_custom();
  505. pattern_.custom_ = custom;
  506. }
  507. // @@protoc_insertion_point(field_set_allocated:google.api.HttpRule.custom)
  508. }
  509. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  510. const int HttpRule::kSelectorFieldNumber;
  511. const int HttpRule::kGetFieldNumber;
  512. const int HttpRule::kPutFieldNumber;
  513. const int HttpRule::kPostFieldNumber;
  514. const int HttpRule::kDeleteFieldNumber;
  515. const int HttpRule::kPatchFieldNumber;
  516. const int HttpRule::kCustomFieldNumber;
  517. const int HttpRule::kBodyFieldNumber;
  518. const int HttpRule::kAdditionalBindingsFieldNumber;
  519. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  520. HttpRule::HttpRule()
  521. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  522. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  523. ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsHttpRule();
  524. }
  525. SharedCtor();
  526. // @@protoc_insertion_point(constructor:google.api.HttpRule)
  527. }
  528. HttpRule::HttpRule(::google::protobuf::Arena* arena)
  529. : ::google::protobuf::Message(),
  530. _internal_metadata_(arena),
  531. additional_bindings_(arena) {
  532. ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsHttpRule();
  533. SharedCtor();
  534. RegisterArenaDtor(arena);
  535. // @@protoc_insertion_point(arena_constructor:google.api.HttpRule)
  536. }
  537. HttpRule::HttpRule(const HttpRule& from)
  538. : ::google::protobuf::Message(),
  539. _internal_metadata_(NULL),
  540. additional_bindings_(from.additional_bindings_),
  541. _cached_size_(0) {
  542. _internal_metadata_.MergeFrom(from._internal_metadata_);
  543. selector_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  544. if (from.selector().size() > 0) {
  545. selector_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.selector(),
  546. GetArenaNoVirtual());
  547. }
  548. body_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  549. if (from.body().size() > 0) {
  550. body_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.body(),
  551. GetArenaNoVirtual());
  552. }
  553. clear_has_pattern();
  554. switch (from.pattern_case()) {
  555. case kGet: {
  556. set_get(from.get());
  557. break;
  558. }
  559. case kPut: {
  560. set_put(from.put());
  561. break;
  562. }
  563. case kPost: {
  564. set_post(from.post());
  565. break;
  566. }
  567. case kDelete: {
  568. set_delete_(from.delete_());
  569. break;
  570. }
  571. case kPatch: {
  572. set_patch(from.patch());
  573. break;
  574. }
  575. case kCustom: {
  576. mutable_custom()->::google::api::CustomHttpPattern::MergeFrom(from.custom());
  577. break;
  578. }
  579. case PATTERN_NOT_SET: {
  580. break;
  581. }
  582. }
  583. // @@protoc_insertion_point(copy_constructor:google.api.HttpRule)
  584. }
  585. void HttpRule::SharedCtor() {
  586. selector_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  587. body_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  588. clear_has_pattern();
  589. _cached_size_ = 0;
  590. }
  591. HttpRule::~HttpRule() {
  592. // @@protoc_insertion_point(destructor:google.api.HttpRule)
  593. SharedDtor();
  594. }
  595. void HttpRule::SharedDtor() {
  596. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  597. selector_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  598. body_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  599. if (has_pattern()) {
  600. clear_pattern();
  601. }
  602. }
  603. void HttpRule::ArenaDtor(void* object) {
  604. HttpRule* _this = reinterpret_cast< HttpRule* >(object);
  605. (void)_this;
  606. }
  607. void HttpRule::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  608. }
  609. void HttpRule::SetCachedSize(int size) const {
  610. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  611. _cached_size_ = size;
  612. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  613. }
  614. const ::google::protobuf::Descriptor* HttpRule::descriptor() {
  615. ::protobuf_google_2fapi_2fhttp_2eproto::protobuf_AssignDescriptorsOnce();
  616. return ::protobuf_google_2fapi_2fhttp_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  617. }
  618. const HttpRule& HttpRule::default_instance() {
  619. ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsHttpRule();
  620. return *internal_default_instance();
  621. }
  622. HttpRule* HttpRule::New(::google::protobuf::Arena* arena) const {
  623. return ::google::protobuf::Arena::CreateMessage<HttpRule>(arena);
  624. }
  625. void HttpRule::clear_pattern() {
  626. // @@protoc_insertion_point(one_of_clear_start:google.api.HttpRule)
  627. switch (pattern_case()) {
  628. case kGet: {
  629. pattern_.get_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  630. GetArenaNoVirtual());
  631. break;
  632. }
  633. case kPut: {
  634. pattern_.put_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  635. GetArenaNoVirtual());
  636. break;
  637. }
  638. case kPost: {
  639. pattern_.post_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  640. GetArenaNoVirtual());
  641. break;
  642. }
  643. case kDelete: {
  644. pattern_.delete__.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  645. GetArenaNoVirtual());
  646. break;
  647. }
  648. case kPatch: {
  649. pattern_.patch_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  650. GetArenaNoVirtual());
  651. break;
  652. }
  653. case kCustom: {
  654. if (GetArenaNoVirtual() == NULL) {
  655. delete pattern_.custom_;
  656. }
  657. break;
  658. }
  659. case PATTERN_NOT_SET: {
  660. break;
  661. }
  662. }
  663. _oneof_case_[0] = PATTERN_NOT_SET;
  664. }
  665. void HttpRule::Clear() {
  666. // @@protoc_insertion_point(message_clear_start:google.api.HttpRule)
  667. ::google::protobuf::uint32 cached_has_bits = 0;
  668. // Prevent compiler warnings about cached_has_bits being unused
  669. (void) cached_has_bits;
  670. additional_bindings_.Clear();
  671. selector_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
  672. body_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
  673. clear_pattern();
  674. _internal_metadata_.Clear();
  675. }
  676. bool HttpRule::MergePartialFromCodedStream(
  677. ::google::protobuf::io::CodedInputStream* input) {
  678. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  679. ::google::protobuf::uint32 tag;
  680. // @@protoc_insertion_point(parse_start:google.api.HttpRule)
  681. for (;;) {
  682. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  683. tag = p.first;
  684. if (!p.second) goto handle_unusual;
  685. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  686. // string selector = 1;
  687. case 1: {
  688. if (static_cast< ::google::protobuf::uint8>(tag) ==
  689. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  690. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  691. input, this->mutable_selector()));
  692. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  693. this->selector().data(), static_cast<int>(this->selector().length()),
  694. ::google::protobuf::internal::WireFormatLite::PARSE,
  695. "google.api.HttpRule.selector"));
  696. } else {
  697. goto handle_unusual;
  698. }
  699. break;
  700. }
  701. // string get = 2;
  702. case 2: {
  703. if (static_cast< ::google::protobuf::uint8>(tag) ==
  704. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  705. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  706. input, this->mutable_get()));
  707. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  708. this->get().data(), static_cast<int>(this->get().length()),
  709. ::google::protobuf::internal::WireFormatLite::PARSE,
  710. "google.api.HttpRule.get"));
  711. } else {
  712. goto handle_unusual;
  713. }
  714. break;
  715. }
  716. // string put = 3;
  717. case 3: {
  718. if (static_cast< ::google::protobuf::uint8>(tag) ==
  719. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  720. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  721. input, this->mutable_put()));
  722. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  723. this->put().data(), static_cast<int>(this->put().length()),
  724. ::google::protobuf::internal::WireFormatLite::PARSE,
  725. "google.api.HttpRule.put"));
  726. } else {
  727. goto handle_unusual;
  728. }
  729. break;
  730. }
  731. // string post = 4;
  732. case 4: {
  733. if (static_cast< ::google::protobuf::uint8>(tag) ==
  734. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  735. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  736. input, this->mutable_post()));
  737. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  738. this->post().data(), static_cast<int>(this->post().length()),
  739. ::google::protobuf::internal::WireFormatLite::PARSE,
  740. "google.api.HttpRule.post"));
  741. } else {
  742. goto handle_unusual;
  743. }
  744. break;
  745. }
  746. // string delete = 5;
  747. case 5: {
  748. if (static_cast< ::google::protobuf::uint8>(tag) ==
  749. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  750. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  751. input, this->mutable_delete_()));
  752. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  753. this->delete_().data(), static_cast<int>(this->delete_().length()),
  754. ::google::protobuf::internal::WireFormatLite::PARSE,
  755. "google.api.HttpRule.delete"));
  756. } else {
  757. goto handle_unusual;
  758. }
  759. break;
  760. }
  761. // string patch = 6;
  762. case 6: {
  763. if (static_cast< ::google::protobuf::uint8>(tag) ==
  764. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  765. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  766. input, this->mutable_patch()));
  767. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  768. this->patch().data(), static_cast<int>(this->patch().length()),
  769. ::google::protobuf::internal::WireFormatLite::PARSE,
  770. "google.api.HttpRule.patch"));
  771. } else {
  772. goto handle_unusual;
  773. }
  774. break;
  775. }
  776. // string body = 7;
  777. case 7: {
  778. if (static_cast< ::google::protobuf::uint8>(tag) ==
  779. static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
  780. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  781. input, this->mutable_body()));
  782. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  783. this->body().data(), static_cast<int>(this->body().length()),
  784. ::google::protobuf::internal::WireFormatLite::PARSE,
  785. "google.api.HttpRule.body"));
  786. } else {
  787. goto handle_unusual;
  788. }
  789. break;
  790. }
  791. // .google.api.CustomHttpPattern custom = 8;
  792. case 8: {
  793. if (static_cast< ::google::protobuf::uint8>(tag) ==
  794. static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
  795. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  796. input, mutable_custom()));
  797. } else {
  798. goto handle_unusual;
  799. }
  800. break;
  801. }
  802. // repeated .google.api.HttpRule additional_bindings = 11;
  803. case 11: {
  804. if (static_cast< ::google::protobuf::uint8>(tag) ==
  805. static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
  806. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_additional_bindings()));
  807. } else {
  808. goto handle_unusual;
  809. }
  810. break;
  811. }
  812. default: {
  813. handle_unusual:
  814. if (tag == 0) {
  815. goto success;
  816. }
  817. DO_(::google::protobuf::internal::WireFormat::SkipField(
  818. input, tag, _internal_metadata_.mutable_unknown_fields()));
  819. break;
  820. }
  821. }
  822. }
  823. success:
  824. // @@protoc_insertion_point(parse_success:google.api.HttpRule)
  825. return true;
  826. failure:
  827. // @@protoc_insertion_point(parse_failure:google.api.HttpRule)
  828. return false;
  829. #undef DO_
  830. }
  831. void HttpRule::SerializeWithCachedSizes(
  832. ::google::protobuf::io::CodedOutputStream* output) const {
  833. // @@protoc_insertion_point(serialize_start:google.api.HttpRule)
  834. ::google::protobuf::uint32 cached_has_bits = 0;
  835. (void) cached_has_bits;
  836. // string selector = 1;
  837. if (this->selector().size() > 0) {
  838. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  839. this->selector().data(), static_cast<int>(this->selector().length()),
  840. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  841. "google.api.HttpRule.selector");
  842. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  843. 1, this->selector(), output);
  844. }
  845. // string get = 2;
  846. if (has_get()) {
  847. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  848. this->get().data(), static_cast<int>(this->get().length()),
  849. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  850. "google.api.HttpRule.get");
  851. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  852. 2, this->get(), output);
  853. }
  854. // string put = 3;
  855. if (has_put()) {
  856. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  857. this->put().data(), static_cast<int>(this->put().length()),
  858. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  859. "google.api.HttpRule.put");
  860. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  861. 3, this->put(), output);
  862. }
  863. // string post = 4;
  864. if (has_post()) {
  865. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  866. this->post().data(), static_cast<int>(this->post().length()),
  867. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  868. "google.api.HttpRule.post");
  869. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  870. 4, this->post(), output);
  871. }
  872. // string delete = 5;
  873. if (has_delete_()) {
  874. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  875. this->delete_().data(), static_cast<int>(this->delete_().length()),
  876. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  877. "google.api.HttpRule.delete");
  878. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  879. 5, this->delete_(), output);
  880. }
  881. // string patch = 6;
  882. if (has_patch()) {
  883. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  884. this->patch().data(), static_cast<int>(this->patch().length()),
  885. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  886. "google.api.HttpRule.patch");
  887. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  888. 6, this->patch(), output);
  889. }
  890. // string body = 7;
  891. if (this->body().size() > 0) {
  892. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  893. this->body().data(), static_cast<int>(this->body().length()),
  894. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  895. "google.api.HttpRule.body");
  896. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  897. 7, this->body(), output);
  898. }
  899. // .google.api.CustomHttpPattern custom = 8;
  900. if (has_custom()) {
  901. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  902. 8, *pattern_.custom_, output);
  903. }
  904. // repeated .google.api.HttpRule additional_bindings = 11;
  905. for (unsigned int i = 0,
  906. n = static_cast<unsigned int>(this->additional_bindings_size()); i < n; i++) {
  907. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  908. 11, this->additional_bindings(static_cast<int>(i)), output);
  909. }
  910. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  911. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  912. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  913. }
  914. // @@protoc_insertion_point(serialize_end:google.api.HttpRule)
  915. }
  916. ::google::protobuf::uint8* HttpRule::InternalSerializeWithCachedSizesToArray(
  917. bool deterministic, ::google::protobuf::uint8* target) const {
  918. (void)deterministic; // Unused
  919. // @@protoc_insertion_point(serialize_to_array_start:google.api.HttpRule)
  920. ::google::protobuf::uint32 cached_has_bits = 0;
  921. (void) cached_has_bits;
  922. // string selector = 1;
  923. if (this->selector().size() > 0) {
  924. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  925. this->selector().data(), static_cast<int>(this->selector().length()),
  926. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  927. "google.api.HttpRule.selector");
  928. target =
  929. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  930. 1, this->selector(), target);
  931. }
  932. // string get = 2;
  933. if (has_get()) {
  934. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  935. this->get().data(), static_cast<int>(this->get().length()),
  936. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  937. "google.api.HttpRule.get");
  938. target =
  939. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  940. 2, this->get(), target);
  941. }
  942. // string put = 3;
  943. if (has_put()) {
  944. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  945. this->put().data(), static_cast<int>(this->put().length()),
  946. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  947. "google.api.HttpRule.put");
  948. target =
  949. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  950. 3, this->put(), target);
  951. }
  952. // string post = 4;
  953. if (has_post()) {
  954. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  955. this->post().data(), static_cast<int>(this->post().length()),
  956. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  957. "google.api.HttpRule.post");
  958. target =
  959. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  960. 4, this->post(), target);
  961. }
  962. // string delete = 5;
  963. if (has_delete_()) {
  964. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  965. this->delete_().data(), static_cast<int>(this->delete_().length()),
  966. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  967. "google.api.HttpRule.delete");
  968. target =
  969. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  970. 5, this->delete_(), target);
  971. }
  972. // string patch = 6;
  973. if (has_patch()) {
  974. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  975. this->patch().data(), static_cast<int>(this->patch().length()),
  976. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  977. "google.api.HttpRule.patch");
  978. target =
  979. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  980. 6, this->patch(), target);
  981. }
  982. // string body = 7;
  983. if (this->body().size() > 0) {
  984. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  985. this->body().data(), static_cast<int>(this->body().length()),
  986. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  987. "google.api.HttpRule.body");
  988. target =
  989. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  990. 7, this->body(), target);
  991. }
  992. // .google.api.CustomHttpPattern custom = 8;
  993. if (has_custom()) {
  994. target = ::google::protobuf::internal::WireFormatLite::
  995. InternalWriteMessageToArray(
  996. 8, *pattern_.custom_, deterministic, target);
  997. }
  998. // repeated .google.api.HttpRule additional_bindings = 11;
  999. for (unsigned int i = 0,
  1000. n = static_cast<unsigned int>(this->additional_bindings_size()); i < n; i++) {
  1001. target = ::google::protobuf::internal::WireFormatLite::
  1002. InternalWriteMessageToArray(
  1003. 11, this->additional_bindings(static_cast<int>(i)), deterministic, target);
  1004. }
  1005. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1006. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1007. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1008. }
  1009. // @@protoc_insertion_point(serialize_to_array_end:google.api.HttpRule)
  1010. return target;
  1011. }
  1012. size_t HttpRule::ByteSizeLong() const {
  1013. // @@protoc_insertion_point(message_byte_size_start:google.api.HttpRule)
  1014. size_t total_size = 0;
  1015. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1016. total_size +=
  1017. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1018. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1019. }
  1020. // repeated .google.api.HttpRule additional_bindings = 11;
  1021. {
  1022. unsigned int count = static_cast<unsigned int>(this->additional_bindings_size());
  1023. total_size += 1UL * count;
  1024. for (unsigned int i = 0; i < count; i++) {
  1025. total_size +=
  1026. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1027. this->additional_bindings(static_cast<int>(i)));
  1028. }
  1029. }
  1030. // string selector = 1;
  1031. if (this->selector().size() > 0) {
  1032. total_size += 1 +
  1033. ::google::protobuf::internal::WireFormatLite::StringSize(
  1034. this->selector());
  1035. }
  1036. // string body = 7;
  1037. if (this->body().size() > 0) {
  1038. total_size += 1 +
  1039. ::google::protobuf::internal::WireFormatLite::StringSize(
  1040. this->body());
  1041. }
  1042. switch (pattern_case()) {
  1043. // string get = 2;
  1044. case kGet: {
  1045. total_size += 1 +
  1046. ::google::protobuf::internal::WireFormatLite::StringSize(
  1047. this->get());
  1048. break;
  1049. }
  1050. // string put = 3;
  1051. case kPut: {
  1052. total_size += 1 +
  1053. ::google::protobuf::internal::WireFormatLite::StringSize(
  1054. this->put());
  1055. break;
  1056. }
  1057. // string post = 4;
  1058. case kPost: {
  1059. total_size += 1 +
  1060. ::google::protobuf::internal::WireFormatLite::StringSize(
  1061. this->post());
  1062. break;
  1063. }
  1064. // string delete = 5;
  1065. case kDelete: {
  1066. total_size += 1 +
  1067. ::google::protobuf::internal::WireFormatLite::StringSize(
  1068. this->delete_());
  1069. break;
  1070. }
  1071. // string patch = 6;
  1072. case kPatch: {
  1073. total_size += 1 +
  1074. ::google::protobuf::internal::WireFormatLite::StringSize(
  1075. this->patch());
  1076. break;
  1077. }
  1078. // .google.api.CustomHttpPattern custom = 8;
  1079. case kCustom: {
  1080. total_size += 1 +
  1081. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1082. *pattern_.custom_);
  1083. break;
  1084. }
  1085. case PATTERN_NOT_SET: {
  1086. break;
  1087. }
  1088. }
  1089. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1090. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1091. _cached_size_ = cached_size;
  1092. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1093. return total_size;
  1094. }
  1095. void HttpRule::MergeFrom(const ::google::protobuf::Message& from) {
  1096. // @@protoc_insertion_point(generalized_merge_from_start:google.api.HttpRule)
  1097. GOOGLE_DCHECK_NE(&from, this);
  1098. const HttpRule* source =
  1099. ::google::protobuf::internal::DynamicCastToGenerated<const HttpRule>(
  1100. &from);
  1101. if (source == NULL) {
  1102. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.api.HttpRule)
  1103. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1104. } else {
  1105. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.api.HttpRule)
  1106. MergeFrom(*source);
  1107. }
  1108. }
  1109. void HttpRule::MergeFrom(const HttpRule& from) {
  1110. // @@protoc_insertion_point(class_specific_merge_from_start:google.api.HttpRule)
  1111. GOOGLE_DCHECK_NE(&from, this);
  1112. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1113. ::google::protobuf::uint32 cached_has_bits = 0;
  1114. (void) cached_has_bits;
  1115. additional_bindings_.MergeFrom(from.additional_bindings_);
  1116. if (from.selector().size() > 0) {
  1117. set_selector(from.selector());
  1118. }
  1119. if (from.body().size() > 0) {
  1120. set_body(from.body());
  1121. }
  1122. switch (from.pattern_case()) {
  1123. case kGet: {
  1124. set_get(from.get());
  1125. break;
  1126. }
  1127. case kPut: {
  1128. set_put(from.put());
  1129. break;
  1130. }
  1131. case kPost: {
  1132. set_post(from.post());
  1133. break;
  1134. }
  1135. case kDelete: {
  1136. set_delete_(from.delete_());
  1137. break;
  1138. }
  1139. case kPatch: {
  1140. set_patch(from.patch());
  1141. break;
  1142. }
  1143. case kCustom: {
  1144. mutable_custom()->::google::api::CustomHttpPattern::MergeFrom(from.custom());
  1145. break;
  1146. }
  1147. case PATTERN_NOT_SET: {
  1148. break;
  1149. }
  1150. }
  1151. }
  1152. void HttpRule::CopyFrom(const ::google::protobuf::Message& from) {
  1153. // @@protoc_insertion_point(generalized_copy_from_start:google.api.HttpRule)
  1154. if (&from == this) return;
  1155. Clear();
  1156. MergeFrom(from);
  1157. }
  1158. void HttpRule::CopyFrom(const HttpRule& from) {
  1159. // @@protoc_insertion_point(class_specific_copy_from_start:google.api.HttpRule)
  1160. if (&from == this) return;
  1161. Clear();
  1162. MergeFrom(from);
  1163. }
  1164. bool HttpRule::IsInitialized() const {
  1165. return true;
  1166. }
  1167. void HttpRule::Swap(HttpRule* other) {
  1168. if (other == this) return;
  1169. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  1170. InternalSwap(other);
  1171. } else {
  1172. HttpRule* temp = New(GetArenaNoVirtual());
  1173. temp->MergeFrom(*other);
  1174. other->CopyFrom(*this);
  1175. InternalSwap(temp);
  1176. if (GetArenaNoVirtual() == NULL) {
  1177. delete temp;
  1178. }
  1179. }
  1180. }
  1181. void HttpRule::UnsafeArenaSwap(HttpRule* other) {
  1182. if (other == this) return;
  1183. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  1184. InternalSwap(other);
  1185. }
  1186. void HttpRule::InternalSwap(HttpRule* other) {
  1187. using std::swap;
  1188. additional_bindings_.InternalSwap(&other->additional_bindings_);
  1189. selector_.Swap(&other->selector_);
  1190. body_.Swap(&other->body_);
  1191. swap(pattern_, other->pattern_);
  1192. swap(_oneof_case_[0], other->_oneof_case_[0]);
  1193. _internal_metadata_.Swap(&other->_internal_metadata_);
  1194. swap(_cached_size_, other->_cached_size_);
  1195. }
  1196. ::google::protobuf::Metadata HttpRule::GetMetadata() const {
  1197. protobuf_google_2fapi_2fhttp_2eproto::protobuf_AssignDescriptorsOnce();
  1198. return ::protobuf_google_2fapi_2fhttp_2eproto::file_level_metadata[kIndexInFileMessages];
  1199. }
  1200. // ===================================================================
  1201. void CustomHttpPattern::InitAsDefaultInstance() {
  1202. }
  1203. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1204. const int CustomHttpPattern::kKindFieldNumber;
  1205. const int CustomHttpPattern::kPathFieldNumber;
  1206. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1207. CustomHttpPattern::CustomHttpPattern()
  1208. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1209. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  1210. ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsCustomHttpPattern();
  1211. }
  1212. SharedCtor();
  1213. // @@protoc_insertion_point(constructor:google.api.CustomHttpPattern)
  1214. }
  1215. CustomHttpPattern::CustomHttpPattern(::google::protobuf::Arena* arena)
  1216. : ::google::protobuf::Message(),
  1217. _internal_metadata_(arena) {
  1218. ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsCustomHttpPattern();
  1219. SharedCtor();
  1220. RegisterArenaDtor(arena);
  1221. // @@protoc_insertion_point(arena_constructor:google.api.CustomHttpPattern)
  1222. }
  1223. CustomHttpPattern::CustomHttpPattern(const CustomHttpPattern& from)
  1224. : ::google::protobuf::Message(),
  1225. _internal_metadata_(NULL),
  1226. _cached_size_(0) {
  1227. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1228. kind_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1229. if (from.kind().size() > 0) {
  1230. kind_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.kind(),
  1231. GetArenaNoVirtual());
  1232. }
  1233. path_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1234. if (from.path().size() > 0) {
  1235. path_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.path(),
  1236. GetArenaNoVirtual());
  1237. }
  1238. // @@protoc_insertion_point(copy_constructor:google.api.CustomHttpPattern)
  1239. }
  1240. void CustomHttpPattern::SharedCtor() {
  1241. kind_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1242. path_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1243. _cached_size_ = 0;
  1244. }
  1245. CustomHttpPattern::~CustomHttpPattern() {
  1246. // @@protoc_insertion_point(destructor:google.api.CustomHttpPattern)
  1247. SharedDtor();
  1248. }
  1249. void CustomHttpPattern::SharedDtor() {
  1250. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  1251. kind_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1252. path_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1253. }
  1254. void CustomHttpPattern::ArenaDtor(void* object) {
  1255. CustomHttpPattern* _this = reinterpret_cast< CustomHttpPattern* >(object);
  1256. (void)_this;
  1257. }
  1258. void CustomHttpPattern::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  1259. }
  1260. void CustomHttpPattern::SetCachedSize(int size) const {
  1261. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1262. _cached_size_ = size;
  1263. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1264. }
  1265. const ::google::protobuf::Descriptor* CustomHttpPattern::descriptor() {
  1266. ::protobuf_google_2fapi_2fhttp_2eproto::protobuf_AssignDescriptorsOnce();
  1267. return ::protobuf_google_2fapi_2fhttp_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1268. }
  1269. const CustomHttpPattern& CustomHttpPattern::default_instance() {
  1270. ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsCustomHttpPattern();
  1271. return *internal_default_instance();
  1272. }
  1273. CustomHttpPattern* CustomHttpPattern::New(::google::protobuf::Arena* arena) const {
  1274. return ::google::protobuf::Arena::CreateMessage<CustomHttpPattern>(arena);
  1275. }
  1276. void CustomHttpPattern::Clear() {
  1277. // @@protoc_insertion_point(message_clear_start:google.api.CustomHttpPattern)
  1278. ::google::protobuf::uint32 cached_has_bits = 0;
  1279. // Prevent compiler warnings about cached_has_bits being unused
  1280. (void) cached_has_bits;
  1281. kind_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
  1282. path_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
  1283. _internal_metadata_.Clear();
  1284. }
  1285. bool CustomHttpPattern::MergePartialFromCodedStream(
  1286. ::google::protobuf::io::CodedInputStream* input) {
  1287. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1288. ::google::protobuf::uint32 tag;
  1289. // @@protoc_insertion_point(parse_start:google.api.CustomHttpPattern)
  1290. for (;;) {
  1291. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1292. tag = p.first;
  1293. if (!p.second) goto handle_unusual;
  1294. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1295. // string kind = 1;
  1296. case 1: {
  1297. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1298. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1299. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1300. input, this->mutable_kind()));
  1301. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1302. this->kind().data(), static_cast<int>(this->kind().length()),
  1303. ::google::protobuf::internal::WireFormatLite::PARSE,
  1304. "google.api.CustomHttpPattern.kind"));
  1305. } else {
  1306. goto handle_unusual;
  1307. }
  1308. break;
  1309. }
  1310. // string path = 2;
  1311. case 2: {
  1312. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1313. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1314. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1315. input, this->mutable_path()));
  1316. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1317. this->path().data(), static_cast<int>(this->path().length()),
  1318. ::google::protobuf::internal::WireFormatLite::PARSE,
  1319. "google.api.CustomHttpPattern.path"));
  1320. } else {
  1321. goto handle_unusual;
  1322. }
  1323. break;
  1324. }
  1325. default: {
  1326. handle_unusual:
  1327. if (tag == 0) {
  1328. goto success;
  1329. }
  1330. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1331. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1332. break;
  1333. }
  1334. }
  1335. }
  1336. success:
  1337. // @@protoc_insertion_point(parse_success:google.api.CustomHttpPattern)
  1338. return true;
  1339. failure:
  1340. // @@protoc_insertion_point(parse_failure:google.api.CustomHttpPattern)
  1341. return false;
  1342. #undef DO_
  1343. }
  1344. void CustomHttpPattern::SerializeWithCachedSizes(
  1345. ::google::protobuf::io::CodedOutputStream* output) const {
  1346. // @@protoc_insertion_point(serialize_start:google.api.CustomHttpPattern)
  1347. ::google::protobuf::uint32 cached_has_bits = 0;
  1348. (void) cached_has_bits;
  1349. // string kind = 1;
  1350. if (this->kind().size() > 0) {
  1351. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1352. this->kind().data(), static_cast<int>(this->kind().length()),
  1353. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1354. "google.api.CustomHttpPattern.kind");
  1355. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  1356. 1, this->kind(), output);
  1357. }
  1358. // string path = 2;
  1359. if (this->path().size() > 0) {
  1360. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1361. this->path().data(), static_cast<int>(this->path().length()),
  1362. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1363. "google.api.CustomHttpPattern.path");
  1364. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  1365. 2, this->path(), output);
  1366. }
  1367. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1368. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1369. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1370. }
  1371. // @@protoc_insertion_point(serialize_end:google.api.CustomHttpPattern)
  1372. }
  1373. ::google::protobuf::uint8* CustomHttpPattern::InternalSerializeWithCachedSizesToArray(
  1374. bool deterministic, ::google::protobuf::uint8* target) const {
  1375. (void)deterministic; // Unused
  1376. // @@protoc_insertion_point(serialize_to_array_start:google.api.CustomHttpPattern)
  1377. ::google::protobuf::uint32 cached_has_bits = 0;
  1378. (void) cached_has_bits;
  1379. // string kind = 1;
  1380. if (this->kind().size() > 0) {
  1381. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1382. this->kind().data(), static_cast<int>(this->kind().length()),
  1383. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1384. "google.api.CustomHttpPattern.kind");
  1385. target =
  1386. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  1387. 1, this->kind(), target);
  1388. }
  1389. // string path = 2;
  1390. if (this->path().size() > 0) {
  1391. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1392. this->path().data(), static_cast<int>(this->path().length()),
  1393. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1394. "google.api.CustomHttpPattern.path");
  1395. target =
  1396. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  1397. 2, this->path(), target);
  1398. }
  1399. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1400. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1401. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1402. }
  1403. // @@protoc_insertion_point(serialize_to_array_end:google.api.CustomHttpPattern)
  1404. return target;
  1405. }
  1406. size_t CustomHttpPattern::ByteSizeLong() const {
  1407. // @@protoc_insertion_point(message_byte_size_start:google.api.CustomHttpPattern)
  1408. size_t total_size = 0;
  1409. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1410. total_size +=
  1411. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1412. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1413. }
  1414. // string kind = 1;
  1415. if (this->kind().size() > 0) {
  1416. total_size += 1 +
  1417. ::google::protobuf::internal::WireFormatLite::StringSize(
  1418. this->kind());
  1419. }
  1420. // string path = 2;
  1421. if (this->path().size() > 0) {
  1422. total_size += 1 +
  1423. ::google::protobuf::internal::WireFormatLite::StringSize(
  1424. this->path());
  1425. }
  1426. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1427. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1428. _cached_size_ = cached_size;
  1429. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1430. return total_size;
  1431. }
  1432. void CustomHttpPattern::MergeFrom(const ::google::protobuf::Message& from) {
  1433. // @@protoc_insertion_point(generalized_merge_from_start:google.api.CustomHttpPattern)
  1434. GOOGLE_DCHECK_NE(&from, this);
  1435. const CustomHttpPattern* source =
  1436. ::google::protobuf::internal::DynamicCastToGenerated<const CustomHttpPattern>(
  1437. &from);
  1438. if (source == NULL) {
  1439. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.api.CustomHttpPattern)
  1440. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1441. } else {
  1442. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.api.CustomHttpPattern)
  1443. MergeFrom(*source);
  1444. }
  1445. }
  1446. void CustomHttpPattern::MergeFrom(const CustomHttpPattern& from) {
  1447. // @@protoc_insertion_point(class_specific_merge_from_start:google.api.CustomHttpPattern)
  1448. GOOGLE_DCHECK_NE(&from, this);
  1449. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1450. ::google::protobuf::uint32 cached_has_bits = 0;
  1451. (void) cached_has_bits;
  1452. if (from.kind().size() > 0) {
  1453. set_kind(from.kind());
  1454. }
  1455. if (from.path().size() > 0) {
  1456. set_path(from.path());
  1457. }
  1458. }
  1459. void CustomHttpPattern::CopyFrom(const ::google::protobuf::Message& from) {
  1460. // @@protoc_insertion_point(generalized_copy_from_start:google.api.CustomHttpPattern)
  1461. if (&from == this) return;
  1462. Clear();
  1463. MergeFrom(from);
  1464. }
  1465. void CustomHttpPattern::CopyFrom(const CustomHttpPattern& from) {
  1466. // @@protoc_insertion_point(class_specific_copy_from_start:google.api.CustomHttpPattern)
  1467. if (&from == this) return;
  1468. Clear();
  1469. MergeFrom(from);
  1470. }
  1471. bool CustomHttpPattern::IsInitialized() const {
  1472. return true;
  1473. }
  1474. void CustomHttpPattern::Swap(CustomHttpPattern* other) {
  1475. if (other == this) return;
  1476. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  1477. InternalSwap(other);
  1478. } else {
  1479. CustomHttpPattern* temp = New(GetArenaNoVirtual());
  1480. temp->MergeFrom(*other);
  1481. other->CopyFrom(*this);
  1482. InternalSwap(temp);
  1483. if (GetArenaNoVirtual() == NULL) {
  1484. delete temp;
  1485. }
  1486. }
  1487. }
  1488. void CustomHttpPattern::UnsafeArenaSwap(CustomHttpPattern* other) {
  1489. if (other == this) return;
  1490. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  1491. InternalSwap(other);
  1492. }
  1493. void CustomHttpPattern::InternalSwap(CustomHttpPattern* other) {
  1494. using std::swap;
  1495. kind_.Swap(&other->kind_);
  1496. path_.Swap(&other->path_);
  1497. _internal_metadata_.Swap(&other->_internal_metadata_);
  1498. swap(_cached_size_, other->_cached_size_);
  1499. }
  1500. ::google::protobuf::Metadata CustomHttpPattern::GetMetadata() const {
  1501. protobuf_google_2fapi_2fhttp_2eproto::protobuf_AssignDescriptorsOnce();
  1502. return ::protobuf_google_2fapi_2fhttp_2eproto::file_level_metadata[kIndexInFileMessages];
  1503. }
  1504. // @@protoc_insertion_point(namespace_scope)
  1505. } // namespace api
  1506. } // namespace google
  1507. // @@protoc_insertion_point(global_scope)