| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620 |
- /*
- * 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/stubs/port.h>
- #include <google/protobuf/stubs/once.h>
- #include <google/protobuf/io/coded_stream.h>
- #include <google/protobuf/wire_format_lite_inl.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>
- // This is a temporary google only hack
- #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- #include "third_party/protobuf/version.h"
- #endif
- // @@protoc_insertion_point(includes)
- namespace google {
- namespace api {
- class HttpDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<Http>
- _instance;
- } _Http_default_instance_;
- class HttpRuleDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<HttpRule>
- _instance;
- ::google::protobuf::internal::ArenaStringPtr get_;
- ::google::protobuf::internal::ArenaStringPtr put_;
- ::google::protobuf::internal::ArenaStringPtr post_;
- ::google::protobuf::internal::ArenaStringPtr delete__;
- ::google::protobuf::internal::ArenaStringPtr patch_;
- const ::google::api::CustomHttpPattern* custom_;
- } _HttpRule_default_instance_;
- class CustomHttpPatternDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<CustomHttpPattern>
- _instance;
- } _CustomHttpPattern_default_instance_;
- } // namespace api
- } // namespace google
- namespace protobuf_google_2fapi_2fhttp_2eproto {
- void InitDefaultsHttpImpl() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
- #else
- ::google::protobuf::internal::InitProtobufDefaults();
- #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsHttpRule();
- {
- void* ptr = &::google::api::_Http_default_instance_;
- new (ptr) ::google::api::Http();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::api::Http::InitAsDefaultInstance();
- }
- void InitDefaultsHttp() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsHttpImpl);
- }
- void InitDefaultsHttpRuleImpl() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
- #else
- ::google::protobuf::internal::InitProtobufDefaults();
- #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsCustomHttpPattern();
- {
- void* ptr = &::google::api::_HttpRule_default_instance_;
- new (ptr) ::google::api::HttpRule();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::api::HttpRule::InitAsDefaultInstance();
- }
- void InitDefaultsHttpRule() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsHttpRuleImpl);
- }
- void InitDefaultsCustomHttpPatternImpl() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
- #else
- ::google::protobuf::internal::InitProtobufDefaults();
- #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- {
- void* ptr = &::google::api::_CustomHttpPattern_default_instance_;
- new (ptr) ::google::api::CustomHttpPattern();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::api::CustomHttpPattern::InitAsDefaultInstance();
- }
- void InitDefaultsCustomHttpPattern() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsCustomHttpPatternImpl);
- }
- ::google::protobuf::Metadata file_level_metadata[3];
- const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::Http, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::Http, rules_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::HttpRule, _internal_metadata_),
- ~0u, // no _extensions_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::HttpRule, _oneof_case_[0]),
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_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_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::HttpRule, body_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::HttpRule, additional_bindings_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::HttpRule, pattern_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::CustomHttpPattern, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::CustomHttpPattern, kind_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::CustomHttpPattern, path_),
- };
- static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- { 0, -1, sizeof(::google::api::Http)},
- { 6, -1, sizeof(::google::api::HttpRule)},
- { 21, -1, sizeof(::google::api::CustomHttpPattern)},
- };
- static ::google::protobuf::Message const * const file_default_instances[] = {
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::api::_Http_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::api::_HttpRule_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::api::_CustomHttpPattern_default_instance_),
- };
- void protobuf_AssignDescriptors() {
- AddDescriptors();
- ::google::protobuf::MessageFactory* factory = NULL;
- AssignDescriptors(
- "google/api/http.proto", schemas, file_default_instances, TableStruct::offsets, factory,
- file_level_metadata, NULL, NULL);
- }
- void protobuf_AssignDescriptorsOnce() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
- }
- void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
- void protobuf_RegisterTypes(const ::std::string&) {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 3);
- }
- void AddDescriptorsImpl() {
- InitDefaults();
- static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- "\n\025google/api/http.proto\022\ngoogle.api\"+\n\004H"
- "ttp\022#\n\005rules\030\001 \003(\0132\024.google.api.HttpRule"
- "\"\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\006cust"
- "om\030\010 \001(\0132\035.google.api.CustomHttpPatternH"
- "\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\004path"
- "\030\002 \001(\tBj\n\016com.google.apiB\tHttpProtoP\001ZAg"
- "oogle.golang.org/genproto/googleapis/api"
- "/annotations;annotations\370\001\001\242\002\004GAPIb\006prot"
- "o3"
- };
- ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
- descriptor, 482);
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
- "google/api/http.proto", &protobuf_RegisterTypes);
- }
- void AddDescriptors() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
- }
- // Force AddDescriptors() to be called at dynamic initialization time.
- struct StaticDescriptorInitializer {
- StaticDescriptorInitializer() {
- AddDescriptors();
- }
- } static_descriptor_initializer;
- } // namespace protobuf_google_2fapi_2fhttp_2eproto
- namespace google {
- namespace api {
- // ===================================================================
- void Http::InitAsDefaultInstance() {
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int Http::kRulesFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- Http::Http()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsHttp();
- }
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.api.Http)
- }
- Http::Http(::google::protobuf::Arena* arena)
- : ::google::protobuf::Message(),
- _internal_metadata_(arena),
- rules_(arena) {
- ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsHttp();
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:google.api.Http)
- }
- Http::Http(const Http& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- rules_(from.rules_),
- _cached_size_(0) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- // @@protoc_insertion_point(copy_constructor:google.api.Http)
- }
- void Http::SharedCtor() {
- _cached_size_ = 0;
- }
- Http::~Http() {
- // @@protoc_insertion_point(destructor:google.api.Http)
- SharedDtor();
- }
- void Http::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
- }
- void Http::ArenaDtor(void* object) {
- Http* _this = reinterpret_cast< Http* >(object);
- (void)_this;
- }
- void Http::RegisterArenaDtor(::google::protobuf::Arena* arena) {
- }
- void Http::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- }
- const ::google::protobuf::Descriptor* Http::descriptor() {
- ::protobuf_google_2fapi_2fhttp_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fapi_2fhttp_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const Http& Http::default_instance() {
- ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsHttp();
- return *internal_default_instance();
- }
- Http* Http::New(::google::protobuf::Arena* arena) const {
- return ::google::protobuf::Arena::CreateMessage<Http>(arena);
- }
- void Http::Clear() {
- // @@protoc_insertion_point(message_clear_start:google.api.Http)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- rules_.Clear();
- _internal_metadata_.Clear();
- }
- bool Http::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:google.api.Http)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // repeated .google.api.HttpRule rules = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_rules()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::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_
- }
- void Http::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.api.Http)
- ::google::protobuf::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++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 1, this->rules(static_cast<int>(i)), output);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.api.Http)
- }
- ::google::protobuf::uint8* Http::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.api.Http)
- ::google::protobuf::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 = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 1, this->rules(static_cast<int>(i)), deterministic, target);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), 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() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // 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 +=
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- this->rules(static_cast<int>(i)));
- }
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
- }
- void Http::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:google.api.Http)
- GOOGLE_DCHECK_NE(&from, this);
- const Http* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const Http>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.api.Http)
- ::google::protobuf::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_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- rules_.MergeFrom(from.rules_);
- }
- void Http::CopyFrom(const ::google::protobuf::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::Swap(Http* other) {
- if (other == this) return;
- if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
- InternalSwap(other);
- } else {
- Http* temp = New(GetArenaNoVirtual());
- temp->MergeFrom(*other);
- other->CopyFrom(*this);
- InternalSwap(temp);
- if (GetArenaNoVirtual() == NULL) {
- delete temp;
- }
- }
- }
- void Http::UnsafeArenaSwap(Http* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
- InternalSwap(other);
- }
- void Http::InternalSwap(Http* other) {
- using std::swap;
- rules_.InternalSwap(&other->rules_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- swap(_cached_size_, other->_cached_size_);
- }
- ::google::protobuf::Metadata Http::GetMetadata() const {
- protobuf_google_2fapi_2fhttp_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fapi_2fhttp_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void HttpRule::InitAsDefaultInstance() {
- ::google::api::_HttpRule_default_instance_.get_.UnsafeSetDefault(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ::google::api::_HttpRule_default_instance_.put_.UnsafeSetDefault(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ::google::api::_HttpRule_default_instance_.post_.UnsafeSetDefault(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ::google::api::_HttpRule_default_instance_.delete__.UnsafeSetDefault(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ::google::api::_HttpRule_default_instance_.patch_.UnsafeSetDefault(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ::google::api::_HttpRule_default_instance_.custom_ = const_cast< ::google::api::CustomHttpPattern*>(
- ::google::api::CustomHttpPattern::internal_default_instance());
- }
- void HttpRule::set_allocated_custom(::google::api::CustomHttpPattern* custom) {
- ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
- clear_pattern();
- if (custom) {
- ::google::protobuf::Arena* submessage_arena =
- ::google::protobuf::Arena::GetArena(custom);
- if (message_arena != submessage_arena) {
- custom = ::google::protobuf::internal::GetOwnedMessage(
- message_arena, custom, submessage_arena);
- }
- set_has_custom();
- pattern_.custom_ = custom;
- }
- // @@protoc_insertion_point(field_set_allocated:google.api.HttpRule.custom)
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int HttpRule::kSelectorFieldNumber;
- const int HttpRule::kGetFieldNumber;
- const int HttpRule::kPutFieldNumber;
- const int HttpRule::kPostFieldNumber;
- const int HttpRule::kDeleteFieldNumber;
- const int HttpRule::kPatchFieldNumber;
- const int HttpRule::kCustomFieldNumber;
- const int HttpRule::kBodyFieldNumber;
- const int HttpRule::kAdditionalBindingsFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- HttpRule::HttpRule()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsHttpRule();
- }
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.api.HttpRule)
- }
- HttpRule::HttpRule(::google::protobuf::Arena* arena)
- : ::google::protobuf::Message(),
- _internal_metadata_(arena),
- additional_bindings_(arena) {
- ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsHttpRule();
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:google.api.HttpRule)
- }
- HttpRule::HttpRule(const HttpRule& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- additional_bindings_(from.additional_bindings_),
- _cached_size_(0) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- selector_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.selector().size() > 0) {
- selector_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.selector(),
- GetArenaNoVirtual());
- }
- body_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.body().size() > 0) {
- body_.Set(&::google::protobuf::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() {
- selector_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- body_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- clear_has_pattern();
- _cached_size_ = 0;
- }
- HttpRule::~HttpRule() {
- // @@protoc_insertion_point(destructor:google.api.HttpRule)
- SharedDtor();
- }
- void HttpRule::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
- selector_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- body_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (has_pattern()) {
- clear_pattern();
- }
- }
- void HttpRule::ArenaDtor(void* object) {
- HttpRule* _this = reinterpret_cast< HttpRule* >(object);
- (void)_this;
- }
- void HttpRule::RegisterArenaDtor(::google::protobuf::Arena* arena) {
- }
- void HttpRule::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- }
- const ::google::protobuf::Descriptor* HttpRule::descriptor() {
- ::protobuf_google_2fapi_2fhttp_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fapi_2fhttp_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const HttpRule& HttpRule::default_instance() {
- ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsHttpRule();
- return *internal_default_instance();
- }
- HttpRule* HttpRule::New(::google::protobuf::Arena* arena) const {
- return ::google::protobuf::Arena::CreateMessage<HttpRule>(arena);
- }
- void HttpRule::clear_pattern() {
- // @@protoc_insertion_point(one_of_clear_start:google.api.HttpRule)
- switch (pattern_case()) {
- case kGet: {
- pattern_.get_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- break;
- }
- case kPut: {
- pattern_.put_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- break;
- }
- case kPost: {
- pattern_.post_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- break;
- }
- case kDelete: {
- pattern_.delete__.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- break;
- }
- case kPatch: {
- pattern_.patch_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- break;
- }
- case kCustom: {
- if (GetArenaNoVirtual() == NULL) {
- 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)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- additional_bindings_.Clear();
- selector_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
- body_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
- clear_pattern();
- _internal_metadata_.Clear();
- }
- bool HttpRule::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:google.api.HttpRule)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // string selector = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_selector()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->selector().data(), static_cast<int>(this->selector().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.api.HttpRule.selector"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string get = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_get()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->get().data(), static_cast<int>(this->get().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.api.HttpRule.get"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string put = 3;
- case 3: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_put()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->put().data(), static_cast<int>(this->put().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.api.HttpRule.put"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string post = 4;
- case 4: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_post()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->post().data(), static_cast<int>(this->post().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.api.HttpRule.post"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string delete = 5;
- case 5: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_delete_()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->delete_().data(), static_cast<int>(this->delete_().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.api.HttpRule.delete"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string patch = 6;
- case 6: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_patch()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->patch().data(), static_cast<int>(this->patch().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.api.HttpRule.patch"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string body = 7;
- case 7: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_body()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->body().data(), static_cast<int>(this->body().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.api.HttpRule.body"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.api.CustomHttpPattern custom = 8;
- case 8: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_custom()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .google.api.HttpRule additional_bindings = 11;
- case 11: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_additional_bindings()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::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_
- }
- void HttpRule::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.api.HttpRule)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string selector = 1;
- if (this->selector().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->selector().data(), static_cast<int>(this->selector().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.selector");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->selector(), output);
- }
- // string get = 2;
- if (has_get()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->get().data(), static_cast<int>(this->get().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.get");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 2, this->get(), output);
- }
- // string put = 3;
- if (has_put()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->put().data(), static_cast<int>(this->put().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.put");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 3, this->put(), output);
- }
- // string post = 4;
- if (has_post()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->post().data(), static_cast<int>(this->post().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.post");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 4, this->post(), output);
- }
- // string delete = 5;
- if (has_delete_()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->delete_().data(), static_cast<int>(this->delete_().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.delete");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 5, this->delete_(), output);
- }
- // string patch = 6;
- if (has_patch()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->patch().data(), static_cast<int>(this->patch().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.patch");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 6, this->patch(), output);
- }
- // string body = 7;
- if (this->body().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->body().data(), static_cast<int>(this->body().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.body");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 7, this->body(), output);
- }
- // .google.api.CustomHttpPattern custom = 8;
- if (has_custom()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 8, *pattern_.custom_, 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++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 11, this->additional_bindings(static_cast<int>(i)), output);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.api.HttpRule)
- }
- ::google::protobuf::uint8* HttpRule::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.api.HttpRule)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string selector = 1;
- if (this->selector().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->selector().data(), static_cast<int>(this->selector().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.selector");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->selector(), target);
- }
- // string get = 2;
- if (has_get()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->get().data(), static_cast<int>(this->get().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.get");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 2, this->get(), target);
- }
- // string put = 3;
- if (has_put()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->put().data(), static_cast<int>(this->put().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.put");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 3, this->put(), target);
- }
- // string post = 4;
- if (has_post()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->post().data(), static_cast<int>(this->post().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.post");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 4, this->post(), target);
- }
- // string delete = 5;
- if (has_delete_()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->delete_().data(), static_cast<int>(this->delete_().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.delete");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 5, this->delete_(), target);
- }
- // string patch = 6;
- if (has_patch()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->patch().data(), static_cast<int>(this->patch().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.patch");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 6, this->patch(), target);
- }
- // string body = 7;
- if (this->body().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->body().data(), static_cast<int>(this->body().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.body");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 7, this->body(), target);
- }
- // .google.api.CustomHttpPattern custom = 8;
- if (has_custom()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 8, *pattern_.custom_, deterministic, 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 = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 11, this->additional_bindings(static_cast<int>(i)), deterministic, target);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), 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() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // 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 +=
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- this->additional_bindings(static_cast<int>(i)));
- }
- }
- // string selector = 1;
- if (this->selector().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->selector());
- }
- // string body = 7;
- if (this->body().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->body());
- }
- switch (pattern_case()) {
- // string get = 2;
- case kGet: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->get());
- break;
- }
- // string put = 3;
- case kPut: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->put());
- break;
- }
- // string post = 4;
- case kPost: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->post());
- break;
- }
- // string delete = 5;
- case kDelete: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->delete_());
- break;
- }
- // string patch = 6;
- case kPatch: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->patch());
- break;
- }
- // .google.api.CustomHttpPattern custom = 8;
- case kCustom: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *pattern_.custom_);
- break;
- }
- case PATTERN_NOT_SET: {
- break;
- }
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
- }
- void HttpRule::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:google.api.HttpRule)
- GOOGLE_DCHECK_NE(&from, this);
- const HttpRule* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const HttpRule>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.api.HttpRule)
- ::google::protobuf::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_);
- ::google::protobuf::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 ::google::protobuf::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::Swap(HttpRule* other) {
- if (other == this) return;
- if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
- InternalSwap(other);
- } else {
- HttpRule* temp = New(GetArenaNoVirtual());
- temp->MergeFrom(*other);
- other->CopyFrom(*this);
- InternalSwap(temp);
- if (GetArenaNoVirtual() == NULL) {
- delete temp;
- }
- }
- }
- void HttpRule::UnsafeArenaSwap(HttpRule* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
- InternalSwap(other);
- }
- void HttpRule::InternalSwap(HttpRule* other) {
- using std::swap;
- additional_bindings_.InternalSwap(&other->additional_bindings_);
- selector_.Swap(&other->selector_);
- body_.Swap(&other->body_);
- swap(pattern_, other->pattern_);
- swap(_oneof_case_[0], other->_oneof_case_[0]);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- swap(_cached_size_, other->_cached_size_);
- }
- ::google::protobuf::Metadata HttpRule::GetMetadata() const {
- protobuf_google_2fapi_2fhttp_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fapi_2fhttp_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void CustomHttpPattern::InitAsDefaultInstance() {
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int CustomHttpPattern::kKindFieldNumber;
- const int CustomHttpPattern::kPathFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- CustomHttpPattern::CustomHttpPattern()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsCustomHttpPattern();
- }
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.api.CustomHttpPattern)
- }
- CustomHttpPattern::CustomHttpPattern(::google::protobuf::Arena* arena)
- : ::google::protobuf::Message(),
- _internal_metadata_(arena) {
- ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsCustomHttpPattern();
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:google.api.CustomHttpPattern)
- }
- CustomHttpPattern::CustomHttpPattern(const CustomHttpPattern& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _cached_size_(0) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- kind_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.kind().size() > 0) {
- kind_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.kind(),
- GetArenaNoVirtual());
- }
- path_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.path().size() > 0) {
- path_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.path(),
- GetArenaNoVirtual());
- }
- // @@protoc_insertion_point(copy_constructor:google.api.CustomHttpPattern)
- }
- void CustomHttpPattern::SharedCtor() {
- kind_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- path_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- _cached_size_ = 0;
- }
- CustomHttpPattern::~CustomHttpPattern() {
- // @@protoc_insertion_point(destructor:google.api.CustomHttpPattern)
- SharedDtor();
- }
- void CustomHttpPattern::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
- kind_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- path_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- void CustomHttpPattern::ArenaDtor(void* object) {
- CustomHttpPattern* _this = reinterpret_cast< CustomHttpPattern* >(object);
- (void)_this;
- }
- void CustomHttpPattern::RegisterArenaDtor(::google::protobuf::Arena* arena) {
- }
- void CustomHttpPattern::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- }
- const ::google::protobuf::Descriptor* CustomHttpPattern::descriptor() {
- ::protobuf_google_2fapi_2fhttp_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fapi_2fhttp_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const CustomHttpPattern& CustomHttpPattern::default_instance() {
- ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsCustomHttpPattern();
- return *internal_default_instance();
- }
- CustomHttpPattern* CustomHttpPattern::New(::google::protobuf::Arena* arena) const {
- return ::google::protobuf::Arena::CreateMessage<CustomHttpPattern>(arena);
- }
- void CustomHttpPattern::Clear() {
- // @@protoc_insertion_point(message_clear_start:google.api.CustomHttpPattern)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- kind_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
- path_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
- _internal_metadata_.Clear();
- }
- bool CustomHttpPattern::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:google.api.CustomHttpPattern)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // string kind = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_kind()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->kind().data(), static_cast<int>(this->kind().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.api.CustomHttpPattern.kind"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string path = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_path()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->path().data(), static_cast<int>(this->path().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.api.CustomHttpPattern.path"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::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_
- }
- void CustomHttpPattern::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.api.CustomHttpPattern)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string kind = 1;
- if (this->kind().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->kind().data(), static_cast<int>(this->kind().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.api.CustomHttpPattern.kind");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->kind(), output);
- }
- // string path = 2;
- if (this->path().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->path().data(), static_cast<int>(this->path().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.api.CustomHttpPattern.path");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 2, this->path(), output);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.api.CustomHttpPattern)
- }
- ::google::protobuf::uint8* CustomHttpPattern::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.api.CustomHttpPattern)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string kind = 1;
- if (this->kind().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->kind().data(), static_cast<int>(this->kind().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.api.CustomHttpPattern.kind");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->kind(), target);
- }
- // string path = 2;
- if (this->path().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->path().data(), static_cast<int>(this->path().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.api.CustomHttpPattern.path");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 2, this->path(), target);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), 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() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // string kind = 1;
- if (this->kind().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->kind());
- }
- // string path = 2;
- if (this->path().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->path());
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
- }
- void CustomHttpPattern::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:google.api.CustomHttpPattern)
- GOOGLE_DCHECK_NE(&from, this);
- const CustomHttpPattern* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const CustomHttpPattern>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.api.CustomHttpPattern)
- ::google::protobuf::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_);
- ::google::protobuf::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 ::google::protobuf::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::Swap(CustomHttpPattern* other) {
- if (other == this) return;
- if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
- InternalSwap(other);
- } else {
- CustomHttpPattern* temp = New(GetArenaNoVirtual());
- temp->MergeFrom(*other);
- other->CopyFrom(*this);
- InternalSwap(temp);
- if (GetArenaNoVirtual() == NULL) {
- delete temp;
- }
- }
- }
- void CustomHttpPattern::UnsafeArenaSwap(CustomHttpPattern* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
- InternalSwap(other);
- }
- void CustomHttpPattern::InternalSwap(CustomHttpPattern* other) {
- using std::swap;
- kind_.Swap(&other->kind_);
- path_.Swap(&other->path_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- swap(_cached_size_, other->_cached_size_);
- }
- ::google::protobuf::Metadata CustomHttpPattern::GetMetadata() const {
- protobuf_google_2fapi_2fhttp_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fapi_2fhttp_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // @@protoc_insertion_point(namespace_scope)
- } // namespace api
- } // namespace google
- // @@protoc_insertion_point(global_scope)
|