diff options
Diffstat (limited to 'Firestore/Protos/cpp/google/api/http.pb.cc')
-rw-r--r-- | Firestore/Protos/cpp/google/api/http.pb.cc | 1620 |
1 files changed, 1620 insertions, 0 deletions
diff --git a/Firestore/Protos/cpp/google/api/http.pb.cc b/Firestore/Protos/cpp/google/api/http.pb.cc new file mode 100644 index 0000000..b691cfd --- /dev/null +++ b/Firestore/Protos/cpp/google/api/http.pb.cc @@ -0,0 +1,1620 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +#include "google/api/http.pb.h" + +#include <algorithm> + +#include <google/protobuf/stubs/common.h> +#include <google/protobuf/stubs/port.h> +#include <google/protobuf/stubs/once.h> +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/wire_format_lite_inl.h> +#include <google/protobuf/descriptor.h> +#include <google/protobuf/generated_message_reflection.h> +#include <google/protobuf/reflection_ops.h> +#include <google/protobuf/wire_format.h> +// This is a temporary google only hack +#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS +#include "third_party/protobuf/version.h" +#endif +// @@protoc_insertion_point(includes) +namespace google { +namespace api { +class HttpDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed<Http> + _instance; +} _Http_default_instance_; +class HttpRuleDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed<HttpRule> + _instance; + ::google::protobuf::internal::ArenaStringPtr get_; + ::google::protobuf::internal::ArenaStringPtr put_; + ::google::protobuf::internal::ArenaStringPtr post_; + ::google::protobuf::internal::ArenaStringPtr delete__; + ::google::protobuf::internal::ArenaStringPtr patch_; + const ::google::api::CustomHttpPattern* custom_; +} _HttpRule_default_instance_; +class CustomHttpPatternDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed<CustomHttpPattern> + _instance; +} _CustomHttpPattern_default_instance_; +} // namespace api +} // namespace google +namespace protobuf_google_2fapi_2fhttp_2eproto { +void InitDefaultsHttpImpl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + +#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); +#else + ::google::protobuf::internal::InitProtobufDefaults(); +#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsHttpRule(); + { + void* ptr = &::google::api::_Http_default_instance_; + new (ptr) ::google::api::Http(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::google::api::Http::InitAsDefaultInstance(); +} + +void InitDefaultsHttp() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsHttpImpl); +} + +void InitDefaultsHttpRuleImpl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + +#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); +#else + ::google::protobuf::internal::InitProtobufDefaults(); +#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsCustomHttpPattern(); + { + void* ptr = &::google::api::_HttpRule_default_instance_; + new (ptr) ::google::api::HttpRule(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::google::api::HttpRule::InitAsDefaultInstance(); +} + +void InitDefaultsHttpRule() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsHttpRuleImpl); +} + +void InitDefaultsCustomHttpPatternImpl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + +#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); +#else + ::google::protobuf::internal::InitProtobufDefaults(); +#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + { + void* ptr = &::google::api::_CustomHttpPattern_default_instance_; + new (ptr) ::google::api::CustomHttpPattern(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::google::api::CustomHttpPattern::InitAsDefaultInstance(); +} + +void InitDefaultsCustomHttpPattern() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsCustomHttpPatternImpl); +} + +::google::protobuf::Metadata file_level_metadata[3]; + +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::Http, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::Http, rules_), + ~0u, // no _has_bits_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::HttpRule, _internal_metadata_), + ~0u, // no _extensions_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::HttpRule, _oneof_case_[0]), + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::HttpRule, selector_), + offsetof(::google::api::HttpRuleDefaultTypeInternal, get_), + offsetof(::google::api::HttpRuleDefaultTypeInternal, put_), + offsetof(::google::api::HttpRuleDefaultTypeInternal, post_), + offsetof(::google::api::HttpRuleDefaultTypeInternal, delete__), + offsetof(::google::api::HttpRuleDefaultTypeInternal, patch_), + offsetof(::google::api::HttpRuleDefaultTypeInternal, custom_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::HttpRule, body_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::HttpRule, additional_bindings_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::HttpRule, pattern_), + ~0u, // no _has_bits_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::CustomHttpPattern, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::CustomHttpPattern, kind_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::api::CustomHttpPattern, path_), +}; +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(::google::api::Http)}, + { 6, -1, sizeof(::google::api::HttpRule)}, + { 21, -1, sizeof(::google::api::CustomHttpPattern)}, +}; + +static ::google::protobuf::Message const * const file_default_instances[] = { + reinterpret_cast<const ::google::protobuf::Message*>(&::google::api::_Http_default_instance_), + reinterpret_cast<const ::google::protobuf::Message*>(&::google::api::_HttpRule_default_instance_), + reinterpret_cast<const ::google::protobuf::Message*>(&::google::api::_CustomHttpPattern_default_instance_), +}; + +void protobuf_AssignDescriptors() { + AddDescriptors(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "google/api/http.proto", schemas, file_default_instances, TableStruct::offsets, factory, + file_level_metadata, NULL, NULL); +} + +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD; +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 3); +} + +void AddDescriptorsImpl() { + InitDefaults(); + static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + "\n\025google/api/http.proto\022\ngoogle.api\"+\n\004H" + "ttp\022#\n\005rules\030\001 \003(\0132\024.google.api.HttpRule" + "\"\352\001\n\010HttpRule\022\020\n\010selector\030\001 \001(\t\022\r\n\003get\030\002" + " \001(\tH\000\022\r\n\003put\030\003 \001(\tH\000\022\016\n\004post\030\004 \001(\tH\000\022\020\n" + "\006delete\030\005 \001(\tH\000\022\017\n\005patch\030\006 \001(\tH\000\022/\n\006cust" + "om\030\010 \001(\0132\035.google.api.CustomHttpPatternH" + "\000\022\014\n\004body\030\007 \001(\t\0221\n\023additional_bindings\030\013" + " \003(\0132\024.google.api.HttpRuleB\t\n\007pattern\"/\n" + "\021CustomHttpPattern\022\014\n\004kind\030\001 \001(\t\022\014\n\004path" + "\030\002 \001(\tBj\n\016com.google.apiB\tHttpProtoP\001ZAg" + "oogle.golang.org/genproto/googleapis/api" + "/annotations;annotations\370\001\001\242\002\004GAPIb\006prot" + "o3" + }; + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + descriptor, 482); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "google/api/http.proto", &protobuf_RegisterTypes); +} + +void AddDescriptors() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); +} +// Force AddDescriptors() to be called at dynamic initialization time. +struct StaticDescriptorInitializer { + StaticDescriptorInitializer() { + AddDescriptors(); + } +} static_descriptor_initializer; +} // namespace protobuf_google_2fapi_2fhttp_2eproto +namespace google { +namespace api { + +// =================================================================== + +void Http::InitAsDefaultInstance() { +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int Http::kRulesFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +Http::Http() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsHttp(); + } + SharedCtor(); + // @@protoc_insertion_point(constructor:google.api.Http) +} +Http::Http(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(), + _internal_metadata_(arena), + rules_(arena) { + ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsHttp(); + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:google.api.Http) +} +Http::Http(const Http& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + rules_(from.rules_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:google.api.Http) +} + +void Http::SharedCtor() { + _cached_size_ = 0; +} + +Http::~Http() { + // @@protoc_insertion_point(destructor:google.api.Http) + SharedDtor(); +} + +void Http::SharedDtor() { + GOOGLE_DCHECK(GetArenaNoVirtual() == NULL); +} + +void Http::ArenaDtor(void* object) { + Http* _this = reinterpret_cast< Http* >(object); + (void)_this; +} +void Http::RegisterArenaDtor(::google::protobuf::Arena* arena) { +} +void Http::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* Http::descriptor() { + ::protobuf_google_2fapi_2fhttp_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2fapi_2fhttp_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const Http& Http::default_instance() { + ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsHttp(); + return *internal_default_instance(); +} + +Http* Http::New(::google::protobuf::Arena* arena) const { + return ::google::protobuf::Arena::CreateMessage<Http>(arena); +} + +void Http::Clear() { +// @@protoc_insertion_point(message_clear_start:google.api.Http) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + rules_.Clear(); + _internal_metadata_.Clear(); +} + +bool Http::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:google.api.Http) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated .google.api.HttpRule rules = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_rules())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:google.api.Http) + return true; +failure: + // @@protoc_insertion_point(parse_failure:google.api.Http) + return false; +#undef DO_ +} + +void Http::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:google.api.Http) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .google.api.HttpRule rules = 1; + for (unsigned int i = 0, + n = static_cast<unsigned int>(this->rules_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->rules(static_cast<int>(i)), output); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } + // @@protoc_insertion_point(serialize_end:google.api.Http) +} + +::google::protobuf::uint8* Http::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:google.api.Http) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .google.api.HttpRule rules = 1; + for (unsigned int i = 0, + n = static_cast<unsigned int>(this->rules_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 1, this->rules(static_cast<int>(i)), deterministic, target); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:google.api.Http) + return target; +} + +size_t Http::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:google.api.Http) + size_t total_size = 0; + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } + // repeated .google.api.HttpRule rules = 1; + { + unsigned int count = static_cast<unsigned int>(this->rules_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->rules(static_cast<int>(i))); + } + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void Http::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:google.api.Http) + GOOGLE_DCHECK_NE(&from, this); + const Http* source = + ::google::protobuf::internal::DynamicCastToGenerated<const Http>( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.api.Http) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.api.Http) + MergeFrom(*source); + } +} + +void Http::MergeFrom(const Http& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:google.api.Http) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + rules_.MergeFrom(from.rules_); +} + +void Http::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:google.api.Http) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Http::CopyFrom(const Http& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:google.api.Http) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Http::IsInitialized() const { + return true; +} + +void Http::Swap(Http* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + Http* temp = New(GetArenaNoVirtual()); + temp->MergeFrom(*other); + other->CopyFrom(*this); + InternalSwap(temp); + if (GetArenaNoVirtual() == NULL) { + delete temp; + } + } +} +void Http::UnsafeArenaSwap(Http* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void Http::InternalSwap(Http* other) { + using std::swap; + rules_.InternalSwap(&other->rules_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata Http::GetMetadata() const { + protobuf_google_2fapi_2fhttp_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2fapi_2fhttp_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// =================================================================== + +void HttpRule::InitAsDefaultInstance() { + ::google::api::_HttpRule_default_instance_.get_.UnsafeSetDefault( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::google::api::_HttpRule_default_instance_.put_.UnsafeSetDefault( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::google::api::_HttpRule_default_instance_.post_.UnsafeSetDefault( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::google::api::_HttpRule_default_instance_.delete__.UnsafeSetDefault( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::google::api::_HttpRule_default_instance_.patch_.UnsafeSetDefault( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::google::api::_HttpRule_default_instance_.custom_ = const_cast< ::google::api::CustomHttpPattern*>( + ::google::api::CustomHttpPattern::internal_default_instance()); +} +void HttpRule::set_allocated_custom(::google::api::CustomHttpPattern* custom) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + clear_pattern(); + if (custom) { + ::google::protobuf::Arena* submessage_arena = + ::google::protobuf::Arena::GetArena(custom); + if (message_arena != submessage_arena) { + custom = ::google::protobuf::internal::GetOwnedMessage( + message_arena, custom, submessage_arena); + } + set_has_custom(); + pattern_.custom_ = custom; + } + // @@protoc_insertion_point(field_set_allocated:google.api.HttpRule.custom) +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int HttpRule::kSelectorFieldNumber; +const int HttpRule::kGetFieldNumber; +const int HttpRule::kPutFieldNumber; +const int HttpRule::kPostFieldNumber; +const int HttpRule::kDeleteFieldNumber; +const int HttpRule::kPatchFieldNumber; +const int HttpRule::kCustomFieldNumber; +const int HttpRule::kBodyFieldNumber; +const int HttpRule::kAdditionalBindingsFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +HttpRule::HttpRule() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsHttpRule(); + } + SharedCtor(); + // @@protoc_insertion_point(constructor:google.api.HttpRule) +} +HttpRule::HttpRule(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(), + _internal_metadata_(arena), + additional_bindings_(arena) { + ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsHttpRule(); + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:google.api.HttpRule) +} +HttpRule::HttpRule(const HttpRule& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + additional_bindings_(from.additional_bindings_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + selector_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.selector().size() > 0) { + selector_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.selector(), + GetArenaNoVirtual()); + } + body_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.body().size() > 0) { + body_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.body(), + GetArenaNoVirtual()); + } + clear_has_pattern(); + switch (from.pattern_case()) { + case kGet: { + set_get(from.get()); + break; + } + case kPut: { + set_put(from.put()); + break; + } + case kPost: { + set_post(from.post()); + break; + } + case kDelete: { + set_delete_(from.delete_()); + break; + } + case kPatch: { + set_patch(from.patch()); + break; + } + case kCustom: { + mutable_custom()->::google::api::CustomHttpPattern::MergeFrom(from.custom()); + break; + } + case PATTERN_NOT_SET: { + break; + } + } + // @@protoc_insertion_point(copy_constructor:google.api.HttpRule) +} + +void HttpRule::SharedCtor() { + selector_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + body_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_pattern(); + _cached_size_ = 0; +} + +HttpRule::~HttpRule() { + // @@protoc_insertion_point(destructor:google.api.HttpRule) + SharedDtor(); +} + +void HttpRule::SharedDtor() { + GOOGLE_DCHECK(GetArenaNoVirtual() == NULL); + selector_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + body_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (has_pattern()) { + clear_pattern(); + } +} + +void HttpRule::ArenaDtor(void* object) { + HttpRule* _this = reinterpret_cast< HttpRule* >(object); + (void)_this; +} +void HttpRule::RegisterArenaDtor(::google::protobuf::Arena* arena) { +} +void HttpRule::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* HttpRule::descriptor() { + ::protobuf_google_2fapi_2fhttp_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2fapi_2fhttp_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const HttpRule& HttpRule::default_instance() { + ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsHttpRule(); + return *internal_default_instance(); +} + +HttpRule* HttpRule::New(::google::protobuf::Arena* arena) const { + return ::google::protobuf::Arena::CreateMessage<HttpRule>(arena); +} + +void HttpRule::clear_pattern() { +// @@protoc_insertion_point(one_of_clear_start:google.api.HttpRule) + switch (pattern_case()) { + case kGet: { + pattern_.get_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + break; + } + case kPut: { + pattern_.put_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + break; + } + case kPost: { + pattern_.post_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + break; + } + case kDelete: { + pattern_.delete__.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + break; + } + case kPatch: { + pattern_.patch_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + break; + } + case kCustom: { + if (GetArenaNoVirtual() == NULL) { + delete pattern_.custom_; + } + break; + } + case PATTERN_NOT_SET: { + break; + } + } + _oneof_case_[0] = PATTERN_NOT_SET; +} + + +void HttpRule::Clear() { +// @@protoc_insertion_point(message_clear_start:google.api.HttpRule) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + additional_bindings_.Clear(); + selector_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + body_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + clear_pattern(); + _internal_metadata_.Clear(); +} + +bool HttpRule::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:google.api.HttpRule) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string selector = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_selector())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->selector().data(), static_cast<int>(this->selector().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.api.HttpRule.selector")); + } else { + goto handle_unusual; + } + break; + } + + // string get = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_get())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->get().data(), static_cast<int>(this->get().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.api.HttpRule.get")); + } else { + goto handle_unusual; + } + break; + } + + // string put = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_put())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->put().data(), static_cast<int>(this->put().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.api.HttpRule.put")); + } else { + goto handle_unusual; + } + break; + } + + // string post = 4; + case 4: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_post())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->post().data(), static_cast<int>(this->post().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.api.HttpRule.post")); + } else { + goto handle_unusual; + } + break; + } + + // string delete = 5; + case 5: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_delete_())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->delete_().data(), static_cast<int>(this->delete_().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.api.HttpRule.delete")); + } else { + goto handle_unusual; + } + break; + } + + // string patch = 6; + case 6: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_patch())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->patch().data(), static_cast<int>(this->patch().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.api.HttpRule.patch")); + } else { + goto handle_unusual; + } + break; + } + + // string body = 7; + case 7: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_body())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->body().data(), static_cast<int>(this->body().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.api.HttpRule.body")); + } else { + goto handle_unusual; + } + break; + } + + // .google.api.CustomHttpPattern custom = 8; + case 8: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_custom())); + } else { + goto handle_unusual; + } + break; + } + + // repeated .google.api.HttpRule additional_bindings = 11; + case 11: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_additional_bindings())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:google.api.HttpRule) + return true; +failure: + // @@protoc_insertion_point(parse_failure:google.api.HttpRule) + return false; +#undef DO_ +} + +void HttpRule::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:google.api.HttpRule) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string selector = 1; + if (this->selector().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->selector().data(), static_cast<int>(this->selector().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "google.api.HttpRule.selector"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->selector(), output); + } + + // string get = 2; + if (has_get()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->get().data(), static_cast<int>(this->get().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "google.api.HttpRule.get"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->get(), output); + } + + // string put = 3; + if (has_put()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->put().data(), static_cast<int>(this->put().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "google.api.HttpRule.put"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 3, this->put(), output); + } + + // string post = 4; + if (has_post()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->post().data(), static_cast<int>(this->post().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "google.api.HttpRule.post"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 4, this->post(), output); + } + + // string delete = 5; + if (has_delete_()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->delete_().data(), static_cast<int>(this->delete_().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "google.api.HttpRule.delete"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 5, this->delete_(), output); + } + + // string patch = 6; + if (has_patch()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->patch().data(), static_cast<int>(this->patch().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "google.api.HttpRule.patch"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 6, this->patch(), output); + } + + // string body = 7; + if (this->body().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->body().data(), static_cast<int>(this->body().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "google.api.HttpRule.body"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 7, this->body(), output); + } + + // .google.api.CustomHttpPattern custom = 8; + if (has_custom()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 8, *pattern_.custom_, output); + } + + // repeated .google.api.HttpRule additional_bindings = 11; + for (unsigned int i = 0, + n = static_cast<unsigned int>(this->additional_bindings_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 11, this->additional_bindings(static_cast<int>(i)), output); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } + // @@protoc_insertion_point(serialize_end:google.api.HttpRule) +} + +::google::protobuf::uint8* HttpRule::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:google.api.HttpRule) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string selector = 1; + if (this->selector().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->selector().data(), static_cast<int>(this->selector().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "google.api.HttpRule.selector"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->selector(), target); + } + + // string get = 2; + if (has_get()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->get().data(), static_cast<int>(this->get().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "google.api.HttpRule.get"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->get(), target); + } + + // string put = 3; + if (has_put()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->put().data(), static_cast<int>(this->put().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "google.api.HttpRule.put"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 3, this->put(), target); + } + + // string post = 4; + if (has_post()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->post().data(), static_cast<int>(this->post().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "google.api.HttpRule.post"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 4, this->post(), target); + } + + // string delete = 5; + if (has_delete_()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->delete_().data(), static_cast<int>(this->delete_().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "google.api.HttpRule.delete"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 5, this->delete_(), target); + } + + // string patch = 6; + if (has_patch()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->patch().data(), static_cast<int>(this->patch().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "google.api.HttpRule.patch"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 6, this->patch(), target); + } + + // string body = 7; + if (this->body().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->body().data(), static_cast<int>(this->body().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "google.api.HttpRule.body"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 7, this->body(), target); + } + + // .google.api.CustomHttpPattern custom = 8; + if (has_custom()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 8, *pattern_.custom_, deterministic, target); + } + + // repeated .google.api.HttpRule additional_bindings = 11; + for (unsigned int i = 0, + n = static_cast<unsigned int>(this->additional_bindings_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 11, this->additional_bindings(static_cast<int>(i)), deterministic, target); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:google.api.HttpRule) + return target; +} + +size_t HttpRule::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:google.api.HttpRule) + size_t total_size = 0; + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } + // repeated .google.api.HttpRule additional_bindings = 11; + { + unsigned int count = static_cast<unsigned int>(this->additional_bindings_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->additional_bindings(static_cast<int>(i))); + } + } + + // string selector = 1; + if (this->selector().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->selector()); + } + + // string body = 7; + if (this->body().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->body()); + } + + switch (pattern_case()) { + // string get = 2; + case kGet: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->get()); + break; + } + // string put = 3; + case kPut: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->put()); + break; + } + // string post = 4; + case kPost: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->post()); + break; + } + // string delete = 5; + case kDelete: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->delete_()); + break; + } + // string patch = 6; + case kPatch: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->patch()); + break; + } + // .google.api.CustomHttpPattern custom = 8; + case kCustom: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *pattern_.custom_); + break; + } + case PATTERN_NOT_SET: { + break; + } + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void HttpRule::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:google.api.HttpRule) + GOOGLE_DCHECK_NE(&from, this); + const HttpRule* source = + ::google::protobuf::internal::DynamicCastToGenerated<const HttpRule>( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.api.HttpRule) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.api.HttpRule) + MergeFrom(*source); + } +} + +void HttpRule::MergeFrom(const HttpRule& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:google.api.HttpRule) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + additional_bindings_.MergeFrom(from.additional_bindings_); + if (from.selector().size() > 0) { + set_selector(from.selector()); + } + if (from.body().size() > 0) { + set_body(from.body()); + } + switch (from.pattern_case()) { + case kGet: { + set_get(from.get()); + break; + } + case kPut: { + set_put(from.put()); + break; + } + case kPost: { + set_post(from.post()); + break; + } + case kDelete: { + set_delete_(from.delete_()); + break; + } + case kPatch: { + set_patch(from.patch()); + break; + } + case kCustom: { + mutable_custom()->::google::api::CustomHttpPattern::MergeFrom(from.custom()); + break; + } + case PATTERN_NOT_SET: { + break; + } + } +} + +void HttpRule::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:google.api.HttpRule) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void HttpRule::CopyFrom(const HttpRule& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:google.api.HttpRule) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool HttpRule::IsInitialized() const { + return true; +} + +void HttpRule::Swap(HttpRule* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + HttpRule* temp = New(GetArenaNoVirtual()); + temp->MergeFrom(*other); + other->CopyFrom(*this); + InternalSwap(temp); + if (GetArenaNoVirtual() == NULL) { + delete temp; + } + } +} +void HttpRule::UnsafeArenaSwap(HttpRule* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void HttpRule::InternalSwap(HttpRule* other) { + using std::swap; + additional_bindings_.InternalSwap(&other->additional_bindings_); + selector_.Swap(&other->selector_); + body_.Swap(&other->body_); + swap(pattern_, other->pattern_); + swap(_oneof_case_[0], other->_oneof_case_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata HttpRule::GetMetadata() const { + protobuf_google_2fapi_2fhttp_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2fapi_2fhttp_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// =================================================================== + +void CustomHttpPattern::InitAsDefaultInstance() { +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int CustomHttpPattern::kKindFieldNumber; +const int CustomHttpPattern::kPathFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +CustomHttpPattern::CustomHttpPattern() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsCustomHttpPattern(); + } + SharedCtor(); + // @@protoc_insertion_point(constructor:google.api.CustomHttpPattern) +} +CustomHttpPattern::CustomHttpPattern(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(), + _internal_metadata_(arena) { + ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsCustomHttpPattern(); + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:google.api.CustomHttpPattern) +} +CustomHttpPattern::CustomHttpPattern(const CustomHttpPattern& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + kind_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.kind().size() > 0) { + kind_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.kind(), + GetArenaNoVirtual()); + } + path_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.path().size() > 0) { + path_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.path(), + GetArenaNoVirtual()); + } + // @@protoc_insertion_point(copy_constructor:google.api.CustomHttpPattern) +} + +void CustomHttpPattern::SharedCtor() { + kind_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + path_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + _cached_size_ = 0; +} + +CustomHttpPattern::~CustomHttpPattern() { + // @@protoc_insertion_point(destructor:google.api.CustomHttpPattern) + SharedDtor(); +} + +void CustomHttpPattern::SharedDtor() { + GOOGLE_DCHECK(GetArenaNoVirtual() == NULL); + kind_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + path_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +void CustomHttpPattern::ArenaDtor(void* object) { + CustomHttpPattern* _this = reinterpret_cast< CustomHttpPattern* >(object); + (void)_this; +} +void CustomHttpPattern::RegisterArenaDtor(::google::protobuf::Arena* arena) { +} +void CustomHttpPattern::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* CustomHttpPattern::descriptor() { + ::protobuf_google_2fapi_2fhttp_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2fapi_2fhttp_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const CustomHttpPattern& CustomHttpPattern::default_instance() { + ::protobuf_google_2fapi_2fhttp_2eproto::InitDefaultsCustomHttpPattern(); + return *internal_default_instance(); +} + +CustomHttpPattern* CustomHttpPattern::New(::google::protobuf::Arena* arena) const { + return ::google::protobuf::Arena::CreateMessage<CustomHttpPattern>(arena); +} + +void CustomHttpPattern::Clear() { +// @@protoc_insertion_point(message_clear_start:google.api.CustomHttpPattern) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + kind_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + path_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + _internal_metadata_.Clear(); +} + +bool CustomHttpPattern::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:google.api.CustomHttpPattern) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string kind = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_kind())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->kind().data(), static_cast<int>(this->kind().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.api.CustomHttpPattern.kind")); + } else { + goto handle_unusual; + } + break; + } + + // string path = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_path())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->path().data(), static_cast<int>(this->path().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "google.api.CustomHttpPattern.path")); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:google.api.CustomHttpPattern) + return true; +failure: + // @@protoc_insertion_point(parse_failure:google.api.CustomHttpPattern) + return false; +#undef DO_ +} + +void CustomHttpPattern::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:google.api.CustomHttpPattern) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string kind = 1; + if (this->kind().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->kind().data(), static_cast<int>(this->kind().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "google.api.CustomHttpPattern.kind"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->kind(), output); + } + + // string path = 2; + if (this->path().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->path().data(), static_cast<int>(this->path().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "google.api.CustomHttpPattern.path"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->path(), output); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } + // @@protoc_insertion_point(serialize_end:google.api.CustomHttpPattern) +} + +::google::protobuf::uint8* CustomHttpPattern::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:google.api.CustomHttpPattern) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string kind = 1; + if (this->kind().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->kind().data(), static_cast<int>(this->kind().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "google.api.CustomHttpPattern.kind"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->kind(), target); + } + + // string path = 2; + if (this->path().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->path().data(), static_cast<int>(this->path().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "google.api.CustomHttpPattern.path"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->path(), target); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:google.api.CustomHttpPattern) + return target; +} + +size_t CustomHttpPattern::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:google.api.CustomHttpPattern) + size_t total_size = 0; + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } + // string kind = 1; + if (this->kind().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->kind()); + } + + // string path = 2; + if (this->path().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->path()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void CustomHttpPattern::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:google.api.CustomHttpPattern) + GOOGLE_DCHECK_NE(&from, this); + const CustomHttpPattern* source = + ::google::protobuf::internal::DynamicCastToGenerated<const CustomHttpPattern>( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.api.CustomHttpPattern) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.api.CustomHttpPattern) + MergeFrom(*source); + } +} + +void CustomHttpPattern::MergeFrom(const CustomHttpPattern& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:google.api.CustomHttpPattern) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.kind().size() > 0) { + set_kind(from.kind()); + } + if (from.path().size() > 0) { + set_path(from.path()); + } +} + +void CustomHttpPattern::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:google.api.CustomHttpPattern) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void CustomHttpPattern::CopyFrom(const CustomHttpPattern& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:google.api.CustomHttpPattern) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CustomHttpPattern::IsInitialized() const { + return true; +} + +void CustomHttpPattern::Swap(CustomHttpPattern* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + CustomHttpPattern* temp = New(GetArenaNoVirtual()); + temp->MergeFrom(*other); + other->CopyFrom(*this); + InternalSwap(temp); + if (GetArenaNoVirtual() == NULL) { + delete temp; + } + } +} +void CustomHttpPattern::UnsafeArenaSwap(CustomHttpPattern* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void CustomHttpPattern::InternalSwap(CustomHttpPattern* other) { + using std::swap; + kind_.Swap(&other->kind_); + path_.Swap(&other->path_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata CustomHttpPattern::GetMetadata() const { + protobuf_google_2fapi_2fhttp_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2fapi_2fhttp_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace api +} // namespace google + +// @@protoc_insertion_point(global_scope) |