| // Generated by the protocol buffer compiler. DO NOT EDIT! |
| // source: google/protobuf/api.proto |
| |
| #include <google/protobuf/api.pb.h> |
| |
| #include <algorithm> |
| |
| #include <google/protobuf/io/coded_stream.h> |
| #include <google/protobuf/extension_set.h> |
| #include <google/protobuf/wire_format_lite.h> |
| #include <google/protobuf/descriptor.h> |
| #include <google/protobuf/generated_message_reflection.h> |
| #include <google/protobuf/reflection_ops.h> |
| #include <google/protobuf/wire_format.h> |
| // @@protoc_insertion_point(includes) |
| #include <google/protobuf/port_def.inc> |
| |
| PROTOBUF_PRAGMA_INIT_SEG |
| PROTOBUF_NAMESPACE_OPEN |
| constexpr Api::Api( |
| ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) |
| : methods_() |
| , options_() |
| , mixins_() |
| , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) |
| , version_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) |
| , source_context_(nullptr) |
| , syntax_(0) |
| {} |
| struct ApiDefaultTypeInternal { |
| constexpr ApiDefaultTypeInternal() |
| : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} |
| ~ApiDefaultTypeInternal() {} |
| union { |
| Api _instance; |
| }; |
| }; |
| PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ApiDefaultTypeInternal _Api_default_instance_; |
| constexpr Method::Method( |
| ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) |
| : options_() |
| , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) |
| , request_type_url_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) |
| , response_type_url_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) |
| , request_streaming_(false) |
| , response_streaming_(false) |
| , syntax_(0) |
| {} |
| struct MethodDefaultTypeInternal { |
| constexpr MethodDefaultTypeInternal() |
| : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} |
| ~MethodDefaultTypeInternal() {} |
| union { |
| Method _instance; |
| }; |
| }; |
| PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MethodDefaultTypeInternal _Method_default_instance_; |
| constexpr Mixin::Mixin( |
| ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) |
| : name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) |
| , root_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} |
| struct MixinDefaultTypeInternal { |
| constexpr MixinDefaultTypeInternal() |
| : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} |
| ~MixinDefaultTypeInternal() {} |
| union { |
| Mixin _instance; |
| }; |
| }; |
| PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MixinDefaultTypeInternal _Mixin_default_instance_; |
| PROTOBUF_NAMESPACE_CLOSE |
| static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fapi_2eproto[3]; |
| static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fapi_2eproto = nullptr; |
| static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fapi_2eproto = nullptr; |
| |
| const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fapi_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
| ~0u, // no _has_bits_ |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, _internal_metadata_), |
| ~0u, // no _extensions_ |
| ~0u, // no _oneof_case_ |
| ~0u, // no _weak_field_map_ |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, name_), |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, methods_), |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, options_), |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, version_), |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, source_context_), |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, mixins_), |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, syntax_), |
| ~0u, // no _has_bits_ |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, _internal_metadata_), |
| ~0u, // no _extensions_ |
| ~0u, // no _oneof_case_ |
| ~0u, // no _weak_field_map_ |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, name_), |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, request_type_url_), |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, request_streaming_), |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, response_type_url_), |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, response_streaming_), |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, options_), |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, syntax_), |
| ~0u, // no _has_bits_ |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Mixin, _internal_metadata_), |
| ~0u, // no _extensions_ |
| ~0u, // no _oneof_case_ |
| ~0u, // no _weak_field_map_ |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Mixin, name_), |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Mixin, root_), |
| }; |
| static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
| { 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::Api)}, |
| { 12, -1, sizeof(PROTOBUF_NAMESPACE_ID::Method)}, |
| { 24, -1, sizeof(PROTOBUF_NAMESPACE_ID::Mixin)}, |
| }; |
| |
| static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { |
| reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Api_default_instance_), |
| reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Method_default_instance_), |
| reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Mixin_default_instance_), |
| }; |
| |
| const char descriptor_table_protodef_google_2fprotobuf_2fapi_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = |
| "\n\031google/protobuf/api.proto\022\017google.prot" |
| "obuf\032$google/protobuf/source_context.pro" |
| "to\032\032google/protobuf/type.proto\"\201\002\n\003Api\022\014" |
| "\n\004name\030\001 \001(\t\022(\n\007methods\030\002 \003(\0132\027.google.p" |
| "rotobuf.Method\022(\n\007options\030\003 \003(\0132\027.google" |
| ".protobuf.Option\022\017\n\007version\030\004 \001(\t\0226\n\016sou" |
| "rce_context\030\005 \001(\0132\036.google.protobuf.Sour" |
| "ceContext\022&\n\006mixins\030\006 \003(\0132\026.google.proto" |
| "buf.Mixin\022\'\n\006syntax\030\007 \001(\0162\027.google.proto" |
| "buf.Syntax\"\325\001\n\006Method\022\014\n\004name\030\001 \001(\t\022\030\n\020r" |
| "equest_type_url\030\002 \001(\t\022\031\n\021request_streami" |
| "ng\030\003 \001(\010\022\031\n\021response_type_url\030\004 \001(\t\022\032\n\022r" |
| "esponse_streaming\030\005 \001(\010\022(\n\007options\030\006 \003(\013" |
| "2\027.google.protobuf.Option\022\'\n\006syntax\030\007 \001(" |
| "\0162\027.google.protobuf.Syntax\"#\n\005Mixin\022\014\n\004n" |
| "ame\030\001 \001(\t\022\014\n\004root\030\002 \001(\tBv\n\023com.google.pr" |
| "otobufB\010ApiProtoP\001Z,google.golang.org/pr" |
| "otobuf/types/known/apipb\242\002\003GPB\252\002\036Google." |
| "Protobuf.WellKnownTypesb\006proto3" |
| ; |
| static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_google_2fprotobuf_2fapi_2eproto_deps[2] = { |
| &::descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto, |
| &::descriptor_table_google_2fprotobuf_2ftype_2eproto, |
| }; |
| static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fapi_2eproto_once; |
| const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fapi_2eproto = { |
| false, false, 751, descriptor_table_protodef_google_2fprotobuf_2fapi_2eproto, "google/protobuf/api.proto", |
| &descriptor_table_google_2fprotobuf_2fapi_2eproto_once, descriptor_table_google_2fprotobuf_2fapi_2eproto_deps, 2, 3, |
| schemas, file_default_instances, TableStruct_google_2fprotobuf_2fapi_2eproto::offsets, |
| file_level_metadata_google_2fprotobuf_2fapi_2eproto, file_level_enum_descriptors_google_2fprotobuf_2fapi_2eproto, file_level_service_descriptors_google_2fprotobuf_2fapi_2eproto, |
| }; |
| PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_google_2fprotobuf_2fapi_2eproto_getter() { |
| return &descriptor_table_google_2fprotobuf_2fapi_2eproto; |
| } |
| |
| // Force running AddDescriptors() at dynamic initialization time. |
| PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_google_2fprotobuf_2fapi_2eproto(&descriptor_table_google_2fprotobuf_2fapi_2eproto); |
| PROTOBUF_NAMESPACE_OPEN |
| |
| // =================================================================== |
| |
| class Api::_Internal { |
| public: |
| static const PROTOBUF_NAMESPACE_ID::SourceContext& source_context(const Api* msg); |
| }; |
| |
| const PROTOBUF_NAMESPACE_ID::SourceContext& |
| Api::_Internal::source_context(const Api* msg) { |
| return *msg->source_context_; |
| } |
| void Api::clear_options() { |
| options_.Clear(); |
| } |
| void Api::clear_source_context() { |
| if (GetArenaForAllocation() == nullptr && source_context_ != nullptr) { |
| delete source_context_; |
| } |
| source_context_ = nullptr; |
| } |
| Api::Api(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
| bool is_message_owned) |
| : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), |
| methods_(arena), |
| options_(arena), |
| mixins_(arena) { |
| SharedCtor(); |
| if (!is_message_owned) { |
| RegisterArenaDtor(arena); |
| } |
| // @@protoc_insertion_point(arena_constructor:google.protobuf.Api) |
| } |
| Api::Api(const Api& from) |
| : ::PROTOBUF_NAMESPACE_ID::Message(), |
| methods_(from.methods_), |
| options_(from.options_), |
| mixins_(from.mixins_) { |
| _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
| name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| if (!from._internal_name().empty()) { |
| name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(), |
| GetArenaForAllocation()); |
| } |
| version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| if (!from._internal_version().empty()) { |
| version_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_version(), |
| GetArenaForAllocation()); |
| } |
| if (from._internal_has_source_context()) { |
| source_context_ = new PROTOBUF_NAMESPACE_ID::SourceContext(*from.source_context_); |
| } else { |
| source_context_ = nullptr; |
| } |
| syntax_ = from.syntax_; |
| // @@protoc_insertion_point(copy_constructor:google.protobuf.Api) |
| } |
| |
| inline void Api::SharedCtor() { |
| name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>( |
| reinterpret_cast<char*>(&source_context_) - reinterpret_cast<char*>(this)), |
| 0, static_cast<size_t>(reinterpret_cast<char*>(&syntax_) - |
| reinterpret_cast<char*>(&source_context_)) + sizeof(syntax_)); |
| } |
| |
| Api::~Api() { |
| // @@protoc_insertion_point(destructor:google.protobuf.Api) |
| if (GetArenaForAllocation() != nullptr) return; |
| SharedDtor(); |
| _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
| } |
| |
| inline void Api::SharedDtor() { |
| GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
| name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| version_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| if (this != internal_default_instance()) delete source_context_; |
| } |
| |
| void Api::ArenaDtor(void* object) { |
| Api* _this = reinterpret_cast< Api* >(object); |
| (void)_this; |
| } |
| void Api::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
| } |
| void Api::SetCachedSize(int size) const { |
| _cached_size_.Set(size); |
| } |
| |
| void Api::Clear() { |
| // @@protoc_insertion_point(message_clear_start:google.protobuf.Api) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| // Prevent compiler warnings about cached_has_bits being unused |
| (void) cached_has_bits; |
| |
| methods_.Clear(); |
| options_.Clear(); |
| mixins_.Clear(); |
| name_.ClearToEmpty(); |
| version_.ClearToEmpty(); |
| if (GetArenaForAllocation() == nullptr && source_context_ != nullptr) { |
| delete source_context_; |
| } |
| source_context_ = nullptr; |
| syntax_ = 0; |
| _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
| } |
| |
| const char* Api::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
| #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
| while (!ctx->Done(&ptr)) { |
| ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
| ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
| switch (tag >> 3) { |
| // string name = 1; |
| case 1: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
| auto str = _internal_mutable_name(); |
| ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); |
| CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Api.name")); |
| CHK_(ptr); |
| } else goto handle_unusual; |
| continue; |
| // repeated .google.protobuf.Method methods = 2; |
| case 2: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
| ptr -= 1; |
| do { |
| ptr += 1; |
| ptr = ctx->ParseMessage(_internal_add_methods(), ptr); |
| CHK_(ptr); |
| if (!ctx->DataAvailable(ptr)) break; |
| } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); |
| } else goto handle_unusual; |
| continue; |
| // repeated .google.protobuf.Option options = 3; |
| case 3: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { |
| ptr -= 1; |
| do { |
| ptr += 1; |
| ptr = ctx->ParseMessage(_internal_add_options(), ptr); |
| CHK_(ptr); |
| if (!ctx->DataAvailable(ptr)) break; |
| } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); |
| } else goto handle_unusual; |
| continue; |
| // string version = 4; |
| case 4: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { |
| auto str = _internal_mutable_version(); |
| ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); |
| CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Api.version")); |
| CHK_(ptr); |
| } else goto handle_unusual; |
| continue; |
| // .google.protobuf.SourceContext source_context = 5; |
| case 5: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { |
| ptr = ctx->ParseMessage(_internal_mutable_source_context(), ptr); |
| CHK_(ptr); |
| } else goto handle_unusual; |
| continue; |
| // repeated .google.protobuf.Mixin mixins = 6; |
| case 6: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { |
| ptr -= 1; |
| do { |
| ptr += 1; |
| ptr = ctx->ParseMessage(_internal_add_mixins(), ptr); |
| CHK_(ptr); |
| if (!ctx->DataAvailable(ptr)) break; |
| } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr)); |
| } else goto handle_unusual; |
| continue; |
| // .google.protobuf.Syntax syntax = 7; |
| case 7: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { |
| ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
| CHK_(ptr); |
| _internal_set_syntax(static_cast<PROTOBUF_NAMESPACE_ID::Syntax>(val)); |
| } else goto handle_unusual; |
| continue; |
| default: { |
| handle_unusual: |
| if ((tag == 0) || ((tag & 7) == 4)) { |
| CHK_(ptr); |
| ctx->SetLastTag(tag); |
| goto success; |
| } |
| ptr = UnknownFieldParse(tag, |
| _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), |
| ptr, ctx); |
| CHK_(ptr != nullptr); |
| continue; |
| } |
| } // switch |
| } // while |
| success: |
| return ptr; |
| failure: |
| ptr = nullptr; |
| goto success; |
| #undef CHK_ |
| } |
| |
| ::PROTOBUF_NAMESPACE_ID::uint8* Api::_InternalSerialize( |
| ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
| // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Api) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| // string name = 1; |
| if (!this->_internal_name().empty()) { |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
| this->_internal_name().data(), static_cast<int>(this->_internal_name().length()), |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
| "google.protobuf.Api.name"); |
| target = stream->WriteStringMaybeAliased( |
| 1, this->_internal_name(), target); |
| } |
| |
| // repeated .google.protobuf.Method methods = 2; |
| for (unsigned int i = 0, |
| n = static_cast<unsigned int>(this->_internal_methods_size()); i < n; i++) { |
| target = stream->EnsureSpace(target); |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
| InternalWriteMessage(2, this->_internal_methods(i), target, stream); |
| } |
| |
| // repeated .google.protobuf.Option options = 3; |
| for (unsigned int i = 0, |
| n = static_cast<unsigned int>(this->_internal_options_size()); i < n; i++) { |
| target = stream->EnsureSpace(target); |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
| InternalWriteMessage(3, this->_internal_options(i), target, stream); |
| } |
| |
| // string version = 4; |
| if (!this->_internal_version().empty()) { |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
| this->_internal_version().data(), static_cast<int>(this->_internal_version().length()), |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
| "google.protobuf.Api.version"); |
| target = stream->WriteStringMaybeAliased( |
| 4, this->_internal_version(), target); |
| } |
| |
| // .google.protobuf.SourceContext source_context = 5; |
| if (this->_internal_has_source_context()) { |
| target = stream->EnsureSpace(target); |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
| InternalWriteMessage( |
| 5, _Internal::source_context(this), target, stream); |
| } |
| |
| // repeated .google.protobuf.Mixin mixins = 6; |
| for (unsigned int i = 0, |
| n = static_cast<unsigned int>(this->_internal_mixins_size()); i < n; i++) { |
| target = stream->EnsureSpace(target); |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
| InternalWriteMessage(6, this->_internal_mixins(i), target, stream); |
| } |
| |
| // .google.protobuf.Syntax syntax = 7; |
| if (this->_internal_syntax() != 0) { |
| target = stream->EnsureSpace(target); |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
| 7, this->_internal_syntax(), target); |
| } |
| |
| if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( |
| _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); |
| } |
| // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Api) |
| return target; |
| } |
| |
| size_t Api::ByteSizeLong() const { |
| // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Api) |
| size_t total_size = 0; |
| |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| // Prevent compiler warnings about cached_has_bits being unused |
| (void) cached_has_bits; |
| |
| // repeated .google.protobuf.Method methods = 2; |
| total_size += 1UL * this->_internal_methods_size(); |
| for (const auto& msg : this->methods_) { |
| total_size += |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); |
| } |
| |
| // repeated .google.protobuf.Option options = 3; |
| total_size += 1UL * this->_internal_options_size(); |
| for (const auto& msg : this->options_) { |
| total_size += |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); |
| } |
| |
| // repeated .google.protobuf.Mixin mixins = 6; |
| total_size += 1UL * this->_internal_mixins_size(); |
| for (const auto& msg : this->mixins_) { |
| total_size += |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); |
| } |
| |
| // string name = 1; |
| if (!this->_internal_name().empty()) { |
| total_size += 1 + |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
| this->_internal_name()); |
| } |
| |
| // string version = 4; |
| if (!this->_internal_version().empty()) { |
| total_size += 1 + |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
| this->_internal_version()); |
| } |
| |
| // .google.protobuf.SourceContext source_context = 5; |
| if (this->_internal_has_source_context()) { |
| total_size += 1 + |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
| *source_context_); |
| } |
| |
| // .google.protobuf.Syntax syntax = 7; |
| if (this->_internal_syntax() != 0) { |
| total_size += 1 + |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_syntax()); |
| } |
| |
| if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( |
| _internal_metadata_, total_size, &_cached_size_); |
| } |
| int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
| SetCachedSize(cached_size); |
| return total_size; |
| } |
| |
| const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Api::_class_data_ = { |
| ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, |
| Api::MergeImpl |
| }; |
| const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Api::GetClassData() const { return &_class_data_; } |
| |
| void Api::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to, |
| const ::PROTOBUF_NAMESPACE_ID::Message&from) { |
| static_cast<Api *>(to)->MergeFrom( |
| static_cast<const Api &>(from)); |
| } |
| |
| |
| void Api::MergeFrom(const Api& from) { |
| // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Api) |
| GOOGLE_DCHECK_NE(&from, this); |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| methods_.MergeFrom(from.methods_); |
| options_.MergeFrom(from.options_); |
| mixins_.MergeFrom(from.mixins_); |
| if (!from._internal_name().empty()) { |
| _internal_set_name(from._internal_name()); |
| } |
| if (!from._internal_version().empty()) { |
| _internal_set_version(from._internal_version()); |
| } |
| if (from._internal_has_source_context()) { |
| _internal_mutable_source_context()->PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(from._internal_source_context()); |
| } |
| if (from._internal_syntax() != 0) { |
| _internal_set_syntax(from._internal_syntax()); |
| } |
| _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
| } |
| |
| void Api::CopyFrom(const Api& from) { |
| // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Api) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool Api::IsInitialized() const { |
| return true; |
| } |
| |
| void Api::InternalSwap(Api* other) { |
| using std::swap; |
| _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
| methods_.InternalSwap(&other->methods_); |
| options_.InternalSwap(&other->options_); |
| mixins_.InternalSwap(&other->mixins_); |
| ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
| &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
| &name_, GetArenaForAllocation(), |
| &other->name_, other->GetArenaForAllocation() |
| ); |
| ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
| &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
| &version_, GetArenaForAllocation(), |
| &other->version_, other->GetArenaForAllocation() |
| ); |
| ::PROTOBUF_NAMESPACE_ID::internal::memswap< |
| PROTOBUF_FIELD_OFFSET(Api, syntax_) |
| + sizeof(Api::syntax_) |
| - PROTOBUF_FIELD_OFFSET(Api, source_context_)>( |
| reinterpret_cast<char*>(&source_context_), |
| reinterpret_cast<char*>(&other->source_context_)); |
| } |
| |
| ::PROTOBUF_NAMESPACE_ID::Metadata Api::GetMetadata() const { |
| return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( |
| &descriptor_table_google_2fprotobuf_2fapi_2eproto_getter, &descriptor_table_google_2fprotobuf_2fapi_2eproto_once, |
| file_level_metadata_google_2fprotobuf_2fapi_2eproto[0]); |
| } |
| |
| // =================================================================== |
| |
| class Method::_Internal { |
| public: |
| }; |
| |
| void Method::clear_options() { |
| options_.Clear(); |
| } |
| Method::Method(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
| bool is_message_owned) |
| : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), |
| options_(arena) { |
| SharedCtor(); |
| if (!is_message_owned) { |
| RegisterArenaDtor(arena); |
| } |
| // @@protoc_insertion_point(arena_constructor:google.protobuf.Method) |
| } |
| Method::Method(const Method& from) |
| : ::PROTOBUF_NAMESPACE_ID::Message(), |
| options_(from.options_) { |
| _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
| name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| if (!from._internal_name().empty()) { |
| name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(), |
| GetArenaForAllocation()); |
| } |
| request_type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| if (!from._internal_request_type_url().empty()) { |
| request_type_url_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_request_type_url(), |
| GetArenaForAllocation()); |
| } |
| response_type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| if (!from._internal_response_type_url().empty()) { |
| response_type_url_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_response_type_url(), |
| GetArenaForAllocation()); |
| } |
| ::memcpy(&request_streaming_, &from.request_streaming_, |
| static_cast<size_t>(reinterpret_cast<char*>(&syntax_) - |
| reinterpret_cast<char*>(&request_streaming_)) + sizeof(syntax_)); |
| // @@protoc_insertion_point(copy_constructor:google.protobuf.Method) |
| } |
| |
| inline void Method::SharedCtor() { |
| name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| request_type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| response_type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>( |
| reinterpret_cast<char*>(&request_streaming_) - reinterpret_cast<char*>(this)), |
| 0, static_cast<size_t>(reinterpret_cast<char*>(&syntax_) - |
| reinterpret_cast<char*>(&request_streaming_)) + sizeof(syntax_)); |
| } |
| |
| Method::~Method() { |
| // @@protoc_insertion_point(destructor:google.protobuf.Method) |
| if (GetArenaForAllocation() != nullptr) return; |
| SharedDtor(); |
| _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
| } |
| |
| inline void Method::SharedDtor() { |
| GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
| name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| request_type_url_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| response_type_url_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| } |
| |
| void Method::ArenaDtor(void* object) { |
| Method* _this = reinterpret_cast< Method* >(object); |
| (void)_this; |
| } |
| void Method::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
| } |
| void Method::SetCachedSize(int size) const { |
| _cached_size_.Set(size); |
| } |
| |
| void Method::Clear() { |
| // @@protoc_insertion_point(message_clear_start:google.protobuf.Method) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| // Prevent compiler warnings about cached_has_bits being unused |
| (void) cached_has_bits; |
| |
| options_.Clear(); |
| name_.ClearToEmpty(); |
| request_type_url_.ClearToEmpty(); |
| response_type_url_.ClearToEmpty(); |
| ::memset(&request_streaming_, 0, static_cast<size_t>( |
| reinterpret_cast<char*>(&syntax_) - |
| reinterpret_cast<char*>(&request_streaming_)) + sizeof(syntax_)); |
| _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
| } |
| |
| const char* Method::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
| #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
| while (!ctx->Done(&ptr)) { |
| ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
| ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
| switch (tag >> 3) { |
| // string name = 1; |
| case 1: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
| auto str = _internal_mutable_name(); |
| ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); |
| CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Method.name")); |
| CHK_(ptr); |
| } else goto handle_unusual; |
| continue; |
| // string request_type_url = 2; |
| case 2: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
| auto str = _internal_mutable_request_type_url(); |
| ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); |
| CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Method.request_type_url")); |
| CHK_(ptr); |
| } else goto handle_unusual; |
| continue; |
| // bool request_streaming = 3; |
| case 3: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { |
| request_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
| CHK_(ptr); |
| } else goto handle_unusual; |
| continue; |
| // string response_type_url = 4; |
| case 4: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { |
| auto str = _internal_mutable_response_type_url(); |
| ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); |
| CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Method.response_type_url")); |
| CHK_(ptr); |
| } else goto handle_unusual; |
| continue; |
| // bool response_streaming = 5; |
| case 5: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { |
| response_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
| CHK_(ptr); |
| } else goto handle_unusual; |
| continue; |
| // repeated .google.protobuf.Option options = 6; |
| case 6: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { |
| ptr -= 1; |
| do { |
| ptr += 1; |
| ptr = ctx->ParseMessage(_internal_add_options(), ptr); |
| CHK_(ptr); |
| if (!ctx->DataAvailable(ptr)) break; |
| } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr)); |
| } else goto handle_unusual; |
| continue; |
| // .google.protobuf.Syntax syntax = 7; |
| case 7: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { |
| ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
| CHK_(ptr); |
| _internal_set_syntax(static_cast<PROTOBUF_NAMESPACE_ID::Syntax>(val)); |
| } else goto handle_unusual; |
| continue; |
| default: { |
| handle_unusual: |
| if ((tag == 0) || ((tag & 7) == 4)) { |
| CHK_(ptr); |
| ctx->SetLastTag(tag); |
| goto success; |
| } |
| ptr = UnknownFieldParse(tag, |
| _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), |
| ptr, ctx); |
| CHK_(ptr != nullptr); |
| continue; |
| } |
| } // switch |
| } // while |
| success: |
| return ptr; |
| failure: |
| ptr = nullptr; |
| goto success; |
| #undef CHK_ |
| } |
| |
| ::PROTOBUF_NAMESPACE_ID::uint8* Method::_InternalSerialize( |
| ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
| // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Method) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| // string name = 1; |
| if (!this->_internal_name().empty()) { |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
| this->_internal_name().data(), static_cast<int>(this->_internal_name().length()), |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
| "google.protobuf.Method.name"); |
| target = stream->WriteStringMaybeAliased( |
| 1, this->_internal_name(), target); |
| } |
| |
| // string request_type_url = 2; |
| if (!this->_internal_request_type_url().empty()) { |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
| this->_internal_request_type_url().data(), static_cast<int>(this->_internal_request_type_url().length()), |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
| "google.protobuf.Method.request_type_url"); |
| target = stream->WriteStringMaybeAliased( |
| 2, this->_internal_request_type_url(), target); |
| } |
| |
| // bool request_streaming = 3; |
| if (this->_internal_request_streaming() != 0) { |
| target = stream->EnsureSpace(target); |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_request_streaming(), target); |
| } |
| |
| // string response_type_url = 4; |
| if (!this->_internal_response_type_url().empty()) { |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
| this->_internal_response_type_url().data(), static_cast<int>(this->_internal_response_type_url().length()), |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
| "google.protobuf.Method.response_type_url"); |
| target = stream->WriteStringMaybeAliased( |
| 4, this->_internal_response_type_url(), target); |
| } |
| |
| // bool response_streaming = 5; |
| if (this->_internal_response_streaming() != 0) { |
| target = stream->EnsureSpace(target); |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_response_streaming(), target); |
| } |
| |
| // repeated .google.protobuf.Option options = 6; |
| for (unsigned int i = 0, |
| n = static_cast<unsigned int>(this->_internal_options_size()); i < n; i++) { |
| target = stream->EnsureSpace(target); |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
| InternalWriteMessage(6, this->_internal_options(i), target, stream); |
| } |
| |
| // .google.protobuf.Syntax syntax = 7; |
| if (this->_internal_syntax() != 0) { |
| target = stream->EnsureSpace(target); |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
| 7, this->_internal_syntax(), target); |
| } |
| |
| if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( |
| _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); |
| } |
| // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Method) |
| return target; |
| } |
| |
| size_t Method::ByteSizeLong() const { |
| // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Method) |
| size_t total_size = 0; |
| |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| // Prevent compiler warnings about cached_has_bits being unused |
| (void) cached_has_bits; |
| |
| // repeated .google.protobuf.Option options = 6; |
| total_size += 1UL * this->_internal_options_size(); |
| for (const auto& msg : this->options_) { |
| total_size += |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); |
| } |
| |
| // string name = 1; |
| if (!this->_internal_name().empty()) { |
| total_size += 1 + |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
| this->_internal_name()); |
| } |
| |
| // string request_type_url = 2; |
| if (!this->_internal_request_type_url().empty()) { |
| total_size += 1 + |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
| this->_internal_request_type_url()); |
| } |
| |
| // string response_type_url = 4; |
| if (!this->_internal_response_type_url().empty()) { |
| total_size += 1 + |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
| this->_internal_response_type_url()); |
| } |
| |
| // bool request_streaming = 3; |
| if (this->_internal_request_streaming() != 0) { |
| total_size += 1 + 1; |
| } |
| |
| // bool response_streaming = 5; |
| if (this->_internal_response_streaming() != 0) { |
| total_size += 1 + 1; |
| } |
| |
| // .google.protobuf.Syntax syntax = 7; |
| if (this->_internal_syntax() != 0) { |
| total_size += 1 + |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_syntax()); |
| } |
| |
| if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( |
| _internal_metadata_, total_size, &_cached_size_); |
| } |
| int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
| SetCachedSize(cached_size); |
| return total_size; |
| } |
| |
| const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Method::_class_data_ = { |
| ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, |
| Method::MergeImpl |
| }; |
| const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Method::GetClassData() const { return &_class_data_; } |
| |
| void Method::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to, |
| const ::PROTOBUF_NAMESPACE_ID::Message&from) { |
| static_cast<Method *>(to)->MergeFrom( |
| static_cast<const Method &>(from)); |
| } |
| |
| |
| void Method::MergeFrom(const Method& from) { |
| // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Method) |
| GOOGLE_DCHECK_NE(&from, this); |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| options_.MergeFrom(from.options_); |
| if (!from._internal_name().empty()) { |
| _internal_set_name(from._internal_name()); |
| } |
| if (!from._internal_request_type_url().empty()) { |
| _internal_set_request_type_url(from._internal_request_type_url()); |
| } |
| if (!from._internal_response_type_url().empty()) { |
| _internal_set_response_type_url(from._internal_response_type_url()); |
| } |
| if (from._internal_request_streaming() != 0) { |
| _internal_set_request_streaming(from._internal_request_streaming()); |
| } |
| if (from._internal_response_streaming() != 0) { |
| _internal_set_response_streaming(from._internal_response_streaming()); |
| } |
| if (from._internal_syntax() != 0) { |
| _internal_set_syntax(from._internal_syntax()); |
| } |
| _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
| } |
| |
| void Method::CopyFrom(const Method& from) { |
| // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Method) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool Method::IsInitialized() const { |
| return true; |
| } |
| |
| void Method::InternalSwap(Method* other) { |
| using std::swap; |
| _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
| options_.InternalSwap(&other->options_); |
| ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
| &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
| &name_, GetArenaForAllocation(), |
| &other->name_, other->GetArenaForAllocation() |
| ); |
| ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
| &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
| &request_type_url_, GetArenaForAllocation(), |
| &other->request_type_url_, other->GetArenaForAllocation() |
| ); |
| ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
| &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
| &response_type_url_, GetArenaForAllocation(), |
| &other->response_type_url_, other->GetArenaForAllocation() |
| ); |
| ::PROTOBUF_NAMESPACE_ID::internal::memswap< |
| PROTOBUF_FIELD_OFFSET(Method, syntax_) |
| + sizeof(Method::syntax_) |
| - PROTOBUF_FIELD_OFFSET(Method, request_streaming_)>( |
| reinterpret_cast<char*>(&request_streaming_), |
| reinterpret_cast<char*>(&other->request_streaming_)); |
| } |
| |
| ::PROTOBUF_NAMESPACE_ID::Metadata Method::GetMetadata() const { |
| return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( |
| &descriptor_table_google_2fprotobuf_2fapi_2eproto_getter, &descriptor_table_google_2fprotobuf_2fapi_2eproto_once, |
| file_level_metadata_google_2fprotobuf_2fapi_2eproto[1]); |
| } |
| |
| // =================================================================== |
| |
| class Mixin::_Internal { |
| public: |
| }; |
| |
| Mixin::Mixin(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
| bool is_message_owned) |
| : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { |
| SharedCtor(); |
| if (!is_message_owned) { |
| RegisterArenaDtor(arena); |
| } |
| // @@protoc_insertion_point(arena_constructor:google.protobuf.Mixin) |
| } |
| Mixin::Mixin(const Mixin& from) |
| : ::PROTOBUF_NAMESPACE_ID::Message() { |
| _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
| name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| if (!from._internal_name().empty()) { |
| name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(), |
| GetArenaForAllocation()); |
| } |
| root_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| if (!from._internal_root().empty()) { |
| root_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_root(), |
| GetArenaForAllocation()); |
| } |
| // @@protoc_insertion_point(copy_constructor:google.protobuf.Mixin) |
| } |
| |
| inline void Mixin::SharedCtor() { |
| name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| root_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| } |
| |
| Mixin::~Mixin() { |
| // @@protoc_insertion_point(destructor:google.protobuf.Mixin) |
| if (GetArenaForAllocation() != nullptr) return; |
| SharedDtor(); |
| _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
| } |
| |
| inline void Mixin::SharedDtor() { |
| GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
| name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| root_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| } |
| |
| void Mixin::ArenaDtor(void* object) { |
| Mixin* _this = reinterpret_cast< Mixin* >(object); |
| (void)_this; |
| } |
| void Mixin::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
| } |
| void Mixin::SetCachedSize(int size) const { |
| _cached_size_.Set(size); |
| } |
| |
| void Mixin::Clear() { |
| // @@protoc_insertion_point(message_clear_start:google.protobuf.Mixin) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| // Prevent compiler warnings about cached_has_bits being unused |
| (void) cached_has_bits; |
| |
| name_.ClearToEmpty(); |
| root_.ClearToEmpty(); |
| _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
| } |
| |
| const char* Mixin::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
| #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
| while (!ctx->Done(&ptr)) { |
| ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
| ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
| switch (tag >> 3) { |
| // string name = 1; |
| case 1: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
| auto str = _internal_mutable_name(); |
| ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); |
| CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Mixin.name")); |
| CHK_(ptr); |
| } else goto handle_unusual; |
| continue; |
| // string root = 2; |
| case 2: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
| auto str = _internal_mutable_root(); |
| ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); |
| CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Mixin.root")); |
| CHK_(ptr); |
| } else goto handle_unusual; |
| continue; |
| default: { |
| handle_unusual: |
| if ((tag == 0) || ((tag & 7) == 4)) { |
| CHK_(ptr); |
| ctx->SetLastTag(tag); |
| goto success; |
| } |
| ptr = UnknownFieldParse(tag, |
| _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), |
| ptr, ctx); |
| CHK_(ptr != nullptr); |
| continue; |
| } |
| } // switch |
| } // while |
| success: |
| return ptr; |
| failure: |
| ptr = nullptr; |
| goto success; |
| #undef CHK_ |
| } |
| |
| ::PROTOBUF_NAMESPACE_ID::uint8* Mixin::_InternalSerialize( |
| ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
| // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Mixin) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| // string name = 1; |
| if (!this->_internal_name().empty()) { |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
| this->_internal_name().data(), static_cast<int>(this->_internal_name().length()), |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
| "google.protobuf.Mixin.name"); |
| target = stream->WriteStringMaybeAliased( |
| 1, this->_internal_name(), target); |
| } |
| |
| // string root = 2; |
| if (!this->_internal_root().empty()) { |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
| this->_internal_root().data(), static_cast<int>(this->_internal_root().length()), |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
| "google.protobuf.Mixin.root"); |
| target = stream->WriteStringMaybeAliased( |
| 2, this->_internal_root(), target); |
| } |
| |
| if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( |
| _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); |
| } |
| // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Mixin) |
| return target; |
| } |
| |
| size_t Mixin::ByteSizeLong() const { |
| // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Mixin) |
| size_t total_size = 0; |
| |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| // Prevent compiler warnings about cached_has_bits being unused |
| (void) cached_has_bits; |
| |
| // string name = 1; |
| if (!this->_internal_name().empty()) { |
| total_size += 1 + |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
| this->_internal_name()); |
| } |
| |
| // string root = 2; |
| if (!this->_internal_root().empty()) { |
| total_size += 1 + |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
| this->_internal_root()); |
| } |
| |
| if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( |
| _internal_metadata_, total_size, &_cached_size_); |
| } |
| int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
| SetCachedSize(cached_size); |
| return total_size; |
| } |
| |
| const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Mixin::_class_data_ = { |
| ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, |
| Mixin::MergeImpl |
| }; |
| const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Mixin::GetClassData() const { return &_class_data_; } |
| |
| void Mixin::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to, |
| const ::PROTOBUF_NAMESPACE_ID::Message&from) { |
| static_cast<Mixin *>(to)->MergeFrom( |
| static_cast<const Mixin &>(from)); |
| } |
| |
| |
| void Mixin::MergeFrom(const Mixin& from) { |
| // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Mixin) |
| GOOGLE_DCHECK_NE(&from, this); |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| if (!from._internal_name().empty()) { |
| _internal_set_name(from._internal_name()); |
| } |
| if (!from._internal_root().empty()) { |
| _internal_set_root(from._internal_root()); |
| } |
| _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
| } |
| |
| void Mixin::CopyFrom(const Mixin& from) { |
| // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Mixin) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool Mixin::IsInitialized() const { |
| return true; |
| } |
| |
| void Mixin::InternalSwap(Mixin* other) { |
| using std::swap; |
| _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
| ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
| &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
| &name_, GetArenaForAllocation(), |
| &other->name_, other->GetArenaForAllocation() |
| ); |
| ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
| &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
| &root_, GetArenaForAllocation(), |
| &other->root_, other->GetArenaForAllocation() |
| ); |
| } |
| |
| ::PROTOBUF_NAMESPACE_ID::Metadata Mixin::GetMetadata() const { |
| return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( |
| &descriptor_table_google_2fprotobuf_2fapi_2eproto_getter, &descriptor_table_google_2fprotobuf_2fapi_2eproto_once, |
| file_level_metadata_google_2fprotobuf_2fapi_2eproto[2]); |
| } |
| |
| // @@protoc_insertion_point(namespace_scope) |
| PROTOBUF_NAMESPACE_CLOSE |
| PROTOBUF_NAMESPACE_OPEN |
| template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Api* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Api >(Arena* arena) { |
| return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Api >(arena); |
| } |
| template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Method* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Method >(Arena* arena) { |
| return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Method >(arena); |
| } |
| template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Mixin* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Mixin >(Arena* arena) { |
| return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Mixin >(arena); |
| } |
| PROTOBUF_NAMESPACE_CLOSE |
| |
| // @@protoc_insertion_point(global_scope) |
| #include <google/protobuf/port_undef.inc> |