| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704 |
- /*
- * Copyright 2018 Google
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: google/api/http.proto
- #include "google/api/http.pb.h"
- #include <algorithm>
- #include <google/protobuf/stubs/common.h>
- #include <google/protobuf/io/coded_stream.h>
- #include <google/protobuf/extension_set.h>
- #include <google/protobuf/wire_format_lite.h>
- #include <google/protobuf/descriptor.h>
- #include <google/protobuf/generated_message_reflection.h>
- #include <google/protobuf/reflection_ops.h>
- #include <google/protobuf/wire_format.h>
- // @@protoc_insertion_point(includes)
- #include <google/protobuf/port_def.inc>
- extern PROTOBUF_INTERNAL_EXPORT_google_2fapi_2fhttp_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_CustomHttpPattern_google_2fapi_2fhttp_2eproto;
- extern PROTOBUF_INTERNAL_EXPORT_google_2fapi_2fhttp_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_HttpRule_google_2fapi_2fhttp_2eproto;
- namespace google {
- namespace api {
- class HttpDefaultTypeInternal {
- public:
- ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Http> _instance;
- } _Http_default_instance_;
- class HttpRuleDefaultTypeInternal {
- public:
- ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<HttpRule> _instance;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr get_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr put_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr post_;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr delete__;
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr patch_;
- const ::google::api::CustomHttpPattern* custom_;
- } _HttpRule_default_instance_;
- class CustomHttpPatternDefaultTypeInternal {
- public:
- ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<CustomHttpPattern> _instance;
- } _CustomHttpPattern_default_instance_;
- } // namespace api
- } // namespace google
- static void InitDefaultsscc_info_CustomHttpPattern_google_2fapi_2fhttp_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::google::api::_CustomHttpPattern_default_instance_;
- new (ptr) ::google::api::CustomHttpPattern();
- ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::api::CustomHttpPattern::InitAsDefaultInstance();
- }
- ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_CustomHttpPattern_google_2fapi_2fhttp_2eproto =
- {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_CustomHttpPattern_google_2fapi_2fhttp_2eproto}, {}};
- static void InitDefaultsscc_info_Http_google_2fapi_2fhttp_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::google::api::_Http_default_instance_;
- new (ptr) ::google::api::Http();
- ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::api::Http::InitAsDefaultInstance();
- }
- ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Http_google_2fapi_2fhttp_2eproto =
- {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_Http_google_2fapi_2fhttp_2eproto}, {
- &scc_info_HttpRule_google_2fapi_2fhttp_2eproto.base,}};
- static void InitDefaultsscc_info_HttpRule_google_2fapi_2fhttp_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::google::api::_HttpRule_default_instance_;
- new (ptr) ::google::api::HttpRule();
- ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::api::HttpRule::InitAsDefaultInstance();
- }
- ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_HttpRule_google_2fapi_2fhttp_2eproto =
- {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_HttpRule_google_2fapi_2fhttp_2eproto}, {
- &scc_info_CustomHttpPattern_google_2fapi_2fhttp_2eproto.base,}};
- static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fapi_2fhttp_2eproto[3];
- static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fapi_2fhttp_2eproto = nullptr;
- static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fapi_2fhttp_2eproto = nullptr;
- const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fapi_2fhttp_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::google::api::Http, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::google::api::Http, rules_),
- PROTOBUF_FIELD_OFFSET(::google::api::Http, fully_decode_reserved_expansion_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::google::api::HttpRule, _internal_metadata_),
- ~0u, // no _extensions_
- PROTOBUF_FIELD_OFFSET(::google::api::HttpRule, _oneof_case_[0]),
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::google::api::HttpRule, selector_),
- offsetof(::google::api::HttpRuleDefaultTypeInternal, get_),
- offsetof(::google::api::HttpRuleDefaultTypeInternal, put_),
- offsetof(::google::api::HttpRuleDefaultTypeInternal, post_),
- offsetof(::google::api::HttpRuleDefaultTypeInternal, delete__),
- offsetof(::google::api::HttpRuleDefaultTypeInternal, patch_),
- offsetof(::google::api::HttpRuleDefaultTypeInternal, custom_),
- PROTOBUF_FIELD_OFFSET(::google::api::HttpRule, body_),
- PROTOBUF_FIELD_OFFSET(::google::api::HttpRule, additional_bindings_),
- PROTOBUF_FIELD_OFFSET(::google::api::HttpRule, pattern_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::google::api::CustomHttpPattern, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::google::api::CustomHttpPattern, kind_),
- PROTOBUF_FIELD_OFFSET(::google::api::CustomHttpPattern, path_),
- };
- static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- { 0, -1, sizeof(::google::api::Http)},
- { 7, -1, sizeof(::google::api::HttpRule)},
- { 22, -1, sizeof(::google::api::CustomHttpPattern)},
- };
- static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::api::_Http_default_instance_),
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::api::_HttpRule_default_instance_),
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::api::_CustomHttpPattern_default_instance_),
- };
- const char descriptor_table_protodef_google_2fapi_2fhttp_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
- "\n\025google/api/http.proto\022\ngoogle.api\"T\n\004H"
- "ttp\022#\n\005rules\030\001 \003(\0132\024.google.api.HttpRule"
- "\022\'\n\037fully_decode_reserved_expansion\030\002 \001("
- "\010\"\352\001\n\010HttpRule\022\020\n\010selector\030\001 \001(\t\022\r\n\003get\030"
- "\002 \001(\tH\000\022\r\n\003put\030\003 \001(\tH\000\022\016\n\004post\030\004 \001(\tH\000\022\020"
- "\n\006delete\030\005 \001(\tH\000\022\017\n\005patch\030\006 \001(\tH\000\022/\n\006cus"
- "tom\030\010 \001(\0132\035.google.api.CustomHttpPattern"
- "H\000\022\014\n\004body\030\007 \001(\t\0221\n\023additional_bindings\030"
- "\013 \003(\0132\024.google.api.HttpRuleB\t\n\007pattern\"/"
- "\n\021CustomHttpPattern\022\014\n\004kind\030\001 \001(\t\022\014\n\004pat"
- "h\030\002 \001(\tBj\n\016com.google.apiB\tHttpProtoP\001ZA"
- "google.golang.org/genproto/googleapis/ap"
- "i/annotations;annotations\370\001\001\242\002\004GAPIb\006pro"
- "to3"
- ;
- static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_google_2fapi_2fhttp_2eproto_deps[1] = {
- };
- static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_google_2fapi_2fhttp_2eproto_sccs[3] = {
- &scc_info_CustomHttpPattern_google_2fapi_2fhttp_2eproto.base,
- &scc_info_Http_google_2fapi_2fhttp_2eproto.base,
- &scc_info_HttpRule_google_2fapi_2fhttp_2eproto.base,
- };
- static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fapi_2fhttp_2eproto_once;
- static bool descriptor_table_google_2fapi_2fhttp_2eproto_initialized = false;
- const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fapi_2fhttp_2eproto = {
- &descriptor_table_google_2fapi_2fhttp_2eproto_initialized, descriptor_table_protodef_google_2fapi_2fhttp_2eproto, "google/api/http.proto", 523,
- &descriptor_table_google_2fapi_2fhttp_2eproto_once, descriptor_table_google_2fapi_2fhttp_2eproto_sccs, descriptor_table_google_2fapi_2fhttp_2eproto_deps, 3, 0,
- schemas, file_default_instances, TableStruct_google_2fapi_2fhttp_2eproto::offsets,
- file_level_metadata_google_2fapi_2fhttp_2eproto, 3, file_level_enum_descriptors_google_2fapi_2fhttp_2eproto, file_level_service_descriptors_google_2fapi_2fhttp_2eproto,
- };
- // Force running AddDescriptors() at dynamic initialization time.
- static bool dynamic_init_dummy_google_2fapi_2fhttp_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fapi_2fhttp_2eproto), true);
- namespace google {
- namespace api {
- // ===================================================================
- void Http::InitAsDefaultInstance() {
- }
- class Http::_Internal {
- public:
- };
- Http::Http()
- : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.api.Http)
- }
- Http::Http(::PROTOBUF_NAMESPACE_ID::Arena* arena)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _internal_metadata_(arena),
- rules_(arena) {
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:google.api.Http)
- }
- Http::Http(const Http& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _internal_metadata_(nullptr),
- rules_(from.rules_) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- fully_decode_reserved_expansion_ = from.fully_decode_reserved_expansion_;
- // @@protoc_insertion_point(copy_constructor:google.api.Http)
- }
- void Http::SharedCtor() {
- ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Http_google_2fapi_2fhttp_2eproto.base);
- fully_decode_reserved_expansion_ = false;
- }
- Http::~Http() {
- // @@protoc_insertion_point(destructor:google.api.Http)
- SharedDtor();
- }
- void Http::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
- }
- void Http::ArenaDtor(void* object) {
- Http* _this = reinterpret_cast< Http* >(object);
- (void)_this;
- }
- void Http::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
- }
- void Http::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const Http& Http::default_instance() {
- ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Http_google_2fapi_2fhttp_2eproto.base);
- return *internal_default_instance();
- }
- void Http::Clear() {
- // @@protoc_insertion_point(message_clear_start:google.api.Http)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- rules_.Clear();
- fully_decode_reserved_expansion_ = false;
- _internal_metadata_.Clear();
- }
- #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- const char* Http::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
- #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena;
- while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- CHK_(ptr);
- switch (tag >> 3) {
- // repeated .google.api.HttpRule rules = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
- ptr -= 1;
- do {
- ptr += 1;
- ptr = ctx->ParseMessage(add_rules(), ptr);
- CHK_(ptr);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10);
- } else goto handle_unusual;
- continue;
- // bool fully_decode_reserved_expansion = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
- fully_decode_reserved_expansion_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- default: {
- handle_unusual:
- if ((tag & 7) == 4 || tag == 0) {
- ctx->SetLastTag(tag);
- goto success;
- }
- ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
- CHK_(ptr != nullptr);
- continue;
- }
- } // switch
- } // while
- success:
- return ptr;
- failure:
- ptr = nullptr;
- goto success;
- #undef CHK_
- }
- #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- bool Http::MergePartialFromCodedStream(
- ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
- // @@protoc_insertion_point(parse_start:google.api.Http)
- for (;;) {
- ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // repeated .google.api.HttpRule rules = 1;
- case 1: {
- if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
- input, add_rules()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // bool fully_decode_reserved_expansion = 2;
- case 2: {
- if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) {
- DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
- bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
- input, &fully_decode_reserved_expansion_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:google.api.Http)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:google.api.Http)
- return false;
- #undef DO_
- }
- #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- void Http::SerializeWithCachedSizes(
- ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.api.Http)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // repeated .google.api.HttpRule rules = 1;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->rules_size()); i < n; i++) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
- 1,
- this->rules(static_cast<int>(i)),
- output);
- }
- // bool fully_decode_reserved_expansion = 2;
- if (this->fully_decode_reserved_expansion() != 0) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(2, this->fully_decode_reserved_expansion(), output);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:google.api.Http)
- }
- ::PROTOBUF_NAMESPACE_ID::uint8* Http::InternalSerializeWithCachedSizesToArray(
- ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:google.api.Http)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // repeated .google.api.HttpRule rules = 1;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->rules_size()); i < n; i++) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 1, this->rules(static_cast<int>(i)), target);
- }
- // bool fully_decode_reserved_expansion = 2;
- if (this->fully_decode_reserved_expansion() != 0) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->fully_decode_reserved_expansion(), target);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:google.api.Http)
- return target;
- }
- size_t Http::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:google.api.Http)
- size_t total_size = 0;
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- // repeated .google.api.HttpRule rules = 1;
- {
- unsigned int count = static_cast<unsigned int>(this->rules_size());
- total_size += 1UL * count;
- for (unsigned int i = 0; i < count; i++) {
- total_size +=
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- this->rules(static_cast<int>(i)));
- }
- }
- // bool fully_decode_reserved_expansion = 2;
- if (this->fully_decode_reserved_expansion() != 0) {
- total_size += 1 + 1;
- }
- int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void Http::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:google.api.Http)
- GOOGLE_DCHECK_NE(&from, this);
- const Http* source =
- ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Http>(
- &from);
- if (source == nullptr) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.api.Http)
- ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.api.Http)
- MergeFrom(*source);
- }
- }
- void Http::MergeFrom(const Http& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:google.api.Http)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- rules_.MergeFrom(from.rules_);
- if (from.fully_decode_reserved_expansion() != 0) {
- set_fully_decode_reserved_expansion(from.fully_decode_reserved_expansion());
- }
- }
- void Http::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:google.api.Http)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void Http::CopyFrom(const Http& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:google.api.Http)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool Http::IsInitialized() const {
- return true;
- }
- void Http::InternalSwap(Http* other) {
- using std::swap;
- _internal_metadata_.Swap(&other->_internal_metadata_);
- CastToBase(&rules_)->InternalSwap(CastToBase(&other->rules_));
- swap(fully_decode_reserved_expansion_, other->fully_decode_reserved_expansion_);
- }
- ::PROTOBUF_NAMESPACE_ID::Metadata Http::GetMetadata() const {
- return GetMetadataStatic();
- }
- // ===================================================================
- void HttpRule::InitAsDefaultInstance() {
- ::google::api::_HttpRule_default_instance_.get_.UnsafeSetDefault(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- ::google::api::_HttpRule_default_instance_.put_.UnsafeSetDefault(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- ::google::api::_HttpRule_default_instance_.post_.UnsafeSetDefault(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- ::google::api::_HttpRule_default_instance_.delete__.UnsafeSetDefault(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- ::google::api::_HttpRule_default_instance_.patch_.UnsafeSetDefault(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- ::google::api::_HttpRule_default_instance_.custom_ = const_cast< ::google::api::CustomHttpPattern*>(
- ::google::api::CustomHttpPattern::internal_default_instance());
- }
- class HttpRule::_Internal {
- public:
- static const ::google::api::CustomHttpPattern& custom(const HttpRule* msg);
- };
- const ::google::api::CustomHttpPattern&
- HttpRule::_Internal::custom(const HttpRule* msg) {
- return *msg->pattern_.custom_;
- }
- void HttpRule::set_allocated_custom(::google::api::CustomHttpPattern* custom) {
- ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
- clear_pattern();
- if (custom) {
- ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
- ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(custom);
- if (message_arena != submessage_arena) {
- custom = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
- message_arena, custom, submessage_arena);
- }
- set_has_custom();
- pattern_.custom_ = custom;
- }
- // @@protoc_insertion_point(field_set_allocated:google.api.HttpRule.custom)
- }
- HttpRule::HttpRule()
- : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.api.HttpRule)
- }
- HttpRule::HttpRule(::PROTOBUF_NAMESPACE_ID::Arena* arena)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _internal_metadata_(arena),
- additional_bindings_(arena) {
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:google.api.HttpRule)
- }
- HttpRule::HttpRule(const HttpRule& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _internal_metadata_(nullptr),
- additional_bindings_(from.additional_bindings_) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- selector_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (!from.selector().empty()) {
- selector_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.selector(),
- GetArenaNoVirtual());
- }
- body_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (!from.body().empty()) {
- body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.body(),
- GetArenaNoVirtual());
- }
- clear_has_pattern();
- switch (from.pattern_case()) {
- case kGet: {
- set_get(from.get());
- break;
- }
- case kPut: {
- set_put(from.put());
- break;
- }
- case kPost: {
- set_post(from.post());
- break;
- }
- case kDelete: {
- set_delete_(from.delete_());
- break;
- }
- case kPatch: {
- set_patch(from.patch());
- break;
- }
- case kCustom: {
- mutable_custom()->::google::api::CustomHttpPattern::MergeFrom(from.custom());
- break;
- }
- case PATTERN_NOT_SET: {
- break;
- }
- }
- // @@protoc_insertion_point(copy_constructor:google.api.HttpRule)
- }
- void HttpRule::SharedCtor() {
- ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_HttpRule_google_2fapi_2fhttp_2eproto.base);
- selector_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- body_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- clear_has_pattern();
- }
- HttpRule::~HttpRule() {
- // @@protoc_insertion_point(destructor:google.api.HttpRule)
- SharedDtor();
- }
- void HttpRule::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
- selector_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- body_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (has_pattern()) {
- clear_pattern();
- }
- }
- void HttpRule::ArenaDtor(void* object) {
- HttpRule* _this = reinterpret_cast< HttpRule* >(object);
- (void)_this;
- }
- void HttpRule::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
- }
- void HttpRule::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const HttpRule& HttpRule::default_instance() {
- ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_HttpRule_google_2fapi_2fhttp_2eproto.base);
- return *internal_default_instance();
- }
- void HttpRule::clear_pattern() {
- // @@protoc_insertion_point(one_of_clear_start:google.api.HttpRule)
- switch (pattern_case()) {
- case kGet: {
- pattern_.get_.Destroy(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- break;
- }
- case kPut: {
- pattern_.put_.Destroy(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- break;
- }
- case kPost: {
- pattern_.post_.Destroy(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- break;
- }
- case kDelete: {
- pattern_.delete__.Destroy(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- break;
- }
- case kPatch: {
- pattern_.patch_.Destroy(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- break;
- }
- case kCustom: {
- if (GetArenaNoVirtual() == nullptr) {
- delete pattern_.custom_;
- }
- break;
- }
- case PATTERN_NOT_SET: {
- break;
- }
- }
- _oneof_case_[0] = PATTERN_NOT_SET;
- }
- void HttpRule::Clear() {
- // @@protoc_insertion_point(message_clear_start:google.api.HttpRule)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- additional_bindings_.Clear();
- selector_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
- body_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
- clear_pattern();
- _internal_metadata_.Clear();
- }
- #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- const char* HttpRule::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
- #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena;
- while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- CHK_(ptr);
- switch (tag >> 3) {
- // string selector = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_selector(), ptr, ctx, "google.api.HttpRule.selector");
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // string get = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_get(), ptr, ctx, "google.api.HttpRule.get");
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // string put = 3;
- case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_put(), ptr, ctx, "google.api.HttpRule.put");
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // string post = 4;
- case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_post(), ptr, ctx, "google.api.HttpRule.post");
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // string delete = 5;
- case 5:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_delete_(), ptr, ctx, "google.api.HttpRule.delete");
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // string patch = 6;
- case 6:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_patch(), ptr, ctx, "google.api.HttpRule.patch");
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // string body = 7;
- case 7:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_body(), ptr, ctx, "google.api.HttpRule.body");
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // .google.api.CustomHttpPattern custom = 8;
- case 8:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) {
- ptr = ctx->ParseMessage(mutable_custom(), ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // repeated .google.api.HttpRule additional_bindings = 11;
- case 11:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 90)) {
- ptr -= 1;
- do {
- ptr += 1;
- ptr = ctx->ParseMessage(add_additional_bindings(), ptr);
- CHK_(ptr);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 90);
- } else goto handle_unusual;
- continue;
- default: {
- handle_unusual:
- if ((tag & 7) == 4 || tag == 0) {
- ctx->SetLastTag(tag);
- goto success;
- }
- ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
- CHK_(ptr != nullptr);
- continue;
- }
- } // switch
- } // while
- success:
- return ptr;
- failure:
- ptr = nullptr;
- goto success;
- #undef CHK_
- }
- #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- bool HttpRule::MergePartialFromCodedStream(
- ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
- // @@protoc_insertion_point(parse_start:google.api.HttpRule)
- for (;;) {
- ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // string selector = 1;
- case 1: {
- if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
- input, this->mutable_selector()));
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->selector().data(), static_cast<int>(this->selector().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
- "google.api.HttpRule.selector"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string get = 2;
- case 2: {
- if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
- input, this->mutable_get()));
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->get().data(), static_cast<int>(this->get().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
- "google.api.HttpRule.get"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string put = 3;
- case 3: {
- if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
- input, this->mutable_put()));
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->put().data(), static_cast<int>(this->put().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
- "google.api.HttpRule.put"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string post = 4;
- case 4: {
- if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) {
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
- input, this->mutable_post()));
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->post().data(), static_cast<int>(this->post().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
- "google.api.HttpRule.post"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string delete = 5;
- case 5: {
- if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) {
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
- input, this->mutable_delete_()));
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->delete_().data(), static_cast<int>(this->delete_().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
- "google.api.HttpRule.delete"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string patch = 6;
- case 6: {
- if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) {
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
- input, this->mutable_patch()));
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->patch().data(), static_cast<int>(this->patch().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
- "google.api.HttpRule.patch"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string body = 7;
- case 7: {
- if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) {
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
- input, this->mutable_body()));
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->body().data(), static_cast<int>(this->body().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
- "google.api.HttpRule.body"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.api.CustomHttpPattern custom = 8;
- case 8: {
- if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (66 & 0xFF)) {
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
- input, mutable_custom()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .google.api.HttpRule additional_bindings = 11;
- case 11: {
- if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (90 & 0xFF)) {
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
- input, add_additional_bindings()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:google.api.HttpRule)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:google.api.HttpRule)
- return false;
- #undef DO_
- }
- #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- void HttpRule::SerializeWithCachedSizes(
- ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.api.HttpRule)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string selector = 1;
- if (this->selector().size() > 0) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->selector().data(), static_cast<int>(this->selector().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.selector");
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->selector(), output);
- }
- // string get = 2;
- if (has_get()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->get().data(), static_cast<int>(this->get().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.get");
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
- 2, this->get(), output);
- }
- // string put = 3;
- if (has_put()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->put().data(), static_cast<int>(this->put().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.put");
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
- 3, this->put(), output);
- }
- // string post = 4;
- if (has_post()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->post().data(), static_cast<int>(this->post().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.post");
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
- 4, this->post(), output);
- }
- // string delete = 5;
- if (has_delete_()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->delete_().data(), static_cast<int>(this->delete_().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.delete");
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
- 5, this->delete_(), output);
- }
- // string patch = 6;
- if (has_patch()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->patch().data(), static_cast<int>(this->patch().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.patch");
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
- 6, this->patch(), output);
- }
- // string body = 7;
- if (this->body().size() > 0) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->body().data(), static_cast<int>(this->body().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.body");
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
- 7, this->body(), output);
- }
- // .google.api.CustomHttpPattern custom = 8;
- if (has_custom()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
- 8, _Internal::custom(this), output);
- }
- // repeated .google.api.HttpRule additional_bindings = 11;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->additional_bindings_size()); i < n; i++) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
- 11,
- this->additional_bindings(static_cast<int>(i)),
- output);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:google.api.HttpRule)
- }
- ::PROTOBUF_NAMESPACE_ID::uint8* HttpRule::InternalSerializeWithCachedSizesToArray(
- ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:google.api.HttpRule)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string selector = 1;
- if (this->selector().size() > 0) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->selector().data(), static_cast<int>(this->selector().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.selector");
- target =
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
- 1, this->selector(), target);
- }
- // string get = 2;
- if (has_get()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->get().data(), static_cast<int>(this->get().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.get");
- target =
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
- 2, this->get(), target);
- }
- // string put = 3;
- if (has_put()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->put().data(), static_cast<int>(this->put().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.put");
- target =
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
- 3, this->put(), target);
- }
- // string post = 4;
- if (has_post()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->post().data(), static_cast<int>(this->post().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.post");
- target =
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
- 4, this->post(), target);
- }
- // string delete = 5;
- if (has_delete_()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->delete_().data(), static_cast<int>(this->delete_().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.delete");
- target =
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
- 5, this->delete_(), target);
- }
- // string patch = 6;
- if (has_patch()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->patch().data(), static_cast<int>(this->patch().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.patch");
- target =
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
- 6, this->patch(), target);
- }
- // string body = 7;
- if (this->body().size() > 0) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->body().data(), static_cast<int>(this->body().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.body");
- target =
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
- 7, this->body(), target);
- }
- // .google.api.CustomHttpPattern custom = 8;
- if (has_custom()) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 8, _Internal::custom(this), target);
- }
- // repeated .google.api.HttpRule additional_bindings = 11;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->additional_bindings_size()); i < n; i++) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 11, this->additional_bindings(static_cast<int>(i)), target);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:google.api.HttpRule)
- return target;
- }
- size_t HttpRule::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:google.api.HttpRule)
- size_t total_size = 0;
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- // repeated .google.api.HttpRule additional_bindings = 11;
- {
- unsigned int count = static_cast<unsigned int>(this->additional_bindings_size());
- total_size += 1UL * count;
- for (unsigned int i = 0; i < count; i++) {
- total_size +=
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- this->additional_bindings(static_cast<int>(i)));
- }
- }
- // string selector = 1;
- if (this->selector().size() > 0) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->selector());
- }
- // string body = 7;
- if (this->body().size() > 0) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->body());
- }
- switch (pattern_case()) {
- // string get = 2;
- case kGet: {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->get());
- break;
- }
- // string put = 3;
- case kPut: {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->put());
- break;
- }
- // string post = 4;
- case kPost: {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->post());
- break;
- }
- // string delete = 5;
- case kDelete: {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->delete_());
- break;
- }
- // string patch = 6;
- case kPatch: {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->patch());
- break;
- }
- // .google.api.CustomHttpPattern custom = 8;
- case kCustom: {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *pattern_.custom_);
- break;
- }
- case PATTERN_NOT_SET: {
- break;
- }
- }
- int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void HttpRule::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:google.api.HttpRule)
- GOOGLE_DCHECK_NE(&from, this);
- const HttpRule* source =
- ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<HttpRule>(
- &from);
- if (source == nullptr) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.api.HttpRule)
- ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.api.HttpRule)
- MergeFrom(*source);
- }
- }
- void HttpRule::MergeFrom(const HttpRule& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:google.api.HttpRule)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- additional_bindings_.MergeFrom(from.additional_bindings_);
- if (from.selector().size() > 0) {
- set_selector(from.selector());
- }
- if (from.body().size() > 0) {
- set_body(from.body());
- }
- switch (from.pattern_case()) {
- case kGet: {
- set_get(from.get());
- break;
- }
- case kPut: {
- set_put(from.put());
- break;
- }
- case kPost: {
- set_post(from.post());
- break;
- }
- case kDelete: {
- set_delete_(from.delete_());
- break;
- }
- case kPatch: {
- set_patch(from.patch());
- break;
- }
- case kCustom: {
- mutable_custom()->::google::api::CustomHttpPattern::MergeFrom(from.custom());
- break;
- }
- case PATTERN_NOT_SET: {
- break;
- }
- }
- }
- void HttpRule::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:google.api.HttpRule)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void HttpRule::CopyFrom(const HttpRule& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:google.api.HttpRule)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool HttpRule::IsInitialized() const {
- return true;
- }
- void HttpRule::InternalSwap(HttpRule* other) {
- using std::swap;
- _internal_metadata_.Swap(&other->_internal_metadata_);
- CastToBase(&additional_bindings_)->InternalSwap(CastToBase(&other->additional_bindings_));
- selector_.Swap(&other->selector_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- body_.Swap(&other->body_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- swap(pattern_, other->pattern_);
- swap(_oneof_case_[0], other->_oneof_case_[0]);
- }
- ::PROTOBUF_NAMESPACE_ID::Metadata HttpRule::GetMetadata() const {
- return GetMetadataStatic();
- }
- // ===================================================================
- void CustomHttpPattern::InitAsDefaultInstance() {
- }
- class CustomHttpPattern::_Internal {
- public:
- };
- CustomHttpPattern::CustomHttpPattern()
- : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.api.CustomHttpPattern)
- }
- CustomHttpPattern::CustomHttpPattern(::PROTOBUF_NAMESPACE_ID::Arena* arena)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _internal_metadata_(arena) {
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:google.api.CustomHttpPattern)
- }
- CustomHttpPattern::CustomHttpPattern(const CustomHttpPattern& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _internal_metadata_(nullptr) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- kind_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (!from.kind().empty()) {
- kind_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.kind(),
- GetArenaNoVirtual());
- }
- path_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (!from.path().empty()) {
- path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.path(),
- GetArenaNoVirtual());
- }
- // @@protoc_insertion_point(copy_constructor:google.api.CustomHttpPattern)
- }
- void CustomHttpPattern::SharedCtor() {
- ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_CustomHttpPattern_google_2fapi_2fhttp_2eproto.base);
- kind_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- path_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- }
- CustomHttpPattern::~CustomHttpPattern() {
- // @@protoc_insertion_point(destructor:google.api.CustomHttpPattern)
- SharedDtor();
- }
- void CustomHttpPattern::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
- kind_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- path_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- }
- void CustomHttpPattern::ArenaDtor(void* object) {
- CustomHttpPattern* _this = reinterpret_cast< CustomHttpPattern* >(object);
- (void)_this;
- }
- void CustomHttpPattern::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
- }
- void CustomHttpPattern::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const CustomHttpPattern& CustomHttpPattern::default_instance() {
- ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CustomHttpPattern_google_2fapi_2fhttp_2eproto.base);
- return *internal_default_instance();
- }
- void CustomHttpPattern::Clear() {
- // @@protoc_insertion_point(message_clear_start:google.api.CustomHttpPattern)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- kind_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
- path_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
- _internal_metadata_.Clear();
- }
- #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- const char* CustomHttpPattern::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
- #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena;
- while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- CHK_(ptr);
- switch (tag >> 3) {
- // string kind = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_kind(), ptr, ctx, "google.api.CustomHttpPattern.kind");
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // string path = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_path(), ptr, ctx, "google.api.CustomHttpPattern.path");
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- default: {
- handle_unusual:
- if ((tag & 7) == 4 || tag == 0) {
- ctx->SetLastTag(tag);
- goto success;
- }
- ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
- CHK_(ptr != nullptr);
- continue;
- }
- } // switch
- } // while
- success:
- return ptr;
- failure:
- ptr = nullptr;
- goto success;
- #undef CHK_
- }
- #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- bool CustomHttpPattern::MergePartialFromCodedStream(
- ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
- // @@protoc_insertion_point(parse_start:google.api.CustomHttpPattern)
- for (;;) {
- ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // string kind = 1;
- case 1: {
- if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
- input, this->mutable_kind()));
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->kind().data(), static_cast<int>(this->kind().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
- "google.api.CustomHttpPattern.kind"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string path = 2;
- case 2: {
- if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
- input, this->mutable_path()));
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->path().data(), static_cast<int>(this->path().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
- "google.api.CustomHttpPattern.path"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:google.api.CustomHttpPattern)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:google.api.CustomHttpPattern)
- return false;
- #undef DO_
- }
- #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- void CustomHttpPattern::SerializeWithCachedSizes(
- ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.api.CustomHttpPattern)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string kind = 1;
- if (this->kind().size() > 0) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->kind().data(), static_cast<int>(this->kind().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.CustomHttpPattern.kind");
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->kind(), output);
- }
- // string path = 2;
- if (this->path().size() > 0) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->path().data(), static_cast<int>(this->path().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.CustomHttpPattern.path");
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
- 2, this->path(), output);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:google.api.CustomHttpPattern)
- }
- ::PROTOBUF_NAMESPACE_ID::uint8* CustomHttpPattern::InternalSerializeWithCachedSizesToArray(
- ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:google.api.CustomHttpPattern)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string kind = 1;
- if (this->kind().size() > 0) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->kind().data(), static_cast<int>(this->kind().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.CustomHttpPattern.kind");
- target =
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
- 1, this->kind(), target);
- }
- // string path = 2;
- if (this->path().size() > 0) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->path().data(), static_cast<int>(this->path().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.CustomHttpPattern.path");
- target =
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
- 2, this->path(), target);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:google.api.CustomHttpPattern)
- return target;
- }
- size_t CustomHttpPattern::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:google.api.CustomHttpPattern)
- size_t total_size = 0;
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- // string kind = 1;
- if (this->kind().size() > 0) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->kind());
- }
- // string path = 2;
- if (this->path().size() > 0) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->path());
- }
- int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void CustomHttpPattern::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:google.api.CustomHttpPattern)
- GOOGLE_DCHECK_NE(&from, this);
- const CustomHttpPattern* source =
- ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<CustomHttpPattern>(
- &from);
- if (source == nullptr) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.api.CustomHttpPattern)
- ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.api.CustomHttpPattern)
- MergeFrom(*source);
- }
- }
- void CustomHttpPattern::MergeFrom(const CustomHttpPattern& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:google.api.CustomHttpPattern)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.kind().size() > 0) {
- set_kind(from.kind());
- }
- if (from.path().size() > 0) {
- set_path(from.path());
- }
- }
- void CustomHttpPattern::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:google.api.CustomHttpPattern)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void CustomHttpPattern::CopyFrom(const CustomHttpPattern& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:google.api.CustomHttpPattern)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool CustomHttpPattern::IsInitialized() const {
- return true;
- }
- void CustomHttpPattern::InternalSwap(CustomHttpPattern* other) {
- using std::swap;
- _internal_metadata_.Swap(&other->_internal_metadata_);
- kind_.Swap(&other->kind_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- path_.Swap(&other->path_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- }
- ::PROTOBUF_NAMESPACE_ID::Metadata CustomHttpPattern::GetMetadata() const {
- return GetMetadataStatic();
- }
- // @@protoc_insertion_point(namespace_scope)
- } // namespace api
- } // namespace google
- PROTOBUF_NAMESPACE_OPEN
- template<> PROTOBUF_NOINLINE ::google::api::Http* Arena::CreateMaybeMessage< ::google::api::Http >(Arena* arena) {
- return Arena::CreateMessageInternal< ::google::api::Http >(arena);
- }
- template<> PROTOBUF_NOINLINE ::google::api::HttpRule* Arena::CreateMaybeMessage< ::google::api::HttpRule >(Arena* arena) {
- return Arena::CreateMessageInternal< ::google::api::HttpRule >(arena);
- }
- template<> PROTOBUF_NOINLINE ::google::api::CustomHttpPattern* Arena::CreateMaybeMessage< ::google::api::CustomHttpPattern >(Arena* arena) {
- return Arena::CreateMessageInternal< ::google::api::CustomHttpPattern >(arena);
- }
- PROTOBUF_NAMESPACE_CLOSE
- // @@protoc_insertion_point(global_scope)
- #include <google/protobuf/port_undef.inc>
|