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