| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268 |
- /*
- * Copyright 2022 Google LLC
- *
- * 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/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, 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, 0, 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, 0, 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();
- }
- 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(_internal_add_rules(), ptr);
- CHK_(ptr);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
- } 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_
- }
- ::PROTOBUF_NAMESPACE_ID::uint8* Http::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) 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->_internal_rules_size()); i < n; i++) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessage(1, this->_internal_rules(i), target, stream);
- }
- // bool fully_decode_reserved_expansion = 2;
- if (this->fully_decode_reserved_expansion() != 0) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_fully_decode_reserved_expansion(), target);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target, stream);
- }
- // @@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;
- ::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;
- total_size += 1UL * this->_internal_rules_size();
- for (const auto& msg : this->rules_) {
- total_size +=
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
- // bool fully_decode_reserved_expansion = 2;
- if (this->fully_decode_reserved_expansion() != 0) {
- total_size += 1 + 1;
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
- _internal_metadata_, total_size, &_cached_size_);
- }
- 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) {
- _internal_set_fully_decode_reserved_expansion(from._internal_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_);
- rules_.InternalSwap(&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._internal_selector().empty()) {
- selector_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_selector(),
- GetArenaNoVirtual());
- }
- body_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (!from._internal_body().empty()) {
- body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_body(),
- GetArenaNoVirtual());
- }
- clear_has_pattern();
- switch (from.pattern_case()) {
- case kGet: {
- _internal_set_get(from._internal_get());
- break;
- }
- case kPut: {
- _internal_set_put(from._internal_put());
- break;
- }
- case kPost: {
- _internal_set_post(from._internal_post());
- break;
- }
- case kDelete: {
- _internal_set_delete_(from._internal_delete_());
- break;
- }
- case kPatch: {
- _internal_set_patch(from._internal_patch());
- break;
- }
- case kCustom: {
- _internal_mutable_custom()->::google::api::CustomHttpPattern::MergeFrom(from._internal_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();
- }
- 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)) {
- auto str = _internal_mutable_selector();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "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)) {
- auto str = _internal_mutable_get();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "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)) {
- auto str = _internal_mutable_put();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "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)) {
- auto str = _internal_mutable_post();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "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)) {
- auto str = _internal_mutable_delete_();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "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)) {
- auto str = _internal_mutable_patch();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "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)) {
- auto str = _internal_mutable_body();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "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(_internal_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(_internal_add_additional_bindings(), ptr);
- CHK_(ptr);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<90>(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_
- }
- ::PROTOBUF_NAMESPACE_ID::uint8* HttpRule::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) 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->_internal_selector().data(), static_cast<int>(this->_internal_selector().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.selector");
- target = stream->WriteStringMaybeAliased(
- 1, this->_internal_selector(), target);
- }
- // string get = 2;
- if (_internal_has_get()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->_internal_get().data(), static_cast<int>(this->_internal_get().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.get");
- target = stream->WriteStringMaybeAliased(
- 2, this->_internal_get(), target);
- }
- // string put = 3;
- if (_internal_has_put()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->_internal_put().data(), static_cast<int>(this->_internal_put().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.put");
- target = stream->WriteStringMaybeAliased(
- 3, this->_internal_put(), target);
- }
- // string post = 4;
- if (_internal_has_post()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->_internal_post().data(), static_cast<int>(this->_internal_post().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.post");
- target = stream->WriteStringMaybeAliased(
- 4, this->_internal_post(), target);
- }
- // string delete = 5;
- if (_internal_has_delete_()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->_internal_delete_().data(), static_cast<int>(this->_internal_delete_().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.delete");
- target = stream->WriteStringMaybeAliased(
- 5, this->_internal_delete_(), target);
- }
- // string patch = 6;
- if (_internal_has_patch()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->_internal_patch().data(), static_cast<int>(this->_internal_patch().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.patch");
- target = stream->WriteStringMaybeAliased(
- 6, this->_internal_patch(), target);
- }
- // string body = 7;
- if (this->body().size() > 0) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->_internal_body().data(), static_cast<int>(this->_internal_body().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.HttpRule.body");
- target = stream->WriteStringMaybeAliased(
- 7, this->_internal_body(), target);
- }
- // .google.api.CustomHttpPattern custom = 8;
- if (_internal_has_custom()) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessage(
- 8, _Internal::custom(this), target, stream);
- }
- // repeated .google.api.HttpRule additional_bindings = 11;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->_internal_additional_bindings_size()); i < n; i++) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessage(11, this->_internal_additional_bindings(i), target, stream);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target, stream);
- }
- // @@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;
- ::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;
- total_size += 1UL * this->_internal_additional_bindings_size();
- for (const auto& msg : this->additional_bindings_) {
- total_size +=
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
- // string selector = 1;
- if (this->selector().size() > 0) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_selector());
- }
- // string body = 7;
- if (this->body().size() > 0) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_body());
- }
- switch (pattern_case()) {
- // string get = 2;
- case kGet: {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_get());
- break;
- }
- // string put = 3;
- case kPut: {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_put());
- break;
- }
- // string post = 4;
- case kPost: {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_post());
- break;
- }
- // string delete = 5;
- case kDelete: {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_delete_());
- break;
- }
- // string patch = 6;
- case kPatch: {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_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;
- }
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
- _internal_metadata_, total_size, &_cached_size_);
- }
- 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) {
- _internal_set_selector(from._internal_selector());
- }
- if (from.body().size() > 0) {
- _internal_set_body(from._internal_body());
- }
- switch (from.pattern_case()) {
- case kGet: {
- _internal_set_get(from._internal_get());
- break;
- }
- case kPut: {
- _internal_set_put(from._internal_put());
- break;
- }
- case kPost: {
- _internal_set_post(from._internal_post());
- break;
- }
- case kDelete: {
- _internal_set_delete_(from._internal_delete_());
- break;
- }
- case kPatch: {
- _internal_set_patch(from._internal_patch());
- break;
- }
- case kCustom: {
- _internal_mutable_custom()->::google::api::CustomHttpPattern::MergeFrom(from._internal_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_);
- additional_bindings_.InternalSwap(&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._internal_kind().empty()) {
- kind_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_kind(),
- GetArenaNoVirtual());
- }
- path_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (!from._internal_path().empty()) {
- path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_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();
- }
- 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)) {
- auto str = _internal_mutable_kind();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "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)) {
- auto str = _internal_mutable_path();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "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_
- }
- ::PROTOBUF_NAMESPACE_ID::uint8* CustomHttpPattern::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) 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->_internal_kind().data(), static_cast<int>(this->_internal_kind().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.CustomHttpPattern.kind");
- target = stream->WriteStringMaybeAliased(
- 1, this->_internal_kind(), target);
- }
- // string path = 2;
- if (this->path().size() > 0) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->_internal_path().data(), static_cast<int>(this->_internal_path().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "google.api.CustomHttpPattern.path");
- target = stream->WriteStringMaybeAliased(
- 2, this->_internal_path(), target);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target, stream);
- }
- // @@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;
- ::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->_internal_kind());
- }
- // string path = 2;
- if (this->path().size() > 0) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_path());
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
- _internal_metadata_, total_size, &_cached_size_);
- }
- 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) {
- _internal_set_kind(from._internal_kind());
- }
- if (from.path().size() > 0) {
- _internal_set_path(from._internal_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>
|