From 4d70286f2a66099bb20f2ee5139e94d4f5893f6f Mon Sep 17 00:00:00 2001 From: Charlie Stanley Date: Thu, 11 Feb 2021 23:43:58 +0000 Subject: [PATCH] Updating to dapr runtime v1.0.0-rc.4 --- dapr/proto/common/v1/common.proto | 6 +- dapr/proto/runtime/v1/dapr.proto | 2 +- src/dapr/proto/common/v1/common.pb.cc | 321 +++++++------------------- src/dapr/proto/common/v1/common.pb.h | 129 ++++++----- 4 files changed, 155 insertions(+), 303 deletions(-) diff --git a/dapr/proto/common/v1/common.proto b/dapr/proto/common/v1/common.proto index d0081a1..7223984 100644 --- a/dapr/proto/common/v1/common.proto +++ b/dapr/proto/common/v1/common.proto @@ -39,8 +39,8 @@ message HTTPExtension { // Required. HTTP verb. Verb verb = 1; - // querystring includes HTTP querystring. - map querystring = 2; + // Optional. querystring represents an encoded HTTP url query string in the following format: name=value&name2=value2 + string querystring = 2; } // InvokeRequest is the message to invoke a method with the data. @@ -122,4 +122,4 @@ message StateOptions { StateConcurrency concurrency = 1; StateConsistency consistency = 2; -} +} \ No newline at end of file diff --git a/dapr/proto/runtime/v1/dapr.proto b/dapr/proto/runtime/v1/dapr.proto index 4907ce7..8d23d45 100644 --- a/dapr/proto/runtime/v1/dapr.proto +++ b/dapr/proto/runtime/v1/dapr.proto @@ -403,4 +403,4 @@ message RegisteredComponents { message SetMetadataRequest { string key = 1; string value = 2; -} +} \ No newline at end of file diff --git a/src/dapr/proto/common/v1/common.pb.cc b/src/dapr/proto/common/v1/common.pb.cc index 8de6ccc..17f2dc4 100644 --- a/src/dapr/proto/common/v1/common.pb.cc +++ b/src/dapr/proto/common/v1/common.pb.cc @@ -21,10 +21,9 @@ namespace protobuf_dapr_2fproto_2fcommon_2fv1_2fcommon_2eproto { extern PROTOBUF_INTERNAL_EXPORT_protobuf_dapr_2fproto_2fcommon_2fv1_2fcommon_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Etag; -extern PROTOBUF_INTERNAL_EXPORT_protobuf_dapr_2fproto_2fcommon_2fv1_2fcommon_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_HTTPExtension_QuerystringEntry_DoNotUse; +extern PROTOBUF_INTERNAL_EXPORT_protobuf_dapr_2fproto_2fcommon_2fv1_2fcommon_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_HTTPExtension; extern PROTOBUF_INTERNAL_EXPORT_protobuf_dapr_2fproto_2fcommon_2fv1_2fcommon_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_StateItem_MetadataEntry_DoNotUse; extern PROTOBUF_INTERNAL_EXPORT_protobuf_dapr_2fproto_2fcommon_2fv1_2fcommon_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_StateOptions; -extern PROTOBUF_INTERNAL_EXPORT_protobuf_dapr_2fproto_2fcommon_2fv1_2fcommon_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_HTTPExtension; } // namespace protobuf_dapr_2fproto_2fcommon_2fv1_2fcommon_2eproto namespace protobuf_google_2fprotobuf_2fany_2eproto { extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fany_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Any; @@ -33,11 +32,6 @@ namespace dapr { namespace proto { namespace common { namespace v1 { -class HTTPExtension_QuerystringEntry_DoNotUseDefaultTypeInternal { - public: - ::google::protobuf::internal::ExplicitlyConstructed - _instance; -} _HTTPExtension_QuerystringEntry_DoNotUse_default_instance_; class HTTPExtensionDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed @@ -78,19 +72,6 @@ class StateOptionsDefaultTypeInternal { } // namespace proto } // namespace dapr namespace protobuf_dapr_2fproto_2fcommon_2fv1_2fcommon_2eproto { -static void InitDefaultsHTTPExtension_QuerystringEntry_DoNotUse() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::dapr::proto::common::v1::_HTTPExtension_QuerystringEntry_DoNotUse_default_instance_; - new (ptr) ::dapr::proto::common::v1::HTTPExtension_QuerystringEntry_DoNotUse(); - } - ::dapr::proto::common::v1::HTTPExtension_QuerystringEntry_DoNotUse::InitAsDefaultInstance(); -} - -::google::protobuf::internal::SCCInfo<0> scc_info_HTTPExtension_QuerystringEntry_DoNotUse = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsHTTPExtension_QuerystringEntry_DoNotUse}, {}}; - static void InitDefaultsHTTPExtension() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -102,9 +83,8 @@ static void InitDefaultsHTTPExtension() { ::dapr::proto::common::v1::HTTPExtension::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<1> scc_info_HTTPExtension = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsHTTPExtension}, { - &protobuf_dapr_2fproto_2fcommon_2fv1_2fcommon_2eproto::scc_info_HTTPExtension_QuerystringEntry_DoNotUse.base,}}; +::google::protobuf::internal::SCCInfo<0> scc_info_HTTPExtension = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsHTTPExtension}, {}}; static void InitDefaultsInvokeRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -196,7 +176,6 @@ ::google::protobuf::internal::SCCInfo<0> scc_info_StateOptions = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsStateOptions}, {}}; void InitDefaults() { - ::google::protobuf::internal::InitSCC(&scc_info_HTTPExtension_QuerystringEntry_DoNotUse.base); ::google::protobuf::internal::InitSCC(&scc_info_HTTPExtension.base); ::google::protobuf::internal::InitSCC(&scc_info_InvokeRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_InvokeResponse.base); @@ -206,19 +185,10 @@ void InitDefaults() { ::google::protobuf::internal::InitSCC(&scc_info_StateOptions.base); } -::google::protobuf::Metadata file_level_metadata[8]; +::google::protobuf::Metadata file_level_metadata[7]; const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[3]; const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::dapr::proto::common::v1::HTTPExtension_QuerystringEntry_DoNotUse, _has_bits_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::dapr::proto::common::v1::HTTPExtension_QuerystringEntry_DoNotUse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::dapr::proto::common::v1::HTTPExtension_QuerystringEntry_DoNotUse, key_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::dapr::proto::common::v1::HTTPExtension_QuerystringEntry_DoNotUse, value_), - 0, - 1, ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::dapr::proto::common::v1::HTTPExtension, _internal_metadata_), ~0u, // no _extensions_ @@ -276,18 +246,16 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::dapr::proto::common::v1::StateOptions, consistency_), }; static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - { 0, 7, sizeof(::dapr::proto::common::v1::HTTPExtension_QuerystringEntry_DoNotUse)}, - { 9, -1, sizeof(::dapr::proto::common::v1::HTTPExtension)}, - { 16, -1, sizeof(::dapr::proto::common::v1::InvokeRequest)}, - { 25, -1, sizeof(::dapr::proto::common::v1::InvokeResponse)}, - { 32, 39, sizeof(::dapr::proto::common::v1::StateItem_MetadataEntry_DoNotUse)}, - { 41, -1, sizeof(::dapr::proto::common::v1::StateItem)}, - { 51, -1, sizeof(::dapr::proto::common::v1::Etag)}, - { 57, -1, sizeof(::dapr::proto::common::v1::StateOptions)}, + { 0, -1, sizeof(::dapr::proto::common::v1::HTTPExtension)}, + { 7, -1, sizeof(::dapr::proto::common::v1::InvokeRequest)}, + { 16, -1, sizeof(::dapr::proto::common::v1::InvokeResponse)}, + { 23, 30, sizeof(::dapr::proto::common::v1::StateItem_MetadataEntry_DoNotUse)}, + { 32, -1, sizeof(::dapr::proto::common::v1::StateItem)}, + { 42, -1, sizeof(::dapr::proto::common::v1::Etag)}, + { 48, -1, sizeof(::dapr::proto::common::v1::StateOptions)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::dapr::proto::common::v1::_HTTPExtension_QuerystringEntry_DoNotUse_default_instance_), reinterpret_cast(&::dapr::proto::common::v1::_HTTPExtension_default_instance_), reinterpret_cast(&::dapr::proto::common::v1::_InvokeRequest_default_instance_), reinterpret_cast(&::dapr::proto::common::v1::_InvokeResponse_default_instance_), @@ -312,7 +280,7 @@ void protobuf_AssignDescriptorsOnce() { 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, 8); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 7); } void AddDescriptorsImpl() { @@ -320,42 +288,39 @@ void AddDescriptorsImpl() { static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n!dapr/proto/common/v1/common.proto\022\024dap" "r.proto.common.v1\032\031google/protobuf/any.p" - "roto\"\257\002\n\rHTTPExtension\0226\n\004verb\030\001 \001(\0162(.d" - "apr.proto.common.v1.HTTPExtension.Verb\022I" - "\n\013querystring\030\002 \003(\01324.dapr.proto.common." - "v1.HTTPExtension.QuerystringEntry\0322\n\020Que" - "rystringEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" - "\t:\0028\001\"g\n\004Verb\022\010\n\004NONE\020\000\022\007\n\003GET\020\001\022\010\n\004HEAD" - "\020\002\022\010\n\004POST\020\003\022\007\n\003PUT\020\004\022\n\n\006DELETE\020\005\022\013\n\007CON" - "NECT\020\006\022\013\n\007OPTIONS\020\007\022\t\n\005TRACE\020\010\"\226\001\n\rInvok" - "eRequest\022\016\n\006method\030\001 \001(\t\022\"\n\004data\030\002 \001(\0132\024" - ".google.protobuf.Any\022\024\n\014content_type\030\003 \001" - "(\t\022;\n\016http_extension\030\004 \001(\0132#.dapr.proto." - "common.v1.HTTPExtension\"J\n\016InvokeRespons" - "e\022\"\n\004data\030\001 \001(\0132\024.google.protobuf.Any\022\024\n" - "\014content_type\030\002 \001(\t\"\370\001\n\tStateItem\022\013\n\003key" - "\030\001 \001(\t\022\r\n\005value\030\002 \001(\014\022(\n\004etag\030\003 \001(\0132\032.da" - "pr.proto.common.v1.Etag\022\?\n\010metadata\030\004 \003(" - "\0132-.dapr.proto.common.v1.StateItem.Metad" - "ataEntry\0223\n\007options\030\005 \001(\0132\".dapr.proto.c" - "ommon.v1.StateOptions\032/\n\rMetadataEntry\022\013" - "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\025\n\004Etag\022\r" - "\n\005value\030\001 \001(\t\"\357\002\n\014StateOptions\022H\n\013concur" - "rency\030\001 \001(\01623.dapr.proto.common.v1.State" - "Options.StateConcurrency\022H\n\013consistency\030" - "\002 \001(\01623.dapr.proto.common.v1.StateOption" - "s.StateConsistency\"h\n\020StateConcurrency\022\033" - "\n\027CONCURRENCY_UNSPECIFIED\020\000\022\033\n\027CONCURREN" - "CY_FIRST_WRITE\020\001\022\032\n\026CONCURRENCY_LAST_WRI" - "TE\020\002\"a\n\020StateConsistency\022\033\n\027CONSISTENCY_" - "UNSPECIFIED\020\000\022\030\n\024CONSISTENCY_EVENTUAL\020\001\022" - "\026\n\022CONSISTENCY_STRONG\020\002Bi\n\nio.dapr.v1B\014C" - "ommonProtosZ/github.com/dapr/dapr/pkg/pr" - "oto/common/v1;common\252\002\033Dapr.Client.Autog" - "en.Grpc.v1b\006proto3" + "roto\"\305\001\n\rHTTPExtension\0226\n\004verb\030\001 \001(\0162(.d" + "apr.proto.common.v1.HTTPExtension.Verb\022\023" + "\n\013querystring\030\002 \001(\t\"g\n\004Verb\022\010\n\004NONE\020\000\022\007\n" + "\003GET\020\001\022\010\n\004HEAD\020\002\022\010\n\004POST\020\003\022\007\n\003PUT\020\004\022\n\n\006D" + "ELETE\020\005\022\013\n\007CONNECT\020\006\022\013\n\007OPTIONS\020\007\022\t\n\005TRA" + "CE\020\010\"\226\001\n\rInvokeRequest\022\016\n\006method\030\001 \001(\t\022\"" + "\n\004data\030\002 \001(\0132\024.google.protobuf.Any\022\024\n\014co" + "ntent_type\030\003 \001(\t\022;\n\016http_extension\030\004 \001(\013" + "2#.dapr.proto.common.v1.HTTPExtension\"J\n" + "\016InvokeResponse\022\"\n\004data\030\001 \001(\0132\024.google.p" + "rotobuf.Any\022\024\n\014content_type\030\002 \001(\t\"\370\001\n\tSt" + "ateItem\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\014\022(\n\004e" + "tag\030\003 \001(\0132\032.dapr.proto.common.v1.Etag\022\?\n" + "\010metadata\030\004 \003(\0132-.dapr.proto.common.v1.S" + "tateItem.MetadataEntry\0223\n\007options\030\005 \001(\0132" + "\".dapr.proto.common.v1.StateOptions\032/\n\rM" + "etadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t" + ":\0028\001\"\025\n\004Etag\022\r\n\005value\030\001 \001(\t\"\357\002\n\014StateOpt" + "ions\022H\n\013concurrency\030\001 \001(\01623.dapr.proto.c" + "ommon.v1.StateOptions.StateConcurrency\022H" + "\n\013consistency\030\002 \001(\01623.dapr.proto.common." + "v1.StateOptions.StateConsistency\"h\n\020Stat" + "eConcurrency\022\033\n\027CONCURRENCY_UNSPECIFIED\020" + "\000\022\033\n\027CONCURRENCY_FIRST_WRITE\020\001\022\032\n\026CONCUR" + "RENCY_LAST_WRITE\020\002\"a\n\020StateConsistency\022\033" + "\n\027CONSISTENCY_UNSPECIFIED\020\000\022\030\n\024CONSISTEN" + "CY_EVENTUAL\020\001\022\026\n\022CONSISTENCY_STRONG\020\002Bi\n" + "\nio.dapr.v1B\014CommonProtosZ/github.com/da" + "pr/dapr/pkg/proto/common/v1;common\252\002\033Dap" + "r.Client.Autogen.Grpc.v1b\006proto3" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - descriptor, 1378); + descriptor, 1272); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "dapr/proto/common/v1/common.proto", &protobuf_RegisterTypes); ::protobuf_google_2fprotobuf_2fany_2eproto::AddDescriptors(); @@ -458,23 +423,6 @@ const StateOptions_StateConsistency StateOptions::StateConsistency_MAX; const int StateOptions::StateConsistency_ARRAYSIZE; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 -// =================================================================== - -HTTPExtension_QuerystringEntry_DoNotUse::HTTPExtension_QuerystringEntry_DoNotUse() {} -HTTPExtension_QuerystringEntry_DoNotUse::HTTPExtension_QuerystringEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {} -void HTTPExtension_QuerystringEntry_DoNotUse::MergeFrom(const HTTPExtension_QuerystringEntry_DoNotUse& other) { - MergeFromInternal(other); -} -::google::protobuf::Metadata HTTPExtension_QuerystringEntry_DoNotUse::GetMetadata() const { - ::protobuf_dapr_2fproto_2fcommon_2fv1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_dapr_2fproto_2fcommon_2fv1_2fcommon_2eproto::file_level_metadata[0]; -} -void HTTPExtension_QuerystringEntry_DoNotUse::MergeFrom( - const ::google::protobuf::Message& other) { - ::google::protobuf::Message::MergeFrom(other); -} - - // =================================================================== void HTTPExtension::InitAsDefaultInstance() { @@ -495,12 +443,16 @@ HTTPExtension::HTTPExtension(const HTTPExtension& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); - querystring_.MergeFrom(from.querystring_); + querystring_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.querystring().size() > 0) { + querystring_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.querystring_); + } verb_ = from.verb_; // @@protoc_insertion_point(copy_constructor:dapr.proto.common.v1.HTTPExtension) } void HTTPExtension::SharedCtor() { + querystring_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); verb_ = 0; } @@ -510,6 +462,7 @@ HTTPExtension::~HTTPExtension() { } void HTTPExtension::SharedDtor() { + querystring_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void HTTPExtension::SetCachedSize(int size) const { @@ -532,7 +485,7 @@ void HTTPExtension::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - querystring_.Clear(); + querystring_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); verb_ = 0; _internal_metadata_.Clear(); } @@ -562,27 +515,16 @@ bool HTTPExtension::MergePartialFromCodedStream( break; } - // map querystring = 2; + // string querystring = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { - HTTPExtension_QuerystringEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField< - HTTPExtension_QuerystringEntry_DoNotUse, - ::std::string, ::std::string, - ::google::protobuf::internal::WireFormatLite::TYPE_STRING, - ::google::protobuf::internal::WireFormatLite::TYPE_STRING, - 0 >, - ::google::protobuf::Map< ::std::string, ::std::string > > parser(&querystring_); - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, &parser)); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - parser.key().data(), static_cast(parser.key().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, - "dapr.proto.common.v1.HTTPExtension.QuerystringEntry.key")); + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_querystring())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - parser.value().data(), static_cast(parser.value().length()), + this->querystring().data(), static_cast(this->querystring().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "dapr.proto.common.v1.HTTPExtension.QuerystringEntry.value")); + "dapr.proto.common.v1.HTTPExtension.querystring")); } else { goto handle_unusual; } @@ -621,57 +563,14 @@ void HTTPExtension::SerializeWithCachedSizes( 1, this->verb(), output); } - // map querystring = 2; - if (!this->querystring().empty()) { - typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer - ConstPtr; - typedef ConstPtr SortItem; - typedef ::google::protobuf::internal::CompareByDerefFirst Less; - struct Utf8Check { - static void Check(ConstPtr p) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - p->first.data(), static_cast(p->first.length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "dapr.proto.common.v1.HTTPExtension.QuerystringEntry.key"); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - p->second.data(), static_cast(p->second.length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "dapr.proto.common.v1.HTTPExtension.QuerystringEntry.value"); - } - }; - - if (output->IsSerializationDeterministic() && - this->querystring().size() > 1) { - ::std::unique_ptr items( - new SortItem[this->querystring().size()]); - typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type; - size_type n = 0; - for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator - it = this->querystring().begin(); - it != this->querystring().end(); ++it, ++n) { - items[static_cast(n)] = SortItem(&*it); - } - ::std::sort(&items[0], &items[static_cast(n)], Less()); - ::std::unique_ptr entry; - for (size_type i = 0; i < n; i++) { - entry.reset(querystring_.NewEntryWrapper( - items[static_cast(i)]->first, items[static_cast(i)]->second)); - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, *entry, output); - Utf8Check::Check(items[static_cast(i)]); - } - } else { - ::std::unique_ptr entry; - for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator - it = this->querystring().begin(); - it != this->querystring().end(); ++it) { - entry.reset(querystring_.NewEntryWrapper( - it->first, it->second)); - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, *entry, output); - Utf8Check::Check(&*it); - } - } + // string querystring = 2; + if (this->querystring().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->querystring().data(), static_cast(this->querystring().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "dapr.proto.common.v1.HTTPExtension.querystring"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->querystring(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -694,61 +593,15 @@ ::google::protobuf::uint8* HTTPExtension::InternalSerializeWithCachedSizesToArra 1, this->verb(), target); } - // map querystring = 2; - if (!this->querystring().empty()) { - typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer - ConstPtr; - typedef ConstPtr SortItem; - typedef ::google::protobuf::internal::CompareByDerefFirst Less; - struct Utf8Check { - static void Check(ConstPtr p) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - p->first.data(), static_cast(p->first.length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "dapr.proto.common.v1.HTTPExtension.QuerystringEntry.key"); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - p->second.data(), static_cast(p->second.length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "dapr.proto.common.v1.HTTPExtension.QuerystringEntry.value"); - } - }; - - if (deterministic && - this->querystring().size() > 1) { - ::std::unique_ptr items( - new SortItem[this->querystring().size()]); - typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type; - size_type n = 0; - for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator - it = this->querystring().begin(); - it != this->querystring().end(); ++it, ++n) { - items[static_cast(n)] = SortItem(&*it); - } - ::std::sort(&items[0], &items[static_cast(n)], Less()); - ::std::unique_ptr entry; - for (size_type i = 0; i < n; i++) { - entry.reset(querystring_.NewEntryWrapper( - items[static_cast(i)]->first, items[static_cast(i)]->second)); - target = ::google::protobuf::internal::WireFormatLite:: - InternalWriteMessageNoVirtualToArray( - 2, *entry, deterministic, target); -; - Utf8Check::Check(items[static_cast(i)]); - } - } else { - ::std::unique_ptr entry; - for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator - it = this->querystring().begin(); - it != this->querystring().end(); ++it) { - entry.reset(querystring_.NewEntryWrapper( - it->first, it->second)); - target = ::google::protobuf::internal::WireFormatLite:: - InternalWriteMessageNoVirtualToArray( - 2, *entry, deterministic, target); -; - Utf8Check::Check(&*it); - } - } + // string querystring = 2; + if (this->querystring().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->querystring().data(), static_cast(this->querystring().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "dapr.proto.common.v1.HTTPExtension.querystring"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->querystring(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -768,18 +621,11 @@ size_t HTTPExtension::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // map querystring = 2; - total_size += 1 * - ::google::protobuf::internal::FromIntSize(this->querystring_size()); - { - ::std::unique_ptr entry; - for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator - it = this->querystring().begin(); - it != this->querystring().end(); ++it) { - entry.reset(querystring_.NewEntryWrapper(it->first, it->second)); - total_size += ::google::protobuf::internal::WireFormatLite:: - MessageSizeNoVirtual(*entry); - } + // string querystring = 2; + if (this->querystring().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->querystring()); } // .dapr.proto.common.v1.HTTPExtension.Verb verb = 1; @@ -815,7 +661,10 @@ void HTTPExtension::MergeFrom(const HTTPExtension& from) { ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - querystring_.MergeFrom(from.querystring_); + if (from.querystring().size() > 0) { + + querystring_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.querystring_); + } if (from.verb() != 0) { set_verb(from.verb()); } @@ -845,7 +694,8 @@ void HTTPExtension::Swap(HTTPExtension* other) { } void HTTPExtension::InternalSwap(HTTPExtension* other) { using std::swap; - querystring_.Swap(&other->querystring_); + querystring_.Swap(&other->querystring_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); swap(verb_, other->verb_); _internal_metadata_.Swap(&other->_internal_metadata_); } @@ -1570,7 +1420,7 @@ void StateItem_MetadataEntry_DoNotUse::MergeFrom(const StateItem_MetadataEntry_D } ::google::protobuf::Metadata StateItem_MetadataEntry_DoNotUse::GetMetadata() const { ::protobuf_dapr_2fproto_2fcommon_2fv1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_dapr_2fproto_2fcommon_2fv1_2fcommon_2eproto::file_level_metadata[4]; + return ::protobuf_dapr_2fproto_2fcommon_2fv1_2fcommon_2eproto::file_level_metadata[3]; } void StateItem_MetadataEntry_DoNotUse::MergeFrom( const ::google::protobuf::Message& other) { @@ -2641,9 +2491,6 @@ ::google::protobuf::Metadata StateOptions::GetMetadata() const { } // namespace dapr namespace google { namespace protobuf { -template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::dapr::proto::common::v1::HTTPExtension_QuerystringEntry_DoNotUse* Arena::CreateMaybeMessage< ::dapr::proto::common::v1::HTTPExtension_QuerystringEntry_DoNotUse >(Arena* arena) { - return Arena::CreateInternal< ::dapr::proto::common::v1::HTTPExtension_QuerystringEntry_DoNotUse >(arena); -} template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::dapr::proto::common::v1::HTTPExtension* Arena::CreateMaybeMessage< ::dapr::proto::common::v1::HTTPExtension >(Arena* arena) { return Arena::CreateInternal< ::dapr::proto::common::v1::HTTPExtension >(arena); } diff --git a/src/dapr/proto/common/v1/common.pb.h b/src/dapr/proto/common/v1/common.pb.h index 128575c..c3200c1 100644 --- a/src/dapr/proto/common/v1/common.pb.h +++ b/src/dapr/proto/common/v1/common.pb.h @@ -43,7 +43,7 @@ namespace protobuf_dapr_2fproto_2fcommon_2fv1_2fcommon_2eproto { struct TableStruct { static const ::google::protobuf::internal::ParseTableField entries[]; static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; - static const ::google::protobuf::internal::ParseTable schema[8]; + static const ::google::protobuf::internal::ParseTable schema[7]; static const ::google::protobuf::internal::FieldMetadata field_metadata[]; static const ::google::protobuf::internal::SerializationTable serialization_table[]; static const ::google::protobuf::uint32 offsets[]; @@ -60,9 +60,6 @@ extern EtagDefaultTypeInternal _Etag_default_instance_; class HTTPExtension; class HTTPExtensionDefaultTypeInternal; extern HTTPExtensionDefaultTypeInternal _HTTPExtension_default_instance_; -class HTTPExtension_QuerystringEntry_DoNotUse; -class HTTPExtension_QuerystringEntry_DoNotUseDefaultTypeInternal; -extern HTTPExtension_QuerystringEntry_DoNotUseDefaultTypeInternal _HTTPExtension_QuerystringEntry_DoNotUse_default_instance_; class InvokeRequest; class InvokeRequestDefaultTypeInternal; extern InvokeRequestDefaultTypeInternal _InvokeRequest_default_instance_; @@ -86,7 +83,6 @@ namespace google { namespace protobuf { template<> ::dapr::proto::common::v1::Etag* Arena::CreateMaybeMessage<::dapr::proto::common::v1::Etag>(Arena*); template<> ::dapr::proto::common::v1::HTTPExtension* Arena::CreateMaybeMessage<::dapr::proto::common::v1::HTTPExtension>(Arena*); -template<> ::dapr::proto::common::v1::HTTPExtension_QuerystringEntry_DoNotUse* Arena::CreateMaybeMessage<::dapr::proto::common::v1::HTTPExtension_QuerystringEntry_DoNotUse>(Arena*); template<> ::dapr::proto::common::v1::InvokeRequest* Arena::CreateMaybeMessage<::dapr::proto::common::v1::InvokeRequest>(Arena*); template<> ::dapr::proto::common::v1::InvokeResponse* Arena::CreateMaybeMessage<::dapr::proto::common::v1::InvokeResponse>(Arena*); template<> ::dapr::proto::common::v1::StateItem* Arena::CreateMaybeMessage<::dapr::proto::common::v1::StateItem>(Arena*); @@ -173,27 +169,6 @@ inline bool StateOptions_StateConsistency_Parse( } // =================================================================== -class HTTPExtension_QuerystringEntry_DoNotUse : public ::google::protobuf::internal::MapEntry { -public: - typedef ::google::protobuf::internal::MapEntry SuperType; - HTTPExtension_QuerystringEntry_DoNotUse(); - HTTPExtension_QuerystringEntry_DoNotUse(::google::protobuf::Arena* arena); - void MergeFrom(const HTTPExtension_QuerystringEntry_DoNotUse& other); - static const HTTPExtension_QuerystringEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_HTTPExtension_QuerystringEntry_DoNotUse_default_instance_); } - void MergeFrom(const ::google::protobuf::Message& other) final; - ::google::protobuf::Metadata GetMetadata() const; -}; - -// ------------------------------------------------------------------- - class HTTPExtension : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:dapr.proto.common.v1.HTTPExtension) */ { public: HTTPExtension(); @@ -229,7 +204,7 @@ class HTTPExtension : public ::google::protobuf::Message /* @@protoc_insertion_p &_HTTPExtension_default_instance_); } static constexpr int kIndexInFileMessages = - 1; + 0; void Swap(HTTPExtension* other); friend void swap(HTTPExtension& a, HTTPExtension& b) { @@ -279,7 +254,6 @@ class HTTPExtension : public ::google::protobuf::Message /* @@protoc_insertion_p // nested types ---------------------------------------------------- - typedef HTTPExtension_Verb Verb; static const Verb NONE = HTTPExtension_Verb_NONE; @@ -322,14 +296,19 @@ class HTTPExtension : public ::google::protobuf::Message /* @@protoc_insertion_p // accessors ------------------------------------------------------- - // map querystring = 2; - int querystring_size() const; + // string querystring = 2; void clear_querystring(); static const int kQuerystringFieldNumber = 2; - const ::google::protobuf::Map< ::std::string, ::std::string >& - querystring() const; - ::google::protobuf::Map< ::std::string, ::std::string >* - mutable_querystring(); + const ::std::string& querystring() const; + void set_querystring(const ::std::string& value); + #if LANG_CXX11 + void set_querystring(::std::string&& value); + #endif + void set_querystring(const char* value); + void set_querystring(const char* value, size_t size); + ::std::string* mutable_querystring(); + ::std::string* release_querystring(); + void set_allocated_querystring(::std::string* querystring); // .dapr.proto.common.v1.HTTPExtension.Verb verb = 1; void clear_verb(); @@ -341,12 +320,7 @@ class HTTPExtension : public ::google::protobuf::Message /* @@protoc_insertion_p private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::MapField< - HTTPExtension_QuerystringEntry_DoNotUse, - ::std::string, ::std::string, - ::google::protobuf::internal::WireFormatLite::TYPE_STRING, - ::google::protobuf::internal::WireFormatLite::TYPE_STRING, - 0 > querystring_; + ::google::protobuf::internal::ArenaStringPtr querystring_; int verb_; mutable ::google::protobuf::internal::CachedSize _cached_size_; friend struct ::protobuf_dapr_2fproto_2fcommon_2fv1_2fcommon_2eproto::TableStruct; @@ -388,7 +362,7 @@ class InvokeRequest : public ::google::protobuf::Message /* @@protoc_insertion_p &_InvokeRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 2; + 1; void Swap(InvokeRequest* other); friend void swap(InvokeRequest& a, InvokeRequest& b) { @@ -540,7 +514,7 @@ class InvokeResponse : public ::google::protobuf::Message /* @@protoc_insertion_ &_InvokeResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 3; + 2; void Swap(InvokeResponse* other); friend void swap(InvokeResponse& a, InvokeResponse& b) { @@ -685,7 +659,7 @@ class StateItem : public ::google::protobuf::Message /* @@protoc_insertion_point &_StateItem_default_instance_); } static constexpr int kIndexInFileMessages = - 5; + 4; void Swap(StateItem* other); friend void swap(StateItem& a, StateItem& b) { @@ -853,7 +827,7 @@ class Etag : public ::google::protobuf::Message /* @@protoc_insertion_point(clas &_Etag_default_instance_); } static constexpr int kIndexInFileMessages = - 6; + 5; void Swap(Etag* other); friend void swap(Etag& a, Etag& b) { @@ -964,7 +938,7 @@ class StateOptions : public ::google::protobuf::Message /* @@protoc_insertion_po &_StateOptions_default_instance_); } static constexpr int kIndexInFileMessages = - 7; + 6; void Swap(StateOptions* other); friend void swap(StateOptions& a, StateOptions& b) { @@ -1102,8 +1076,6 @@ class StateOptions : public ::google::protobuf::Message /* @@protoc_insertion_po #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif // __GNUC__ -// ------------------------------------------------------------------- - // HTTPExtension // .dapr.proto.common.v1.HTTPExtension.Verb verb = 1; @@ -1120,22 +1092,57 @@ inline void HTTPExtension::set_verb(::dapr::proto::common::v1::HTTPExtension_Ver // @@protoc_insertion_point(field_set:dapr.proto.common.v1.HTTPExtension.verb) } -// map querystring = 2; -inline int HTTPExtension::querystring_size() const { - return querystring_.size(); -} +// string querystring = 2; inline void HTTPExtension::clear_querystring() { - querystring_.Clear(); + querystring_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -inline const ::google::protobuf::Map< ::std::string, ::std::string >& -HTTPExtension::querystring() const { - // @@protoc_insertion_point(field_map:dapr.proto.common.v1.HTTPExtension.querystring) - return querystring_.GetMap(); +inline const ::std::string& HTTPExtension::querystring() const { + // @@protoc_insertion_point(field_get:dapr.proto.common.v1.HTTPExtension.querystring) + return querystring_.GetNoArena(); } -inline ::google::protobuf::Map< ::std::string, ::std::string >* -HTTPExtension::mutable_querystring() { - // @@protoc_insertion_point(field_mutable_map:dapr.proto.common.v1.HTTPExtension.querystring) - return querystring_.MutableMap(); +inline void HTTPExtension::set_querystring(const ::std::string& value) { + + querystring_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:dapr.proto.common.v1.HTTPExtension.querystring) +} +#if LANG_CXX11 +inline void HTTPExtension::set_querystring(::std::string&& value) { + + querystring_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:dapr.proto.common.v1.HTTPExtension.querystring) +} +#endif +inline void HTTPExtension::set_querystring(const char* value) { + GOOGLE_DCHECK(value != NULL); + + querystring_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:dapr.proto.common.v1.HTTPExtension.querystring) +} +inline void HTTPExtension::set_querystring(const char* value, size_t size) { + + querystring_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:dapr.proto.common.v1.HTTPExtension.querystring) +} +inline ::std::string* HTTPExtension::mutable_querystring() { + + // @@protoc_insertion_point(field_mutable:dapr.proto.common.v1.HTTPExtension.querystring) + return querystring_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* HTTPExtension::release_querystring() { + // @@protoc_insertion_point(field_release:dapr.proto.common.v1.HTTPExtension.querystring) + + return querystring_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void HTTPExtension::set_allocated_querystring(::std::string* querystring) { + if (querystring != NULL) { + + } else { + + } + querystring_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), querystring); + // @@protoc_insertion_point(field_set_allocated:dapr.proto.common.v1.HTTPExtension.querystring) } // ------------------------------------------------------------------- @@ -1797,8 +1804,6 @@ inline void StateOptions::set_consistency(::dapr::proto::common::v1::StateOption // ------------------------------------------------------------------- -// ------------------------------------------------------------------- - // @@protoc_insertion_point(namespace_scope)