diff --git a/native/cpp/CommonCpp/grpc/_generated/backup.grpc.pb.h b/native/cpp/CommonCpp/grpc/_generated/backup.grpc.pb.h --- a/native/cpp/CommonCpp/grpc/_generated/backup.grpc.pb.h +++ b/native/cpp/CommonCpp/grpc/_generated/backup.grpc.pb.h @@ -57,13 +57,13 @@ std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::backup::CreateNewBackupRequest, ::backup::CreateNewBackupResponse>> PrepareAsyncCreateNewBackup(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::backup::CreateNewBackupRequest, ::backup::CreateNewBackupResponse>>(PrepareAsyncCreateNewBackupRaw(context, cq)); } - std::unique_ptr< ::grpc::ClientWriterInterface< ::backup::SendLogRequest>> SendLog(::grpc::ClientContext* context, ::google::protobuf::Empty* response) { + std::unique_ptr< ::grpc::ClientWriterInterface< ::backup::SendLogRequest>> SendLog(::grpc::ClientContext* context, ::backup::SendLogResponse* response) { return std::unique_ptr< ::grpc::ClientWriterInterface< ::backup::SendLogRequest>>(SendLogRaw(context, response)); } - std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::backup::SendLogRequest>> AsyncSendLog(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::CompletionQueue* cq, void* tag) { + std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::backup::SendLogRequest>> AsyncSendLog(::grpc::ClientContext* context, ::backup::SendLogResponse* response, ::grpc::CompletionQueue* cq, void* tag) { return std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::backup::SendLogRequest>>(AsyncSendLogRaw(context, response, cq, tag)); } - std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::backup::SendLogRequest>> PrepareAsyncSendLog(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::CompletionQueue* cq) { + std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::backup::SendLogRequest>> PrepareAsyncSendLog(::grpc::ClientContext* context, ::backup::SendLogResponse* response, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::backup::SendLogRequest>>(PrepareAsyncSendLogRaw(context, response, cq)); } std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::backup::RecoverBackupKeyRequest, ::backup::RecoverBackupKeyResponse>> RecoverBackupKey(::grpc::ClientContext* context) { @@ -84,13 +84,23 @@ std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::backup::PullBackupResponse>> PrepareAsyncPullBackup(::grpc::ClientContext* context, const ::backup::PullBackupRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::backup::PullBackupResponse>>(PrepareAsyncPullBackupRaw(context, request, cq)); } + std::unique_ptr< ::grpc::ClientWriterInterface< ::backup::AddAttachmentRequest>> AddAttachment(::grpc::ClientContext* context, ::google::protobuf::Empty* response) { + return std::unique_ptr< ::grpc::ClientWriterInterface< ::backup::AddAttachmentRequest>>(AddAttachmentRaw(context, response)); + } + std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::backup::AddAttachmentRequest>> AsyncAddAttachment(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::backup::AddAttachmentRequest>>(AsyncAddAttachmentRaw(context, response, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::backup::AddAttachmentRequest>> PrepareAsyncAddAttachment(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::backup::AddAttachmentRequest>>(PrepareAsyncAddAttachmentRaw(context, response, cq)); + } class async_interface { public: virtual ~async_interface() {} virtual void CreateNewBackup(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::backup::CreateNewBackupRequest,::backup::CreateNewBackupResponse>* reactor) = 0; - virtual void SendLog(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::ClientWriteReactor< ::backup::SendLogRequest>* reactor) = 0; + virtual void SendLog(::grpc::ClientContext* context, ::backup::SendLogResponse* response, ::grpc::ClientWriteReactor< ::backup::SendLogRequest>* reactor) = 0; virtual void RecoverBackupKey(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::backup::RecoverBackupKeyRequest,::backup::RecoverBackupKeyResponse>* reactor) = 0; virtual void PullBackup(::grpc::ClientContext* context, const ::backup::PullBackupRequest* request, ::grpc::ClientReadReactor< ::backup::PullBackupResponse>* reactor) = 0; + virtual void AddAttachment(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::ClientWriteReactor< ::backup::AddAttachmentRequest>* reactor) = 0; }; typedef class async_interface experimental_async_interface; virtual class async_interface* async() { return nullptr; } @@ -99,15 +109,18 @@ virtual ::grpc::ClientReaderWriterInterface< ::backup::CreateNewBackupRequest, ::backup::CreateNewBackupResponse>* CreateNewBackupRaw(::grpc::ClientContext* context) = 0; virtual ::grpc::ClientAsyncReaderWriterInterface< ::backup::CreateNewBackupRequest, ::backup::CreateNewBackupResponse>* AsyncCreateNewBackupRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0; virtual ::grpc::ClientAsyncReaderWriterInterface< ::backup::CreateNewBackupRequest, ::backup::CreateNewBackupResponse>* PrepareAsyncCreateNewBackupRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientWriterInterface< ::backup::SendLogRequest>* SendLogRaw(::grpc::ClientContext* context, ::google::protobuf::Empty* response) = 0; - virtual ::grpc::ClientAsyncWriterInterface< ::backup::SendLogRequest>* AsyncSendLogRaw(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::CompletionQueue* cq, void* tag) = 0; - virtual ::grpc::ClientAsyncWriterInterface< ::backup::SendLogRequest>* PrepareAsyncSendLogRaw(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientWriterInterface< ::backup::SendLogRequest>* SendLogRaw(::grpc::ClientContext* context, ::backup::SendLogResponse* response) = 0; + virtual ::grpc::ClientAsyncWriterInterface< ::backup::SendLogRequest>* AsyncSendLogRaw(::grpc::ClientContext* context, ::backup::SendLogResponse* response, ::grpc::CompletionQueue* cq, void* tag) = 0; + virtual ::grpc::ClientAsyncWriterInterface< ::backup::SendLogRequest>* PrepareAsyncSendLogRaw(::grpc::ClientContext* context, ::backup::SendLogResponse* response, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientReaderWriterInterface< ::backup::RecoverBackupKeyRequest, ::backup::RecoverBackupKeyResponse>* RecoverBackupKeyRaw(::grpc::ClientContext* context) = 0; virtual ::grpc::ClientAsyncReaderWriterInterface< ::backup::RecoverBackupKeyRequest, ::backup::RecoverBackupKeyResponse>* AsyncRecoverBackupKeyRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0; virtual ::grpc::ClientAsyncReaderWriterInterface< ::backup::RecoverBackupKeyRequest, ::backup::RecoverBackupKeyResponse>* PrepareAsyncRecoverBackupKeyRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientReaderInterface< ::backup::PullBackupResponse>* PullBackupRaw(::grpc::ClientContext* context, const ::backup::PullBackupRequest& request) = 0; virtual ::grpc::ClientAsyncReaderInterface< ::backup::PullBackupResponse>* AsyncPullBackupRaw(::grpc::ClientContext* context, const ::backup::PullBackupRequest& request, ::grpc::CompletionQueue* cq, void* tag) = 0; virtual ::grpc::ClientAsyncReaderInterface< ::backup::PullBackupResponse>* PrepareAsyncPullBackupRaw(::grpc::ClientContext* context, const ::backup::PullBackupRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientWriterInterface< ::backup::AddAttachmentRequest>* AddAttachmentRaw(::grpc::ClientContext* context, ::google::protobuf::Empty* response) = 0; + virtual ::grpc::ClientAsyncWriterInterface< ::backup::AddAttachmentRequest>* AsyncAddAttachmentRaw(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::CompletionQueue* cq, void* tag) = 0; + virtual ::grpc::ClientAsyncWriterInterface< ::backup::AddAttachmentRequest>* PrepareAsyncAddAttachmentRaw(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::CompletionQueue* cq) = 0; }; class Stub final : public StubInterface { public: @@ -121,13 +134,13 @@ std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::backup::CreateNewBackupRequest, ::backup::CreateNewBackupResponse>> PrepareAsyncCreateNewBackup(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::backup::CreateNewBackupRequest, ::backup::CreateNewBackupResponse>>(PrepareAsyncCreateNewBackupRaw(context, cq)); } - std::unique_ptr< ::grpc::ClientWriter< ::backup::SendLogRequest>> SendLog(::grpc::ClientContext* context, ::google::protobuf::Empty* response) { + std::unique_ptr< ::grpc::ClientWriter< ::backup::SendLogRequest>> SendLog(::grpc::ClientContext* context, ::backup::SendLogResponse* response) { return std::unique_ptr< ::grpc::ClientWriter< ::backup::SendLogRequest>>(SendLogRaw(context, response)); } - std::unique_ptr< ::grpc::ClientAsyncWriter< ::backup::SendLogRequest>> AsyncSendLog(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::CompletionQueue* cq, void* tag) { + std::unique_ptr< ::grpc::ClientAsyncWriter< ::backup::SendLogRequest>> AsyncSendLog(::grpc::ClientContext* context, ::backup::SendLogResponse* response, ::grpc::CompletionQueue* cq, void* tag) { return std::unique_ptr< ::grpc::ClientAsyncWriter< ::backup::SendLogRequest>>(AsyncSendLogRaw(context, response, cq, tag)); } - std::unique_ptr< ::grpc::ClientAsyncWriter< ::backup::SendLogRequest>> PrepareAsyncSendLog(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::CompletionQueue* cq) { + std::unique_ptr< ::grpc::ClientAsyncWriter< ::backup::SendLogRequest>> PrepareAsyncSendLog(::grpc::ClientContext* context, ::backup::SendLogResponse* response, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncWriter< ::backup::SendLogRequest>>(PrepareAsyncSendLogRaw(context, response, cq)); } std::unique_ptr< ::grpc::ClientReaderWriter< ::backup::RecoverBackupKeyRequest, ::backup::RecoverBackupKeyResponse>> RecoverBackupKey(::grpc::ClientContext* context) { @@ -148,13 +161,23 @@ std::unique_ptr< ::grpc::ClientAsyncReader< ::backup::PullBackupResponse>> PrepareAsyncPullBackup(::grpc::ClientContext* context, const ::backup::PullBackupRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncReader< ::backup::PullBackupResponse>>(PrepareAsyncPullBackupRaw(context, request, cq)); } + std::unique_ptr< ::grpc::ClientWriter< ::backup::AddAttachmentRequest>> AddAttachment(::grpc::ClientContext* context, ::google::protobuf::Empty* response) { + return std::unique_ptr< ::grpc::ClientWriter< ::backup::AddAttachmentRequest>>(AddAttachmentRaw(context, response)); + } + std::unique_ptr< ::grpc::ClientAsyncWriter< ::backup::AddAttachmentRequest>> AsyncAddAttachment(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncWriter< ::backup::AddAttachmentRequest>>(AsyncAddAttachmentRaw(context, response, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncWriter< ::backup::AddAttachmentRequest>> PrepareAsyncAddAttachment(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncWriter< ::backup::AddAttachmentRequest>>(PrepareAsyncAddAttachmentRaw(context, response, cq)); + } class async final : public StubInterface::async_interface { public: void CreateNewBackup(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::backup::CreateNewBackupRequest,::backup::CreateNewBackupResponse>* reactor) override; - void SendLog(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::ClientWriteReactor< ::backup::SendLogRequest>* reactor) override; + void SendLog(::grpc::ClientContext* context, ::backup::SendLogResponse* response, ::grpc::ClientWriteReactor< ::backup::SendLogRequest>* reactor) override; void RecoverBackupKey(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::backup::RecoverBackupKeyRequest,::backup::RecoverBackupKeyResponse>* reactor) override; void PullBackup(::grpc::ClientContext* context, const ::backup::PullBackupRequest* request, ::grpc::ClientReadReactor< ::backup::PullBackupResponse>* reactor) override; + void AddAttachment(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::ClientWriteReactor< ::backup::AddAttachmentRequest>* reactor) override; private: friend class Stub; explicit async(Stub* stub): stub_(stub) { } @@ -169,19 +192,23 @@ ::grpc::ClientReaderWriter< ::backup::CreateNewBackupRequest, ::backup::CreateNewBackupResponse>* CreateNewBackupRaw(::grpc::ClientContext* context) override; ::grpc::ClientAsyncReaderWriter< ::backup::CreateNewBackupRequest, ::backup::CreateNewBackupResponse>* AsyncCreateNewBackupRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) override; ::grpc::ClientAsyncReaderWriter< ::backup::CreateNewBackupRequest, ::backup::CreateNewBackupResponse>* PrepareAsyncCreateNewBackupRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientWriter< ::backup::SendLogRequest>* SendLogRaw(::grpc::ClientContext* context, ::google::protobuf::Empty* response) override; - ::grpc::ClientAsyncWriter< ::backup::SendLogRequest>* AsyncSendLogRaw(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::CompletionQueue* cq, void* tag) override; - ::grpc::ClientAsyncWriter< ::backup::SendLogRequest>* PrepareAsyncSendLogRaw(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientWriter< ::backup::SendLogRequest>* SendLogRaw(::grpc::ClientContext* context, ::backup::SendLogResponse* response) override; + ::grpc::ClientAsyncWriter< ::backup::SendLogRequest>* AsyncSendLogRaw(::grpc::ClientContext* context, ::backup::SendLogResponse* response, ::grpc::CompletionQueue* cq, void* tag) override; + ::grpc::ClientAsyncWriter< ::backup::SendLogRequest>* PrepareAsyncSendLogRaw(::grpc::ClientContext* context, ::backup::SendLogResponse* response, ::grpc::CompletionQueue* cq) override; ::grpc::ClientReaderWriter< ::backup::RecoverBackupKeyRequest, ::backup::RecoverBackupKeyResponse>* RecoverBackupKeyRaw(::grpc::ClientContext* context) override; ::grpc::ClientAsyncReaderWriter< ::backup::RecoverBackupKeyRequest, ::backup::RecoverBackupKeyResponse>* AsyncRecoverBackupKeyRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) override; ::grpc::ClientAsyncReaderWriter< ::backup::RecoverBackupKeyRequest, ::backup::RecoverBackupKeyResponse>* PrepareAsyncRecoverBackupKeyRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) override; ::grpc::ClientReader< ::backup::PullBackupResponse>* PullBackupRaw(::grpc::ClientContext* context, const ::backup::PullBackupRequest& request) override; ::grpc::ClientAsyncReader< ::backup::PullBackupResponse>* AsyncPullBackupRaw(::grpc::ClientContext* context, const ::backup::PullBackupRequest& request, ::grpc::CompletionQueue* cq, void* tag) override; ::grpc::ClientAsyncReader< ::backup::PullBackupResponse>* PrepareAsyncPullBackupRaw(::grpc::ClientContext* context, const ::backup::PullBackupRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientWriter< ::backup::AddAttachmentRequest>* AddAttachmentRaw(::grpc::ClientContext* context, ::google::protobuf::Empty* response) override; + ::grpc::ClientAsyncWriter< ::backup::AddAttachmentRequest>* AsyncAddAttachmentRaw(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::CompletionQueue* cq, void* tag) override; + ::grpc::ClientAsyncWriter< ::backup::AddAttachmentRequest>* PrepareAsyncAddAttachmentRaw(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::CompletionQueue* cq) override; const ::grpc::internal::RpcMethod rpcmethod_CreateNewBackup_; const ::grpc::internal::RpcMethod rpcmethod_SendLog_; const ::grpc::internal::RpcMethod rpcmethod_RecoverBackupKey_; const ::grpc::internal::RpcMethod rpcmethod_PullBackup_; + const ::grpc::internal::RpcMethod rpcmethod_AddAttachment_; }; static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); @@ -190,9 +217,10 @@ Service(); virtual ~Service(); virtual ::grpc::Status CreateNewBackup(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::backup::CreateNewBackupResponse, ::backup::CreateNewBackupRequest>* stream); - virtual ::grpc::Status SendLog(::grpc::ServerContext* context, ::grpc::ServerReader< ::backup::SendLogRequest>* reader, ::google::protobuf::Empty* response); + virtual ::grpc::Status SendLog(::grpc::ServerContext* context, ::grpc::ServerReader< ::backup::SendLogRequest>* reader, ::backup::SendLogResponse* response); virtual ::grpc::Status RecoverBackupKey(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::backup::RecoverBackupKeyResponse, ::backup::RecoverBackupKeyRequest>* stream); virtual ::grpc::Status PullBackup(::grpc::ServerContext* context, const ::backup::PullBackupRequest* request, ::grpc::ServerWriter< ::backup::PullBackupResponse>* writer); + virtual ::grpc::Status AddAttachment(::grpc::ServerContext* context, ::grpc::ServerReader< ::backup::AddAttachmentRequest>* reader, ::google::protobuf::Empty* response); }; template class WithAsyncMethod_CreateNewBackup : public BaseClass { @@ -226,11 +254,11 @@ BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status SendLog(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::backup::SendLogRequest>* /*reader*/, ::google::protobuf::Empty* /*response*/) override { + ::grpc::Status SendLog(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::backup::SendLogRequest>* /*reader*/, ::backup::SendLogResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - void RequestSendLog(::grpc::ServerContext* context, ::grpc::ServerAsyncReader< ::google::protobuf::Empty, ::backup::SendLogRequest>* reader, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + void RequestSendLog(::grpc::ServerContext* context, ::grpc::ServerAsyncReader< ::backup::SendLogResponse, ::backup::SendLogRequest>* reader, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { ::grpc::Service::RequestAsyncClientStreaming(1, context, reader, new_call_cq, notification_cq, tag); } }; @@ -274,7 +302,27 @@ ::grpc::Service::RequestAsyncServerStreaming(3, context, request, writer, new_call_cq, notification_cq, tag); } }; - typedef WithAsyncMethod_CreateNewBackup > > > AsyncService; + template + class WithAsyncMethod_AddAttachment : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_AddAttachment() { + ::grpc::Service::MarkMethodAsync(4); + } + ~WithAsyncMethod_AddAttachment() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AddAttachment(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::backup::AddAttachmentRequest>* /*reader*/, ::google::protobuf::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestAddAttachment(::grpc::ServerContext* context, ::grpc::ServerAsyncReader< ::google::protobuf::Empty, ::backup::AddAttachmentRequest>* reader, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncClientStreaming(4, context, reader, new_call_cq, notification_cq, tag); + } + }; + typedef WithAsyncMethod_CreateNewBackup > > > > AsyncService; template class WithCallbackMethod_CreateNewBackup : public BaseClass { private: @@ -305,20 +353,20 @@ public: WithCallbackMethod_SendLog() { ::grpc::Service::MarkMethodCallback(1, - new ::grpc::internal::CallbackClientStreamingHandler< ::backup::SendLogRequest, ::google::protobuf::Empty>( + new ::grpc::internal::CallbackClientStreamingHandler< ::backup::SendLogRequest, ::backup::SendLogResponse>( [this]( - ::grpc::CallbackServerContext* context, ::google::protobuf::Empty* response) { return this->SendLog(context, response); })); + ::grpc::CallbackServerContext* context, ::backup::SendLogResponse* response) { return this->SendLog(context, response); })); } ~WithCallbackMethod_SendLog() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status SendLog(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::backup::SendLogRequest>* /*reader*/, ::google::protobuf::Empty* /*response*/) override { + ::grpc::Status SendLog(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::backup::SendLogRequest>* /*reader*/, ::backup::SendLogResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } virtual ::grpc::ServerReadReactor< ::backup::SendLogRequest>* SendLog( - ::grpc::CallbackServerContext* /*context*/, ::google::protobuf::Empty* /*response*/) { return nullptr; } + ::grpc::CallbackServerContext* /*context*/, ::backup::SendLogResponse* /*response*/) { return nullptr; } }; template class WithCallbackMethod_RecoverBackupKey : public BaseClass { @@ -365,7 +413,29 @@ virtual ::grpc::ServerWriteReactor< ::backup::PullBackupResponse>* PullBackup( ::grpc::CallbackServerContext* /*context*/, const ::backup::PullBackupRequest* /*request*/) { return nullptr; } }; - typedef WithCallbackMethod_CreateNewBackup > > > CallbackService; + template + class WithCallbackMethod_AddAttachment : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_AddAttachment() { + ::grpc::Service::MarkMethodCallback(4, + new ::grpc::internal::CallbackClientStreamingHandler< ::backup::AddAttachmentRequest, ::google::protobuf::Empty>( + [this]( + ::grpc::CallbackServerContext* context, ::google::protobuf::Empty* response) { return this->AddAttachment(context, response); })); + } + ~WithCallbackMethod_AddAttachment() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AddAttachment(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::backup::AddAttachmentRequest>* /*reader*/, ::google::protobuf::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerReadReactor< ::backup::AddAttachmentRequest>* AddAttachment( + ::grpc::CallbackServerContext* /*context*/, ::google::protobuf::Empty* /*response*/) { return nullptr; } + }; + typedef WithCallbackMethod_CreateNewBackup > > > > CallbackService; typedef CallbackService ExperimentalCallbackService; template class WithGenericMethod_CreateNewBackup : public BaseClass { @@ -396,7 +466,7 @@ BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status SendLog(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::backup::SendLogRequest>* /*reader*/, ::google::protobuf::Empty* /*response*/) override { + ::grpc::Status SendLog(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::backup::SendLogRequest>* /*reader*/, ::backup::SendLogResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -436,6 +506,23 @@ } }; template + class WithGenericMethod_AddAttachment : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_AddAttachment() { + ::grpc::Service::MarkMethodGeneric(4); + } + ~WithGenericMethod_AddAttachment() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AddAttachment(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::backup::AddAttachmentRequest>* /*reader*/, ::google::protobuf::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template class WithRawMethod_CreateNewBackup : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} @@ -467,7 +554,7 @@ BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status SendLog(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::backup::SendLogRequest>* /*reader*/, ::google::protobuf::Empty* /*response*/) override { + ::grpc::Status SendLog(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::backup::SendLogRequest>* /*reader*/, ::backup::SendLogResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -516,6 +603,26 @@ } }; template + class WithRawMethod_AddAttachment : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_AddAttachment() { + ::grpc::Service::MarkMethodRaw(4); + } + ~WithRawMethod_AddAttachment() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AddAttachment(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::backup::AddAttachmentRequest>* /*reader*/, ::google::protobuf::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestAddAttachment(::grpc::ServerContext* context, ::grpc::ServerAsyncReader< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* reader, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncClientStreaming(4, context, reader, new_call_cq, notification_cq, tag); + } + }; + template class WithRawCallbackMethod_CreateNewBackup : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} @@ -553,7 +660,7 @@ BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status SendLog(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::backup::SendLogRequest>* /*reader*/, ::google::protobuf::Empty* /*response*/) override { + ::grpc::Status SendLog(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::backup::SendLogRequest>* /*reader*/, ::backup::SendLogResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -605,6 +712,28 @@ virtual ::grpc::ServerWriteReactor< ::grpc::ByteBuffer>* PullBackup( ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/) { return nullptr; } }; + template + class WithRawCallbackMethod_AddAttachment : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_AddAttachment() { + ::grpc::Service::MarkMethodRawCallback(4, + new ::grpc::internal::CallbackClientStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, ::grpc::ByteBuffer* response) { return this->AddAttachment(context, response); })); + } + ~WithRawCallbackMethod_AddAttachment() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AddAttachment(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::backup::AddAttachmentRequest>* /*reader*/, ::google::protobuf::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerReadReactor< ::grpc::ByteBuffer>* AddAttachment( + ::grpc::CallbackServerContext* /*context*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; typedef Service StreamedUnaryService; template class WithSplitStreamingMethod_PullBackup : public BaseClass { diff --git a/native/cpp/CommonCpp/grpc/_generated/backup.grpc.pb.cc b/native/cpp/CommonCpp/grpc/_generated/backup.grpc.pb.cc --- a/native/cpp/CommonCpp/grpc/_generated/backup.grpc.pb.cc +++ b/native/cpp/CommonCpp/grpc/_generated/backup.grpc.pb.cc @@ -26,6 +26,7 @@ "/backup.BackupService/SendLog", "/backup.BackupService/RecoverBackupKey", "/backup.BackupService/PullBackup", + "/backup.BackupService/AddAttachment", }; std::unique_ptr< BackupService::Stub> BackupService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { @@ -39,6 +40,7 @@ , rpcmethod_SendLog_(BackupService_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::CLIENT_STREAMING, channel) , rpcmethod_RecoverBackupKey_(BackupService_method_names[2], options.suffix_for_stats(),::grpc::internal::RpcMethod::BIDI_STREAMING, channel) , rpcmethod_PullBackup_(BackupService_method_names[3], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel) + , rpcmethod_AddAttachment_(BackupService_method_names[4], options.suffix_for_stats(),::grpc::internal::RpcMethod::CLIENT_STREAMING, channel) {} ::grpc::ClientReaderWriter< ::backup::CreateNewBackupRequest, ::backup::CreateNewBackupResponse>* BackupService::Stub::CreateNewBackupRaw(::grpc::ClientContext* context) { @@ -57,19 +59,19 @@ return ::grpc::internal::ClientAsyncReaderWriterFactory< ::backup::CreateNewBackupRequest, ::backup::CreateNewBackupResponse>::Create(channel_.get(), cq, rpcmethod_CreateNewBackup_, context, false, nullptr); } -::grpc::ClientWriter< ::backup::SendLogRequest>* BackupService::Stub::SendLogRaw(::grpc::ClientContext* context, ::google::protobuf::Empty* response) { +::grpc::ClientWriter< ::backup::SendLogRequest>* BackupService::Stub::SendLogRaw(::grpc::ClientContext* context, ::backup::SendLogResponse* response) { return ::grpc::internal::ClientWriterFactory< ::backup::SendLogRequest>::Create(channel_.get(), rpcmethod_SendLog_, context, response); } -void BackupService::Stub::async::SendLog(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::ClientWriteReactor< ::backup::SendLogRequest>* reactor) { +void BackupService::Stub::async::SendLog(::grpc::ClientContext* context, ::backup::SendLogResponse* response, ::grpc::ClientWriteReactor< ::backup::SendLogRequest>* reactor) { ::grpc::internal::ClientCallbackWriterFactory< ::backup::SendLogRequest>::Create(stub_->channel_.get(), stub_->rpcmethod_SendLog_, context, response, reactor); } -::grpc::ClientAsyncWriter< ::backup::SendLogRequest>* BackupService::Stub::AsyncSendLogRaw(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::CompletionQueue* cq, void* tag) { +::grpc::ClientAsyncWriter< ::backup::SendLogRequest>* BackupService::Stub::AsyncSendLogRaw(::grpc::ClientContext* context, ::backup::SendLogResponse* response, ::grpc::CompletionQueue* cq, void* tag) { return ::grpc::internal::ClientAsyncWriterFactory< ::backup::SendLogRequest>::Create(channel_.get(), cq, rpcmethod_SendLog_, context, response, true, tag); } -::grpc::ClientAsyncWriter< ::backup::SendLogRequest>* BackupService::Stub::PrepareAsyncSendLogRaw(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::CompletionQueue* cq) { +::grpc::ClientAsyncWriter< ::backup::SendLogRequest>* BackupService::Stub::PrepareAsyncSendLogRaw(::grpc::ClientContext* context, ::backup::SendLogResponse* response, ::grpc::CompletionQueue* cq) { return ::grpc::internal::ClientAsyncWriterFactory< ::backup::SendLogRequest>::Create(channel_.get(), cq, rpcmethod_SendLog_, context, response, false, nullptr); } @@ -105,6 +107,22 @@ return ::grpc::internal::ClientAsyncReaderFactory< ::backup::PullBackupResponse>::Create(channel_.get(), cq, rpcmethod_PullBackup_, context, request, false, nullptr); } +::grpc::ClientWriter< ::backup::AddAttachmentRequest>* BackupService::Stub::AddAttachmentRaw(::grpc::ClientContext* context, ::google::protobuf::Empty* response) { + return ::grpc::internal::ClientWriterFactory< ::backup::AddAttachmentRequest>::Create(channel_.get(), rpcmethod_AddAttachment_, context, response); +} + +void BackupService::Stub::async::AddAttachment(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::ClientWriteReactor< ::backup::AddAttachmentRequest>* reactor) { + ::grpc::internal::ClientCallbackWriterFactory< ::backup::AddAttachmentRequest>::Create(stub_->channel_.get(), stub_->rpcmethod_AddAttachment_, context, response, reactor); +} + +::grpc::ClientAsyncWriter< ::backup::AddAttachmentRequest>* BackupService::Stub::AsyncAddAttachmentRaw(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::CompletionQueue* cq, void* tag) { + return ::grpc::internal::ClientAsyncWriterFactory< ::backup::AddAttachmentRequest>::Create(channel_.get(), cq, rpcmethod_AddAttachment_, context, response, true, tag); +} + +::grpc::ClientAsyncWriter< ::backup::AddAttachmentRequest>* BackupService::Stub::PrepareAsyncAddAttachmentRaw(::grpc::ClientContext* context, ::google::protobuf::Empty* response, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncWriterFactory< ::backup::AddAttachmentRequest>::Create(channel_.get(), cq, rpcmethod_AddAttachment_, context, response, false, nullptr); +} + BackupService::Service::Service() { AddMethod(new ::grpc::internal::RpcServiceMethod( BackupService_method_names[0], @@ -119,11 +137,11 @@ AddMethod(new ::grpc::internal::RpcServiceMethod( BackupService_method_names[1], ::grpc::internal::RpcMethod::CLIENT_STREAMING, - new ::grpc::internal::ClientStreamingHandler< BackupService::Service, ::backup::SendLogRequest, ::google::protobuf::Empty>( + new ::grpc::internal::ClientStreamingHandler< BackupService::Service, ::backup::SendLogRequest, ::backup::SendLogResponse>( [](BackupService::Service* service, ::grpc::ServerContext* ctx, ::grpc::ServerReader<::backup::SendLogRequest>* reader, - ::google::protobuf::Empty* resp) { + ::backup::SendLogResponse* resp) { return service->SendLog(ctx, reader, resp); }, this))); AddMethod(new ::grpc::internal::RpcServiceMethod( @@ -146,6 +164,16 @@ ::grpc::ServerWriter<::backup::PullBackupResponse>* writer) { return service->PullBackup(ctx, req, writer); }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + BackupService_method_names[4], + ::grpc::internal::RpcMethod::CLIENT_STREAMING, + new ::grpc::internal::ClientStreamingHandler< BackupService::Service, ::backup::AddAttachmentRequest, ::google::protobuf::Empty>( + [](BackupService::Service* service, + ::grpc::ServerContext* ctx, + ::grpc::ServerReader<::backup::AddAttachmentRequest>* reader, + ::google::protobuf::Empty* resp) { + return service->AddAttachment(ctx, reader, resp); + }, this))); } BackupService::Service::~Service() { @@ -157,7 +185,7 @@ return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } -::grpc::Status BackupService::Service::SendLog(::grpc::ServerContext* context, ::grpc::ServerReader< ::backup::SendLogRequest>* reader, ::google::protobuf::Empty* response) { +::grpc::Status BackupService::Service::SendLog(::grpc::ServerContext* context, ::grpc::ServerReader< ::backup::SendLogRequest>* reader, ::backup::SendLogResponse* response) { (void) context; (void) reader; (void) response; @@ -177,6 +205,13 @@ return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } +::grpc::Status BackupService::Service::AddAttachment(::grpc::ServerContext* context, ::grpc::ServerReader< ::backup::AddAttachmentRequest>* reader, ::google::protobuf::Empty* response) { + (void) context; + (void) reader; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + } // namespace backup diff --git a/native/cpp/CommonCpp/grpc/_generated/backup.pb.h b/native/cpp/CommonCpp/grpc/_generated/backup.pb.h --- a/native/cpp/CommonCpp/grpc/_generated/backup.pb.h +++ b/native/cpp/CommonCpp/grpc/_generated/backup.pb.h @@ -30,6 +30,7 @@ #include #include // IWYU pragma: export #include // IWYU pragma: export +#include #include #include // @@protoc_insertion_point(includes) @@ -47,7 +48,7 @@ PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[7] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[9] PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; @@ -56,6 +57,9 @@ extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_backup_2eproto; ::PROTOBUF_NAMESPACE_ID::Metadata descriptor_table_backup_2eproto_metadata_getter(int index); namespace backup { +class AddAttachmentRequest; +struct AddAttachmentRequestDefaultTypeInternal; +extern AddAttachmentRequestDefaultTypeInternal _AddAttachmentRequest_default_instance_; class CreateNewBackupRequest; struct CreateNewBackupRequestDefaultTypeInternal; extern CreateNewBackupRequestDefaultTypeInternal _CreateNewBackupRequest_default_instance_; @@ -77,8 +81,12 @@ class SendLogRequest; struct SendLogRequestDefaultTypeInternal; extern SendLogRequestDefaultTypeInternal _SendLogRequest_default_instance_; +class SendLogResponse; +struct SendLogResponseDefaultTypeInternal; +extern SendLogResponseDefaultTypeInternal _SendLogResponse_default_instance_; } // namespace backup PROTOBUF_NAMESPACE_OPEN +template<> ::backup::AddAttachmentRequest* Arena::CreateMaybeMessage<::backup::AddAttachmentRequest>(Arena*); template<> ::backup::CreateNewBackupRequest* Arena::CreateMaybeMessage<::backup::CreateNewBackupRequest>(Arena*); template<> ::backup::CreateNewBackupResponse* Arena::CreateMaybeMessage<::backup::CreateNewBackupResponse>(Arena*); template<> ::backup::PullBackupRequest* Arena::CreateMaybeMessage<::backup::PullBackupRequest>(Arena*); @@ -86,9 +94,35 @@ template<> ::backup::RecoverBackupKeyRequest* Arena::CreateMaybeMessage<::backup::RecoverBackupKeyRequest>(Arena*); template<> ::backup::RecoverBackupKeyResponse* Arena::CreateMaybeMessage<::backup::RecoverBackupKeyResponse>(Arena*); template<> ::backup::SendLogRequest* Arena::CreateMaybeMessage<::backup::SendLogRequest>(Arena*); +template<> ::backup::SendLogResponse* Arena::CreateMaybeMessage<::backup::SendLogResponse>(Arena*); PROTOBUF_NAMESPACE_CLOSE namespace backup { +enum AddAttachmentRequest_AttachmentParentType : int { + AddAttachmentRequest_AttachmentParentType_BACKUP = 0, + AddAttachmentRequest_AttachmentParentType_LOG = 1, + AddAttachmentRequest_AttachmentParentType_AddAttachmentRequest_AttachmentParentType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + AddAttachmentRequest_AttachmentParentType_AddAttachmentRequest_AttachmentParentType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() +}; +bool AddAttachmentRequest_AttachmentParentType_IsValid(int value); +constexpr AddAttachmentRequest_AttachmentParentType AddAttachmentRequest_AttachmentParentType_AttachmentParentType_MIN = AddAttachmentRequest_AttachmentParentType_BACKUP; +constexpr AddAttachmentRequest_AttachmentParentType AddAttachmentRequest_AttachmentParentType_AttachmentParentType_MAX = AddAttachmentRequest_AttachmentParentType_LOG; +constexpr int AddAttachmentRequest_AttachmentParentType_AttachmentParentType_ARRAYSIZE = AddAttachmentRequest_AttachmentParentType_AttachmentParentType_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* AddAttachmentRequest_AttachmentParentType_descriptor(); +template +inline const std::string& AddAttachmentRequest_AttachmentParentType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function AddAttachmentRequest_AttachmentParentType_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + AddAttachmentRequest_AttachmentParentType_descriptor(), enum_t_value); +} +inline bool AddAttachmentRequest_AttachmentParentType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, AddAttachmentRequest_AttachmentParentType* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + AddAttachmentRequest_AttachmentParentType_descriptor(), name, value); +} // =================================================================== class CreateNewBackupRequest PROTOBUF_FINAL : @@ -709,6 +743,150 @@ }; // ------------------------------------------------------------------- +class SendLogResponse PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:backup.SendLogResponse) */ { + public: + inline SendLogResponse() : SendLogResponse(nullptr) {} + virtual ~SendLogResponse(); + explicit constexpr SendLogResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SendLogResponse(const SendLogResponse& from); + SendLogResponse(SendLogResponse&& from) noexcept + : SendLogResponse() { + *this = ::std::move(from); + } + + inline SendLogResponse& operator=(const SendLogResponse& from) { + CopyFrom(from); + return *this; + } + inline SendLogResponse& operator=(SendLogResponse&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const SendLogResponse& default_instance() { + return *internal_default_instance(); + } + static inline const SendLogResponse* internal_default_instance() { + return reinterpret_cast( + &_SendLogResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(SendLogResponse& a, SendLogResponse& b) { + a.Swap(&b); + } + inline void Swap(SendLogResponse* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SendLogResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline SendLogResponse* New() const final { + return CreateMaybeMessage(nullptr); + } + + SendLogResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const SendLogResponse& from); + void MergeFrom(const SendLogResponse& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SendLogResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "backup.SendLogResponse"; + } + protected: + explicit SendLogResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + return ::descriptor_table_backup_2eproto_metadata_getter(kIndexInFileMessages); + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kLogIDFieldNumber = 1, + }; + // string logID = 1; + void clear_logid(); + const std::string& logid() const; + void set_logid(const std::string& value); + void set_logid(std::string&& value); + void set_logid(const char* value); + void set_logid(const char* value, size_t size); + std::string* mutable_logid(); + std::string* release_logid(); + void set_allocated_logid(std::string* logid); + private: + const std::string& _internal_logid() const; + void _internal_set_logid(const std::string& value); + std::string* _internal_mutable_logid(); + public: + + // @@protoc_insertion_point(class_scope:backup.SendLogResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr logid_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_backup_2eproto; +}; +// ------------------------------------------------------------------- + class RecoverBackupKeyRequest PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:backup.RecoverBackupKeyRequest) */ { public: @@ -752,7 +930,7 @@ &_RecoverBackupKeyRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 3; + 4; friend void swap(RecoverBackupKeyRequest& a, RecoverBackupKeyRequest& b) { a.Swap(&b); @@ -896,7 +1074,7 @@ &_RecoverBackupKeyResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 4; + 5; friend void swap(RecoverBackupKeyResponse& a, RecoverBackupKeyResponse& b) { a.Swap(&b); @@ -1040,7 +1218,7 @@ &_PullBackupRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 5; + 6; friend void swap(PullBackupRequest& a, PullBackupRequest& b) { a.Swap(&b); @@ -1208,7 +1386,7 @@ &_PullBackupResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 6; + 7; friend void swap(PullBackupResponse& a, PullBackupResponse& b) { a.Swap(&b); @@ -1346,128 +1524,412 @@ friend struct ::TableStruct_backup_2eproto; }; -// =================================================================== - - -// =================================================================== +// ------------------------------------------------------------------- -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// CreateNewBackupRequest +class AddAttachmentRequest PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:backup.AddAttachmentRequest) */ { + public: + inline AddAttachmentRequest() : AddAttachmentRequest(nullptr) {} + virtual ~AddAttachmentRequest(); + explicit constexpr AddAttachmentRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); -// string userID = 1; -inline bool CreateNewBackupRequest::_internal_has_userid() const { - return data_case() == kUserID; -} -inline bool CreateNewBackupRequest::has_userid() const { - return _internal_has_userid(); -} -inline void CreateNewBackupRequest::set_has_userid() { - _oneof_case_[0] = kUserID; -} -inline void CreateNewBackupRequest::clear_userid() { - if (_internal_has_userid()) { - data_.userid_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); - clear_has_data(); + AddAttachmentRequest(const AddAttachmentRequest& from); + AddAttachmentRequest(AddAttachmentRequest&& from) noexcept + : AddAttachmentRequest() { + *this = ::std::move(from); } -} -inline const std::string& CreateNewBackupRequest::userid() const { - // @@protoc_insertion_point(field_get:backup.CreateNewBackupRequest.userID) - return _internal_userid(); -} -inline void CreateNewBackupRequest::set_userid(const std::string& value) { - _internal_set_userid(value); - // @@protoc_insertion_point(field_set:backup.CreateNewBackupRequest.userID) -} -inline std::string* CreateNewBackupRequest::mutable_userid() { - // @@protoc_insertion_point(field_mutable:backup.CreateNewBackupRequest.userID) - return _internal_mutable_userid(); -} -inline const std::string& CreateNewBackupRequest::_internal_userid() const { - if (_internal_has_userid()) { - return data_.userid_.Get(); + + inline AddAttachmentRequest& operator=(const AddAttachmentRequest& from) { + CopyFrom(from); + return *this; } - return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); -} -inline void CreateNewBackupRequest::_internal_set_userid(const std::string& value) { - if (!_internal_has_userid()) { - clear_data(); - set_has_userid(); - data_.userid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + inline AddAttachmentRequest& operator=(AddAttachmentRequest&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; } - data_.userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void CreateNewBackupRequest::set_userid(std::string&& value) { - // @@protoc_insertion_point(field_set:backup.CreateNewBackupRequest.userID) - if (!_internal_has_userid()) { - clear_data(); - set_has_userid(); - data_.userid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); } - data_.userid_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:backup.CreateNewBackupRequest.userID) -} -inline void CreateNewBackupRequest::set_userid(const char* value) { - GOOGLE_DCHECK(value != nullptr); - if (!_internal_has_userid()) { - clear_data(); - set_has_userid(); - data_.userid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; } - data_.userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, - ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:backup.CreateNewBackupRequest.userID) -} -inline void CreateNewBackupRequest::set_userid(const char* value, - size_t size) { - if (!_internal_has_userid()) { - clear_data(); - set_has_userid(); - data_.userid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; } - data_.userid_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), - GetArena()); - // @@protoc_insertion_point(field_set_pointer:backup.CreateNewBackupRequest.userID) -} -inline std::string* CreateNewBackupRequest::_internal_mutable_userid() { - if (!_internal_has_userid()) { - clear_data(); - set_has_userid(); - data_.userid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + static const AddAttachmentRequest& default_instance() { + return *internal_default_instance(); } - return data_.userid_.Mutable( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* CreateNewBackupRequest::release_userid() { - // @@protoc_insertion_point(field_release:backup.CreateNewBackupRequest.userID) - if (_internal_has_userid()) { - clear_has_data(); - return data_.userid_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - } else { - return nullptr; + enum DataCase { + kParentType = 1, + kBackupID = 2, + kLogID = 3, + kDataHash = 4, + kDataChunk = 5, + DATA_NOT_SET = 0, + }; + + static inline const AddAttachmentRequest* internal_default_instance() { + return reinterpret_cast( + &_AddAttachmentRequest_default_instance_); } -} -inline void CreateNewBackupRequest::set_allocated_userid(std::string* userid) { - if (has_data()) { - clear_data(); + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(AddAttachmentRequest& a, AddAttachmentRequest& b) { + a.Swap(&b); } - if (userid != nullptr) { - set_has_userid(); - data_.userid_.UnsafeSetDefault(userid); - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); - if (arena != nullptr) { - arena->Own(userid); + inline void Swap(AddAttachmentRequest* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - // @@protoc_insertion_point(field_set_allocated:backup.CreateNewBackupRequest.userID) -} + void UnsafeArenaSwap(AddAttachmentRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } -// bytes keyEntropy = 2; + // implements Message ---------------------------------------------- + + inline AddAttachmentRequest* New() const final { + return CreateMaybeMessage(nullptr); + } + + AddAttachmentRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const AddAttachmentRequest& from); + void MergeFrom(const AddAttachmentRequest& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AddAttachmentRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "backup.AddAttachmentRequest"; + } + protected: + explicit AddAttachmentRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + return ::descriptor_table_backup_2eproto_metadata_getter(kIndexInFileMessages); + } + + public: + + // nested types ---------------------------------------------------- + + typedef AddAttachmentRequest_AttachmentParentType AttachmentParentType; + static constexpr AttachmentParentType BACKUP = + AddAttachmentRequest_AttachmentParentType_BACKUP; + static constexpr AttachmentParentType LOG = + AddAttachmentRequest_AttachmentParentType_LOG; + static inline bool AttachmentParentType_IsValid(int value) { + return AddAttachmentRequest_AttachmentParentType_IsValid(value); + } + static constexpr AttachmentParentType AttachmentParentType_MIN = + AddAttachmentRequest_AttachmentParentType_AttachmentParentType_MIN; + static constexpr AttachmentParentType AttachmentParentType_MAX = + AddAttachmentRequest_AttachmentParentType_AttachmentParentType_MAX; + static constexpr int AttachmentParentType_ARRAYSIZE = + AddAttachmentRequest_AttachmentParentType_AttachmentParentType_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + AttachmentParentType_descriptor() { + return AddAttachmentRequest_AttachmentParentType_descriptor(); + } + template + static inline const std::string& AttachmentParentType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function AttachmentParentType_Name."); + return AddAttachmentRequest_AttachmentParentType_Name(enum_t_value); + } + static inline bool AttachmentParentType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + AttachmentParentType* value) { + return AddAttachmentRequest_AttachmentParentType_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kParentTypeFieldNumber = 1, + kBackupIDFieldNumber = 2, + kLogIDFieldNumber = 3, + kDataHashFieldNumber = 4, + kDataChunkFieldNumber = 5, + }; + // .backup.AddAttachmentRequest.AttachmentParentType parentType = 1; + bool has_parenttype() const; + private: + bool _internal_has_parenttype() const; + public: + void clear_parenttype(); + ::backup::AddAttachmentRequest_AttachmentParentType parenttype() const; + void set_parenttype(::backup::AddAttachmentRequest_AttachmentParentType value); + private: + ::backup::AddAttachmentRequest_AttachmentParentType _internal_parenttype() const; + void _internal_set_parenttype(::backup::AddAttachmentRequest_AttachmentParentType value); + public: + + // string backupID = 2; + bool has_backupid() const; + private: + bool _internal_has_backupid() const; + public: + void clear_backupid(); + const std::string& backupid() const; + void set_backupid(const std::string& value); + void set_backupid(std::string&& value); + void set_backupid(const char* value); + void set_backupid(const char* value, size_t size); + std::string* mutable_backupid(); + std::string* release_backupid(); + void set_allocated_backupid(std::string* backupid); + private: + const std::string& _internal_backupid() const; + void _internal_set_backupid(const std::string& value); + std::string* _internal_mutable_backupid(); + public: + + // string logID = 3; + bool has_logid() const; + private: + bool _internal_has_logid() const; + public: + void clear_logid(); + const std::string& logid() const; + void set_logid(const std::string& value); + void set_logid(std::string&& value); + void set_logid(const char* value); + void set_logid(const char* value, size_t size); + std::string* mutable_logid(); + std::string* release_logid(); + void set_allocated_logid(std::string* logid); + private: + const std::string& _internal_logid() const; + void _internal_set_logid(const std::string& value); + std::string* _internal_mutable_logid(); + public: + + // bytes dataHash = 4; + bool has_datahash() const; + private: + bool _internal_has_datahash() const; + public: + void clear_datahash(); + const std::string& datahash() const; + void set_datahash(const std::string& value); + void set_datahash(std::string&& value); + void set_datahash(const char* value); + void set_datahash(const void* value, size_t size); + std::string* mutable_datahash(); + std::string* release_datahash(); + void set_allocated_datahash(std::string* datahash); + private: + const std::string& _internal_datahash() const; + void _internal_set_datahash(const std::string& value); + std::string* _internal_mutable_datahash(); + public: + + // bytes dataChunk = 5; + bool has_datachunk() const; + private: + bool _internal_has_datachunk() const; + public: + void clear_datachunk(); + const std::string& datachunk() const; + void set_datachunk(const std::string& value); + void set_datachunk(std::string&& value); + void set_datachunk(const char* value); + void set_datachunk(const void* value, size_t size); + std::string* mutable_datachunk(); + std::string* release_datachunk(); + void set_allocated_datachunk(std::string* datachunk); + private: + const std::string& _internal_datachunk() const; + void _internal_set_datachunk(const std::string& value); + std::string* _internal_mutable_datachunk(); + public: + + void clear_data(); + DataCase data_case() const; + // @@protoc_insertion_point(class_scope:backup.AddAttachmentRequest) + private: + class _Internal; + void set_has_parenttype(); + void set_has_backupid(); + void set_has_logid(); + void set_has_datahash(); + void set_has_datachunk(); + + inline bool has_data() const; + inline void clear_has_data(); + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + union DataUnion { + constexpr DataUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int parenttype_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr backupid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr logid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr datahash_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr datachunk_; + } data_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::uint32 _oneof_case_[1]; + + friend struct ::TableStruct_backup_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// CreateNewBackupRequest + +// string userID = 1; +inline bool CreateNewBackupRequest::_internal_has_userid() const { + return data_case() == kUserID; +} +inline bool CreateNewBackupRequest::has_userid() const { + return _internal_has_userid(); +} +inline void CreateNewBackupRequest::set_has_userid() { + _oneof_case_[0] = kUserID; +} +inline void CreateNewBackupRequest::clear_userid() { + if (_internal_has_userid()) { + data_.userid_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); + clear_has_data(); + } +} +inline const std::string& CreateNewBackupRequest::userid() const { + // @@protoc_insertion_point(field_get:backup.CreateNewBackupRequest.userID) + return _internal_userid(); +} +inline void CreateNewBackupRequest::set_userid(const std::string& value) { + _internal_set_userid(value); + // @@protoc_insertion_point(field_set:backup.CreateNewBackupRequest.userID) +} +inline std::string* CreateNewBackupRequest::mutable_userid() { + // @@protoc_insertion_point(field_mutable:backup.CreateNewBackupRequest.userID) + return _internal_mutable_userid(); +} +inline const std::string& CreateNewBackupRequest::_internal_userid() const { + if (_internal_has_userid()) { + return data_.userid_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); +} +inline void CreateNewBackupRequest::_internal_set_userid(const std::string& value) { + if (!_internal_has_userid()) { + clear_data(); + set_has_userid(); + data_.userid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + data_.userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); +} +inline void CreateNewBackupRequest::set_userid(std::string&& value) { + // @@protoc_insertion_point(field_set:backup.CreateNewBackupRequest.userID) + if (!_internal_has_userid()) { + clear_data(); + set_has_userid(); + data_.userid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + data_.userid_.Set( + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:backup.CreateNewBackupRequest.userID) +} +inline void CreateNewBackupRequest::set_userid(const char* value) { + GOOGLE_DCHECK(value != nullptr); + if (!_internal_has_userid()) { + clear_data(); + set_has_userid(); + data_.userid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + data_.userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, + ::std::string(value), GetArena()); + // @@protoc_insertion_point(field_set_char:backup.CreateNewBackupRequest.userID) +} +inline void CreateNewBackupRequest::set_userid(const char* value, + size_t size) { + if (!_internal_has_userid()) { + clear_data(); + set_has_userid(); + data_.userid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + data_.userid_.Set( + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( + reinterpret_cast(value), size), + GetArena()); + // @@protoc_insertion_point(field_set_pointer:backup.CreateNewBackupRequest.userID) +} +inline std::string* CreateNewBackupRequest::_internal_mutable_userid() { + if (!_internal_has_userid()) { + clear_data(); + set_has_userid(); + data_.userid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + return data_.userid_.Mutable( + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); +} +inline std::string* CreateNewBackupRequest::release_userid() { + // @@protoc_insertion_point(field_release:backup.CreateNewBackupRequest.userID) + if (_internal_has_userid()) { + clear_has_data(); + return data_.userid_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + } else { + return nullptr; + } +} +inline void CreateNewBackupRequest::set_allocated_userid(std::string* userid) { + if (has_data()) { + clear_data(); + } + if (userid != nullptr) { + set_has_userid(); + data_.userid_.UnsafeSetDefault(userid); + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); + if (arena != nullptr) { + arena->Own(userid); + } + } + // @@protoc_insertion_point(field_set_allocated:backup.CreateNewBackupRequest.userID) +} + +// bytes keyEntropy = 2; inline bool CreateNewBackupRequest::_internal_has_keyentropy() const { return data_case() == kKeyEntropy; } @@ -2326,49 +2788,114 @@ } // ------------------------------------------------------------------- -// RecoverBackupKeyRequest +// SendLogResponse -// string userID = 1; -inline void RecoverBackupKeyRequest::clear_userid() { - userid_.ClearToEmpty(); +// string logID = 1; +inline void SendLogResponse::clear_logid() { + logid_.ClearToEmpty(); } -inline const std::string& RecoverBackupKeyRequest::userid() const { - // @@protoc_insertion_point(field_get:backup.RecoverBackupKeyRequest.userID) - return _internal_userid(); +inline const std::string& SendLogResponse::logid() const { + // @@protoc_insertion_point(field_get:backup.SendLogResponse.logID) + return _internal_logid(); } -inline void RecoverBackupKeyRequest::set_userid(const std::string& value) { - _internal_set_userid(value); - // @@protoc_insertion_point(field_set:backup.RecoverBackupKeyRequest.userID) +inline void SendLogResponse::set_logid(const std::string& value) { + _internal_set_logid(value); + // @@protoc_insertion_point(field_set:backup.SendLogResponse.logID) } -inline std::string* RecoverBackupKeyRequest::mutable_userid() { - // @@protoc_insertion_point(field_mutable:backup.RecoverBackupKeyRequest.userID) - return _internal_mutable_userid(); +inline std::string* SendLogResponse::mutable_logid() { + // @@protoc_insertion_point(field_mutable:backup.SendLogResponse.logID) + return _internal_mutable_logid(); } -inline const std::string& RecoverBackupKeyRequest::_internal_userid() const { - return userid_.Get(); +inline const std::string& SendLogResponse::_internal_logid() const { + return logid_.Get(); } -inline void RecoverBackupKeyRequest::_internal_set_userid(const std::string& value) { +inline void SendLogResponse::_internal_set_logid(const std::string& value) { - userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); + logid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); } -inline void RecoverBackupKeyRequest::set_userid(std::string&& value) { +inline void SendLogResponse::set_logid(std::string&& value) { - userid_.Set( + logid_.Set( ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:backup.RecoverBackupKeyRequest.userID) + // @@protoc_insertion_point(field_set_rvalue:backup.SendLogResponse.logID) } -inline void RecoverBackupKeyRequest::set_userid(const char* value) { +inline void SendLogResponse::set_logid(const char* value) { GOOGLE_DCHECK(value != nullptr); - userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:backup.RecoverBackupKeyRequest.userID) + logid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); + // @@protoc_insertion_point(field_set_char:backup.SendLogResponse.logID) } -inline void RecoverBackupKeyRequest::set_userid(const char* value, +inline void SendLogResponse::set_logid(const char* value, size_t size) { - userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( + logid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:backup.RecoverBackupKeyRequest.userID) + // @@protoc_insertion_point(field_set_pointer:backup.SendLogResponse.logID) +} +inline std::string* SendLogResponse::_internal_mutable_logid() { + + return logid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); +} +inline std::string* SendLogResponse::release_logid() { + // @@protoc_insertion_point(field_release:backup.SendLogResponse.logID) + return logid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void SendLogResponse::set_allocated_logid(std::string* logid) { + if (logid != nullptr) { + + } else { + + } + logid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), logid, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:backup.SendLogResponse.logID) +} + +// ------------------------------------------------------------------- + +// RecoverBackupKeyRequest + +// string userID = 1; +inline void RecoverBackupKeyRequest::clear_userid() { + userid_.ClearToEmpty(); +} +inline const std::string& RecoverBackupKeyRequest::userid() const { + // @@protoc_insertion_point(field_get:backup.RecoverBackupKeyRequest.userID) + return _internal_userid(); +} +inline void RecoverBackupKeyRequest::set_userid(const std::string& value) { + _internal_set_userid(value); + // @@protoc_insertion_point(field_set:backup.RecoverBackupKeyRequest.userID) +} +inline std::string* RecoverBackupKeyRequest::mutable_userid() { + // @@protoc_insertion_point(field_mutable:backup.RecoverBackupKeyRequest.userID) + return _internal_mutable_userid(); +} +inline const std::string& RecoverBackupKeyRequest::_internal_userid() const { + return userid_.Get(); +} +inline void RecoverBackupKeyRequest::_internal_set_userid(const std::string& value) { + + userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); +} +inline void RecoverBackupKeyRequest::set_userid(std::string&& value) { + + userid_.Set( + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:backup.RecoverBackupKeyRequest.userID) +} +inline void RecoverBackupKeyRequest::set_userid(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); + // @@protoc_insertion_point(field_set_char:backup.RecoverBackupKeyRequest.userID) +} +inline void RecoverBackupKeyRequest::set_userid(const char* value, + size_t size) { + + userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:backup.RecoverBackupKeyRequest.userID) } inline std::string* RecoverBackupKeyRequest::_internal_mutable_userid() { @@ -2813,6 +3340,497 @@ inline PullBackupResponse::DataCase PullBackupResponse::data_case() const { return PullBackupResponse::DataCase(_oneof_case_[0]); } +// ------------------------------------------------------------------- + +// AddAttachmentRequest + +// .backup.AddAttachmentRequest.AttachmentParentType parentType = 1; +inline bool AddAttachmentRequest::_internal_has_parenttype() const { + return data_case() == kParentType; +} +inline bool AddAttachmentRequest::has_parenttype() const { + return _internal_has_parenttype(); +} +inline void AddAttachmentRequest::set_has_parenttype() { + _oneof_case_[0] = kParentType; +} +inline void AddAttachmentRequest::clear_parenttype() { + if (_internal_has_parenttype()) { + data_.parenttype_ = 0; + clear_has_data(); + } +} +inline ::backup::AddAttachmentRequest_AttachmentParentType AddAttachmentRequest::_internal_parenttype() const { + if (_internal_has_parenttype()) { + return static_cast< ::backup::AddAttachmentRequest_AttachmentParentType >(data_.parenttype_); + } + return static_cast< ::backup::AddAttachmentRequest_AttachmentParentType >(0); +} +inline ::backup::AddAttachmentRequest_AttachmentParentType AddAttachmentRequest::parenttype() const { + // @@protoc_insertion_point(field_get:backup.AddAttachmentRequest.parentType) + return _internal_parenttype(); +} +inline void AddAttachmentRequest::_internal_set_parenttype(::backup::AddAttachmentRequest_AttachmentParentType value) { + if (!_internal_has_parenttype()) { + clear_data(); + set_has_parenttype(); + } + data_.parenttype_ = value; +} +inline void AddAttachmentRequest::set_parenttype(::backup::AddAttachmentRequest_AttachmentParentType value) { + // @@protoc_insertion_point(field_set:backup.AddAttachmentRequest.parentType) + _internal_set_parenttype(value); +} + +// string backupID = 2; +inline bool AddAttachmentRequest::_internal_has_backupid() const { + return data_case() == kBackupID; +} +inline bool AddAttachmentRequest::has_backupid() const { + return _internal_has_backupid(); +} +inline void AddAttachmentRequest::set_has_backupid() { + _oneof_case_[0] = kBackupID; +} +inline void AddAttachmentRequest::clear_backupid() { + if (_internal_has_backupid()) { + data_.backupid_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); + clear_has_data(); + } +} +inline const std::string& AddAttachmentRequest::backupid() const { + // @@protoc_insertion_point(field_get:backup.AddAttachmentRequest.backupID) + return _internal_backupid(); +} +inline void AddAttachmentRequest::set_backupid(const std::string& value) { + _internal_set_backupid(value); + // @@protoc_insertion_point(field_set:backup.AddAttachmentRequest.backupID) +} +inline std::string* AddAttachmentRequest::mutable_backupid() { + // @@protoc_insertion_point(field_mutable:backup.AddAttachmentRequest.backupID) + return _internal_mutable_backupid(); +} +inline const std::string& AddAttachmentRequest::_internal_backupid() const { + if (_internal_has_backupid()) { + return data_.backupid_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); +} +inline void AddAttachmentRequest::_internal_set_backupid(const std::string& value) { + if (!_internal_has_backupid()) { + clear_data(); + set_has_backupid(); + data_.backupid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + data_.backupid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); +} +inline void AddAttachmentRequest::set_backupid(std::string&& value) { + // @@protoc_insertion_point(field_set:backup.AddAttachmentRequest.backupID) + if (!_internal_has_backupid()) { + clear_data(); + set_has_backupid(); + data_.backupid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + data_.backupid_.Set( + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:backup.AddAttachmentRequest.backupID) +} +inline void AddAttachmentRequest::set_backupid(const char* value) { + GOOGLE_DCHECK(value != nullptr); + if (!_internal_has_backupid()) { + clear_data(); + set_has_backupid(); + data_.backupid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + data_.backupid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, + ::std::string(value), GetArena()); + // @@protoc_insertion_point(field_set_char:backup.AddAttachmentRequest.backupID) +} +inline void AddAttachmentRequest::set_backupid(const char* value, + size_t size) { + if (!_internal_has_backupid()) { + clear_data(); + set_has_backupid(); + data_.backupid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + data_.backupid_.Set( + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( + reinterpret_cast(value), size), + GetArena()); + // @@protoc_insertion_point(field_set_pointer:backup.AddAttachmentRequest.backupID) +} +inline std::string* AddAttachmentRequest::_internal_mutable_backupid() { + if (!_internal_has_backupid()) { + clear_data(); + set_has_backupid(); + data_.backupid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + return data_.backupid_.Mutable( + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); +} +inline std::string* AddAttachmentRequest::release_backupid() { + // @@protoc_insertion_point(field_release:backup.AddAttachmentRequest.backupID) + if (_internal_has_backupid()) { + clear_has_data(); + return data_.backupid_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + } else { + return nullptr; + } +} +inline void AddAttachmentRequest::set_allocated_backupid(std::string* backupid) { + if (has_data()) { + clear_data(); + } + if (backupid != nullptr) { + set_has_backupid(); + data_.backupid_.UnsafeSetDefault(backupid); + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); + if (arena != nullptr) { + arena->Own(backupid); + } + } + // @@protoc_insertion_point(field_set_allocated:backup.AddAttachmentRequest.backupID) +} + +// string logID = 3; +inline bool AddAttachmentRequest::_internal_has_logid() const { + return data_case() == kLogID; +} +inline bool AddAttachmentRequest::has_logid() const { + return _internal_has_logid(); +} +inline void AddAttachmentRequest::set_has_logid() { + _oneof_case_[0] = kLogID; +} +inline void AddAttachmentRequest::clear_logid() { + if (_internal_has_logid()) { + data_.logid_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); + clear_has_data(); + } +} +inline const std::string& AddAttachmentRequest::logid() const { + // @@protoc_insertion_point(field_get:backup.AddAttachmentRequest.logID) + return _internal_logid(); +} +inline void AddAttachmentRequest::set_logid(const std::string& value) { + _internal_set_logid(value); + // @@protoc_insertion_point(field_set:backup.AddAttachmentRequest.logID) +} +inline std::string* AddAttachmentRequest::mutable_logid() { + // @@protoc_insertion_point(field_mutable:backup.AddAttachmentRequest.logID) + return _internal_mutable_logid(); +} +inline const std::string& AddAttachmentRequest::_internal_logid() const { + if (_internal_has_logid()) { + return data_.logid_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); +} +inline void AddAttachmentRequest::_internal_set_logid(const std::string& value) { + if (!_internal_has_logid()) { + clear_data(); + set_has_logid(); + data_.logid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + data_.logid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); +} +inline void AddAttachmentRequest::set_logid(std::string&& value) { + // @@protoc_insertion_point(field_set:backup.AddAttachmentRequest.logID) + if (!_internal_has_logid()) { + clear_data(); + set_has_logid(); + data_.logid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + data_.logid_.Set( + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:backup.AddAttachmentRequest.logID) +} +inline void AddAttachmentRequest::set_logid(const char* value) { + GOOGLE_DCHECK(value != nullptr); + if (!_internal_has_logid()) { + clear_data(); + set_has_logid(); + data_.logid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + data_.logid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, + ::std::string(value), GetArena()); + // @@protoc_insertion_point(field_set_char:backup.AddAttachmentRequest.logID) +} +inline void AddAttachmentRequest::set_logid(const char* value, + size_t size) { + if (!_internal_has_logid()) { + clear_data(); + set_has_logid(); + data_.logid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + data_.logid_.Set( + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( + reinterpret_cast(value), size), + GetArena()); + // @@protoc_insertion_point(field_set_pointer:backup.AddAttachmentRequest.logID) +} +inline std::string* AddAttachmentRequest::_internal_mutable_logid() { + if (!_internal_has_logid()) { + clear_data(); + set_has_logid(); + data_.logid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + return data_.logid_.Mutable( + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); +} +inline std::string* AddAttachmentRequest::release_logid() { + // @@protoc_insertion_point(field_release:backup.AddAttachmentRequest.logID) + if (_internal_has_logid()) { + clear_has_data(); + return data_.logid_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + } else { + return nullptr; + } +} +inline void AddAttachmentRequest::set_allocated_logid(std::string* logid) { + if (has_data()) { + clear_data(); + } + if (logid != nullptr) { + set_has_logid(); + data_.logid_.UnsafeSetDefault(logid); + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); + if (arena != nullptr) { + arena->Own(logid); + } + } + // @@protoc_insertion_point(field_set_allocated:backup.AddAttachmentRequest.logID) +} + +// bytes dataHash = 4; +inline bool AddAttachmentRequest::_internal_has_datahash() const { + return data_case() == kDataHash; +} +inline bool AddAttachmentRequest::has_datahash() const { + return _internal_has_datahash(); +} +inline void AddAttachmentRequest::set_has_datahash() { + _oneof_case_[0] = kDataHash; +} +inline void AddAttachmentRequest::clear_datahash() { + if (_internal_has_datahash()) { + data_.datahash_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); + clear_has_data(); + } +} +inline const std::string& AddAttachmentRequest::datahash() const { + // @@protoc_insertion_point(field_get:backup.AddAttachmentRequest.dataHash) + return _internal_datahash(); +} +inline void AddAttachmentRequest::set_datahash(const std::string& value) { + _internal_set_datahash(value); + // @@protoc_insertion_point(field_set:backup.AddAttachmentRequest.dataHash) +} +inline std::string* AddAttachmentRequest::mutable_datahash() { + // @@protoc_insertion_point(field_mutable:backup.AddAttachmentRequest.dataHash) + return _internal_mutable_datahash(); +} +inline const std::string& AddAttachmentRequest::_internal_datahash() const { + if (_internal_has_datahash()) { + return data_.datahash_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); +} +inline void AddAttachmentRequest::_internal_set_datahash(const std::string& value) { + if (!_internal_has_datahash()) { + clear_data(); + set_has_datahash(); + data_.datahash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + data_.datahash_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); +} +inline void AddAttachmentRequest::set_datahash(std::string&& value) { + // @@protoc_insertion_point(field_set:backup.AddAttachmentRequest.dataHash) + if (!_internal_has_datahash()) { + clear_data(); + set_has_datahash(); + data_.datahash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + data_.datahash_.Set( + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:backup.AddAttachmentRequest.dataHash) +} +inline void AddAttachmentRequest::set_datahash(const char* value) { + GOOGLE_DCHECK(value != nullptr); + if (!_internal_has_datahash()) { + clear_data(); + set_has_datahash(); + data_.datahash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + data_.datahash_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, + ::std::string(value), GetArena()); + // @@protoc_insertion_point(field_set_char:backup.AddAttachmentRequest.dataHash) +} +inline void AddAttachmentRequest::set_datahash(const void* value, + size_t size) { + if (!_internal_has_datahash()) { + clear_data(); + set_has_datahash(); + data_.datahash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + data_.datahash_.Set( + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( + reinterpret_cast(value), size), + GetArena()); + // @@protoc_insertion_point(field_set_pointer:backup.AddAttachmentRequest.dataHash) +} +inline std::string* AddAttachmentRequest::_internal_mutable_datahash() { + if (!_internal_has_datahash()) { + clear_data(); + set_has_datahash(); + data_.datahash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + return data_.datahash_.Mutable( + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); +} +inline std::string* AddAttachmentRequest::release_datahash() { + // @@protoc_insertion_point(field_release:backup.AddAttachmentRequest.dataHash) + if (_internal_has_datahash()) { + clear_has_data(); + return data_.datahash_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + } else { + return nullptr; + } +} +inline void AddAttachmentRequest::set_allocated_datahash(std::string* datahash) { + if (has_data()) { + clear_data(); + } + if (datahash != nullptr) { + set_has_datahash(); + data_.datahash_.UnsafeSetDefault(datahash); + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); + if (arena != nullptr) { + arena->Own(datahash); + } + } + // @@protoc_insertion_point(field_set_allocated:backup.AddAttachmentRequest.dataHash) +} + +// bytes dataChunk = 5; +inline bool AddAttachmentRequest::_internal_has_datachunk() const { + return data_case() == kDataChunk; +} +inline bool AddAttachmentRequest::has_datachunk() const { + return _internal_has_datachunk(); +} +inline void AddAttachmentRequest::set_has_datachunk() { + _oneof_case_[0] = kDataChunk; +} +inline void AddAttachmentRequest::clear_datachunk() { + if (_internal_has_datachunk()) { + data_.datachunk_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); + clear_has_data(); + } +} +inline const std::string& AddAttachmentRequest::datachunk() const { + // @@protoc_insertion_point(field_get:backup.AddAttachmentRequest.dataChunk) + return _internal_datachunk(); +} +inline void AddAttachmentRequest::set_datachunk(const std::string& value) { + _internal_set_datachunk(value); + // @@protoc_insertion_point(field_set:backup.AddAttachmentRequest.dataChunk) +} +inline std::string* AddAttachmentRequest::mutable_datachunk() { + // @@protoc_insertion_point(field_mutable:backup.AddAttachmentRequest.dataChunk) + return _internal_mutable_datachunk(); +} +inline const std::string& AddAttachmentRequest::_internal_datachunk() const { + if (_internal_has_datachunk()) { + return data_.datachunk_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); +} +inline void AddAttachmentRequest::_internal_set_datachunk(const std::string& value) { + if (!_internal_has_datachunk()) { + clear_data(); + set_has_datachunk(); + data_.datachunk_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + data_.datachunk_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); +} +inline void AddAttachmentRequest::set_datachunk(std::string&& value) { + // @@protoc_insertion_point(field_set:backup.AddAttachmentRequest.dataChunk) + if (!_internal_has_datachunk()) { + clear_data(); + set_has_datachunk(); + data_.datachunk_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + data_.datachunk_.Set( + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:backup.AddAttachmentRequest.dataChunk) +} +inline void AddAttachmentRequest::set_datachunk(const char* value) { + GOOGLE_DCHECK(value != nullptr); + if (!_internal_has_datachunk()) { + clear_data(); + set_has_datachunk(); + data_.datachunk_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + data_.datachunk_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, + ::std::string(value), GetArena()); + // @@protoc_insertion_point(field_set_char:backup.AddAttachmentRequest.dataChunk) +} +inline void AddAttachmentRequest::set_datachunk(const void* value, + size_t size) { + if (!_internal_has_datachunk()) { + clear_data(); + set_has_datachunk(); + data_.datachunk_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + data_.datachunk_.Set( + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( + reinterpret_cast(value), size), + GetArena()); + // @@protoc_insertion_point(field_set_pointer:backup.AddAttachmentRequest.dataChunk) +} +inline std::string* AddAttachmentRequest::_internal_mutable_datachunk() { + if (!_internal_has_datachunk()) { + clear_data(); + set_has_datachunk(); + data_.datachunk_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + return data_.datachunk_.Mutable( + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); +} +inline std::string* AddAttachmentRequest::release_datachunk() { + // @@protoc_insertion_point(field_release:backup.AddAttachmentRequest.dataChunk) + if (_internal_has_datachunk()) { + clear_has_data(); + return data_.datachunk_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + } else { + return nullptr; + } +} +inline void AddAttachmentRequest::set_allocated_datachunk(std::string* datachunk) { + if (has_data()) { + clear_data(); + } + if (datachunk != nullptr) { + set_has_datachunk(); + data_.datachunk_.UnsafeSetDefault(datachunk); + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); + if (arena != nullptr) { + arena->Own(datachunk); + } + } + // @@protoc_insertion_point(field_set_allocated:backup.AddAttachmentRequest.dataChunk) +} + +inline bool AddAttachmentRequest::has_data() const { + return data_case() != DATA_NOT_SET; +} +inline void AddAttachmentRequest::clear_has_data() { + _oneof_case_[0] = DATA_NOT_SET; +} +inline AddAttachmentRequest::DataCase AddAttachmentRequest::data_case() const { + return AddAttachmentRequest::DataCase(_oneof_case_[0]); +} #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ @@ -2828,11 +3846,25 @@ // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) } // namespace backup +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::backup::AddAttachmentRequest_AttachmentParentType> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::backup::AddAttachmentRequest_AttachmentParentType>() { + return ::backup::AddAttachmentRequest_AttachmentParentType_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + // @@protoc_insertion_point(global_scope) #include diff --git a/native/cpp/CommonCpp/grpc/_generated/backup.pb.cc b/native/cpp/CommonCpp/grpc/_generated/backup.pb.cc --- a/native/cpp/CommonCpp/grpc/_generated/backup.pb.cc +++ b/native/cpp/CommonCpp/grpc/_generated/backup.pb.cc @@ -53,6 +53,18 @@ }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SendLogRequestDefaultTypeInternal _SendLogRequest_default_instance_; +constexpr SendLogResponse::SendLogResponse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : logid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct SendLogResponseDefaultTypeInternal { + constexpr SendLogResponseDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~SendLogResponseDefaultTypeInternal() {} + union { + SendLogResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SendLogResponseDefaultTypeInternal _SendLogResponse_default_instance_; constexpr RecoverBackupKeyRequest::RecoverBackupKeyRequest( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : userid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} @@ -102,9 +114,21 @@ }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PullBackupResponseDefaultTypeInternal _PullBackupResponse_default_instance_; +constexpr AddAttachmentRequest::AddAttachmentRequest( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : _oneof_case_{}{} +struct AddAttachmentRequestDefaultTypeInternal { + constexpr AddAttachmentRequestDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~AddAttachmentRequestDefaultTypeInternal() {} + union { + AddAttachmentRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AddAttachmentRequestDefaultTypeInternal _AddAttachmentRequest_default_instance_; } // namespace backup -static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_backup_2eproto[7]; -static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_backup_2eproto = nullptr; +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_backup_2eproto[9]; +static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_backup_2eproto[1]; static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_backup_2eproto = nullptr; const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_backup_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { @@ -135,6 +159,12 @@ ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, PROTOBUF_FIELD_OFFSET(::backup::SendLogRequest, data_), ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::backup::SendLogResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::backup::SendLogResponse, logid_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::backup::RecoverBackupKeyRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ @@ -161,25 +191,40 @@ ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, PROTOBUF_FIELD_OFFSET(::backup::PullBackupResponse, data_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::backup::AddAttachmentRequest, _internal_metadata_), + ~0u, // no _extensions_ + PROTOBUF_FIELD_OFFSET(::backup::AddAttachmentRequest, _oneof_case_[0]), + ~0u, // no _weak_field_map_ + ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, + ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, + ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, + ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, + ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, + PROTOBUF_FIELD_OFFSET(::backup::AddAttachmentRequest, data_), }; static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(::backup::CreateNewBackupRequest)}, { 10, -1, sizeof(::backup::CreateNewBackupResponse)}, { 16, -1, sizeof(::backup::SendLogRequest)}, - { 26, -1, sizeof(::backup::RecoverBackupKeyRequest)}, - { 32, -1, sizeof(::backup::RecoverBackupKeyResponse)}, - { 38, -1, sizeof(::backup::PullBackupRequest)}, - { 45, -1, sizeof(::backup::PullBackupResponse)}, + { 26, -1, sizeof(::backup::SendLogResponse)}, + { 32, -1, sizeof(::backup::RecoverBackupKeyRequest)}, + { 38, -1, sizeof(::backup::RecoverBackupKeyResponse)}, + { 44, -1, sizeof(::backup::PullBackupRequest)}, + { 51, -1, sizeof(::backup::PullBackupResponse)}, + { 59, -1, sizeof(::backup::AddAttachmentRequest)}, }; static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { reinterpret_cast(&::backup::_CreateNewBackupRequest_default_instance_), reinterpret_cast(&::backup::_CreateNewBackupResponse_default_instance_), reinterpret_cast(&::backup::_SendLogRequest_default_instance_), + reinterpret_cast(&::backup::_SendLogResponse_default_instance_), reinterpret_cast(&::backup::_RecoverBackupKeyRequest_default_instance_), reinterpret_cast(&::backup::_RecoverBackupKeyResponse_default_instance_), reinterpret_cast(&::backup::_PullBackupRequest_default_instance_), reinterpret_cast(&::backup::_PullBackupResponse_default_instance_), + reinterpret_cast(&::backup::_AddAttachmentRequest_default_instance_), }; const char descriptor_table_protodef_backup_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = @@ -191,29 +236,37 @@ "ckupResponse\022\020\n\010backupID\030\001 \001(\t\"d\n\016SendLo" "gRequest\022\020\n\006userID\030\001 \001(\tH\000\022\022\n\010backupID\030\002" " \001(\tH\000\022\021\n\007logHash\030\003 \001(\014H\000\022\021\n\007logData\030\004 \001" - "(\014H\000B\006\n\004data\")\n\027RecoverBackupKeyRequest\022" - "\016\n\006userID\030\001 \001(\t\",\n\030RecoverBackupKeyRespo" - "nse\022\020\n\010backupID\030\004 \001(\t\"5\n\021PullBackupReque" - "st\022\016\n\006userID\030\001 \001(\t\022\020\n\010backupID\030\002 \001(\t\"K\n\022" - "PullBackupResponse\022\031\n\017compactionChunk\030\001 " - "\001(\014H\000\022\022\n\010logChunk\030\002 \001(\014H\000B\006\n\004data2\316\002\n\rBa" - "ckupService\022X\n\017CreateNewBackup\022\036.backup." - "CreateNewBackupRequest\032\037.backup.CreateNe" - "wBackupResponse\"\000(\0010\001\022=\n\007SendLog\022\026.backu" - "p.SendLogRequest\032\026.google.protobuf.Empty" - "\"\000(\001\022[\n\020RecoverBackupKey\022\037.backup.Recove" - "rBackupKeyRequest\032 .backup.RecoverBackup" - "KeyResponse\"\000(\0010\001\022G\n\nPullBackup\022\031.backup" - ".PullBackupRequest\032\032.backup.PullBackupRe" - "sponse\"\0000\001b\006proto3" + "(\014H\000B\006\n\004data\" \n\017SendLogResponse\022\r\n\005logID" + "\030\001 \001(\t\")\n\027RecoverBackupKeyRequest\022\016\n\006use" + "rID\030\001 \001(\t\",\n\030RecoverBackupKeyResponse\022\020\n" + "\010backupID\030\004 \001(\t\"5\n\021PullBackupRequest\022\016\n\006" + "userID\030\001 \001(\t\022\020\n\010backupID\030\002 \001(\t\"K\n\022PullBa" + "ckupResponse\022\031\n\017compactionChunk\030\001 \001(\014H\000\022" + "\022\n\010logChunk\030\002 \001(\014H\000B\006\n\004data\"\342\001\n\024AddAttac" + "hmentRequest\022G\n\nparentType\030\001 \001(\01621.backu" + "p.AddAttachmentRequest.AttachmentParentT" + "ypeH\000\022\022\n\010backupID\030\002 \001(\tH\000\022\017\n\005logID\030\003 \001(\t" + "H\000\022\022\n\010dataHash\030\004 \001(\014H\000\022\023\n\tdataChunk\030\005 \001(" + "\014H\000\"+\n\024AttachmentParentType\022\n\n\006BACKUP\020\000\022" + "\007\n\003LOG\020\001B\006\n\004data2\232\003\n\rBackupService\022X\n\017Cr" + "eateNewBackup\022\036.backup.CreateNewBackupRe" + "quest\032\037.backup.CreateNewBackupResponse\"\000" + "(\0010\001\022>\n\007SendLog\022\026.backup.SendLogRequest\032" + "\027.backup.SendLogResponse\"\000(\001\022[\n\020RecoverB" + "ackupKey\022\037.backup.RecoverBackupKeyReques" + "t\032 .backup.RecoverBackupKeyResponse\"\000(\0010" + "\001\022G\n\nPullBackup\022\031.backup.PullBackupReque" + "st\032\032.backup.PullBackupResponse\"\0000\001\022I\n\rAd" + "dAttachment\022\034.backup.AddAttachmentReques" + "t\032\026.google.protobuf.Empty\"\000(\001b\006proto3" ; static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_backup_2eproto_deps[1] = { &::descriptor_table_google_2fprotobuf_2fempty_2eproto, }; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_backup_2eproto_once; const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_backup_2eproto = { - false, false, 898, descriptor_table_protodef_backup_2eproto, "backup.proto", - &descriptor_table_backup_2eproto_once, descriptor_table_backup_2eproto_deps, 1, 7, + false, false, 1237, descriptor_table_protodef_backup_2eproto, "backup.proto", + &descriptor_table_backup_2eproto_once, descriptor_table_backup_2eproto_deps, 1, 9, schemas, file_default_instances, TableStruct_backup_2eproto::offsets, file_level_metadata_backup_2eproto, file_level_enum_descriptors_backup_2eproto, file_level_service_descriptors_backup_2eproto, }; @@ -226,6 +279,27 @@ // Force running AddDescriptors() at dynamic initialization time. PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_backup_2eproto(&descriptor_table_backup_2eproto); namespace backup { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* AddAttachmentRequest_AttachmentParentType_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_backup_2eproto); + return file_level_enum_descriptors_backup_2eproto[0]; +} +bool AddAttachmentRequest_AttachmentParentType_IsValid(int value) { + switch (value) { + case 0: + case 1: + return true; + default: + return false; + } +} + +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) +constexpr AddAttachmentRequest_AttachmentParentType AddAttachmentRequest::BACKUP; +constexpr AddAttachmentRequest_AttachmentParentType AddAttachmentRequest::LOG; +constexpr AddAttachmentRequest_AttachmentParentType AddAttachmentRequest::AttachmentParentType_MIN; +constexpr AddAttachmentRequest_AttachmentParentType AddAttachmentRequest::AttachmentParentType_MAX; +constexpr int AddAttachmentRequest::AttachmentParentType_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) // =================================================================== @@ -1098,6 +1172,206 @@ } +// =================================================================== + +class SendLogResponse::_Internal { + public: +}; + +SendLogResponse::SendLogResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:backup.SendLogResponse) +} +SendLogResponse::SendLogResponse(const SendLogResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + logid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_logid().empty()) { + logid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_logid(), + GetArena()); + } + // @@protoc_insertion_point(copy_constructor:backup.SendLogResponse) +} + +void SendLogResponse::SharedCtor() { +logid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +SendLogResponse::~SendLogResponse() { + // @@protoc_insertion_point(destructor:backup.SendLogResponse) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void SendLogResponse::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + logid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void SendLogResponse::ArenaDtor(void* object) { + SendLogResponse* _this = reinterpret_cast< SendLogResponse* >(object); + (void)_this; +} +void SendLogResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void SendLogResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void SendLogResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:backup.SendLogResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + logid_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* SendLogResponse::_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); + CHK_(ptr); + switch (tag >> 3) { + // string logID = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_logid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "backup.SendLogResponse.logID")); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.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* SendLogResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:backup.SendLogResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string logID = 1; + if (this->logid().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_logid().data(), static_cast(this->_internal_logid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "backup.SendLogResponse.logID"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_logid(), 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:backup.SendLogResponse) + return target; +} + +size_t SendLogResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:backup.SendLogResponse) + 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 logID = 1; + if (this->logid().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_logid()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void SendLogResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:backup.SendLogResponse) + GOOGLE_DCHECK_NE(&from, this); + const SendLogResponse* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:backup.SendLogResponse) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:backup.SendLogResponse) + MergeFrom(*source); + } +} + +void SendLogResponse::MergeFrom(const SendLogResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:backup.SendLogResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.logid().size() > 0) { + _internal_set_logid(from._internal_logid()); + } +} + +void SendLogResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:backup.SendLogResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void SendLogResponse::CopyFrom(const SendLogResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:backup.SendLogResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool SendLogResponse::IsInitialized() const { + return true; +} + +void SendLogResponse::InternalSwap(SendLogResponse* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + logid_.Swap(&other->logid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} + +::PROTOBUF_NAMESPACE_ID::Metadata SendLogResponse::GetMetadata() const { + return GetMetadataStatic(); +} + + // =================================================================== class RecoverBackupKeyRequest::_Internal { @@ -1998,6 +2272,377 @@ } +// =================================================================== + +class AddAttachmentRequest::_Internal { + public: +}; + +AddAttachmentRequest::AddAttachmentRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:backup.AddAttachmentRequest) +} +AddAttachmentRequest::AddAttachmentRequest(const AddAttachmentRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + clear_has_data(); + switch (from.data_case()) { + case kParentType: { + _internal_set_parenttype(from._internal_parenttype()); + break; + } + case kBackupID: { + _internal_set_backupid(from._internal_backupid()); + break; + } + case kLogID: { + _internal_set_logid(from._internal_logid()); + break; + } + case kDataHash: { + _internal_set_datahash(from._internal_datahash()); + break; + } + case kDataChunk: { + _internal_set_datachunk(from._internal_datachunk()); + break; + } + case DATA_NOT_SET: { + break; + } + } + // @@protoc_insertion_point(copy_constructor:backup.AddAttachmentRequest) +} + +void AddAttachmentRequest::SharedCtor() { +clear_has_data(); +} + +AddAttachmentRequest::~AddAttachmentRequest() { + // @@protoc_insertion_point(destructor:backup.AddAttachmentRequest) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void AddAttachmentRequest::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + if (has_data()) { + clear_data(); + } +} + +void AddAttachmentRequest::ArenaDtor(void* object) { + AddAttachmentRequest* _this = reinterpret_cast< AddAttachmentRequest* >(object); + (void)_this; +} +void AddAttachmentRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void AddAttachmentRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void AddAttachmentRequest::clear_data() { +// @@protoc_insertion_point(one_of_clear_start:backup.AddAttachmentRequest) + switch (data_case()) { + case kParentType: { + // No need to clear + break; + } + case kBackupID: { + data_.backupid_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); + break; + } + case kLogID: { + data_.logid_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); + break; + } + case kDataHash: { + data_.datahash_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); + break; + } + case kDataChunk: { + data_.datachunk_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); + break; + } + case DATA_NOT_SET: { + break; + } + } + _oneof_case_[0] = DATA_NOT_SET; +} + + +void AddAttachmentRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:backup.AddAttachmentRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + clear_data(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AddAttachmentRequest::_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); + CHK_(ptr); + switch (tag >> 3) { + // .backup.AddAttachmentRequest.AttachmentParentType parentType = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_parenttype(static_cast<::backup::AddAttachmentRequest_AttachmentParentType>(val)); + } else goto handle_unusual; + continue; + // string backupID = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_backupid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "backup.AddAttachmentRequest.backupID")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string logID = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + auto str = _internal_mutable_logid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "backup.AddAttachmentRequest.logID")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bytes dataHash = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + auto str = _internal_mutable_datahash(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bytes dataChunk = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + auto str = _internal_mutable_datachunk(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.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* AddAttachmentRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:backup.AddAttachmentRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .backup.AddAttachmentRequest.AttachmentParentType parentType = 1; + if (_internal_has_parenttype()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_parenttype(), target); + } + + // string backupID = 2; + if (_internal_has_backupid()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_backupid().data(), static_cast(this->_internal_backupid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "backup.AddAttachmentRequest.backupID"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_backupid(), target); + } + + // string logID = 3; + if (_internal_has_logid()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_logid().data(), static_cast(this->_internal_logid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "backup.AddAttachmentRequest.logID"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_logid(), target); + } + + // bytes dataHash = 4; + if (_internal_has_datahash()) { + target = stream->WriteBytesMaybeAliased( + 4, this->_internal_datahash(), target); + } + + // bytes dataChunk = 5; + if (_internal_has_datachunk()) { + target = stream->WriteBytesMaybeAliased( + 5, this->_internal_datachunk(), 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:backup.AddAttachmentRequest) + return target; +} + +size_t AddAttachmentRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:backup.AddAttachmentRequest) + 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; + + switch (data_case()) { + // .backup.AddAttachmentRequest.AttachmentParentType parentType = 1; + case kParentType: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_parenttype()); + break; + } + // string backupID = 2; + case kBackupID: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_backupid()); + break; + } + // string logID = 3; + case kLogID: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_logid()); + break; + } + // bytes dataHash = 4; + case kDataHash: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_datahash()); + break; + } + // bytes dataChunk = 5; + case kDataChunk: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_datachunk()); + break; + } + case DATA_NOT_SET: { + break; + } + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void AddAttachmentRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:backup.AddAttachmentRequest) + GOOGLE_DCHECK_NE(&from, this); + const AddAttachmentRequest* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:backup.AddAttachmentRequest) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:backup.AddAttachmentRequest) + MergeFrom(*source); + } +} + +void AddAttachmentRequest::MergeFrom(const AddAttachmentRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:backup.AddAttachmentRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + switch (from.data_case()) { + case kParentType: { + _internal_set_parenttype(from._internal_parenttype()); + break; + } + case kBackupID: { + _internal_set_backupid(from._internal_backupid()); + break; + } + case kLogID: { + _internal_set_logid(from._internal_logid()); + break; + } + case kDataHash: { + _internal_set_datahash(from._internal_datahash()); + break; + } + case kDataChunk: { + _internal_set_datachunk(from._internal_datachunk()); + break; + } + case DATA_NOT_SET: { + break; + } + } +} + +void AddAttachmentRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:backup.AddAttachmentRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void AddAttachmentRequest::CopyFrom(const AddAttachmentRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:backup.AddAttachmentRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AddAttachmentRequest::IsInitialized() const { + return true; +} + +void AddAttachmentRequest::InternalSwap(AddAttachmentRequest* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + swap(data_, other->data_); + swap(_oneof_case_[0], other->_oneof_case_[0]); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AddAttachmentRequest::GetMetadata() const { + return GetMetadataStatic(); +} + + // @@protoc_insertion_point(namespace_scope) } // namespace backup PROTOBUF_NAMESPACE_OPEN @@ -2010,6 +2655,9 @@ template<> PROTOBUF_NOINLINE ::backup::SendLogRequest* Arena::CreateMaybeMessage< ::backup::SendLogRequest >(Arena* arena) { return Arena::CreateMessageInternal< ::backup::SendLogRequest >(arena); } +template<> PROTOBUF_NOINLINE ::backup::SendLogResponse* Arena::CreateMaybeMessage< ::backup::SendLogResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::backup::SendLogResponse >(arena); +} template<> PROTOBUF_NOINLINE ::backup::RecoverBackupKeyRequest* Arena::CreateMaybeMessage< ::backup::RecoverBackupKeyRequest >(Arena* arena) { return Arena::CreateMessageInternal< ::backup::RecoverBackupKeyRequest >(arena); } @@ -2022,6 +2670,9 @@ template<> PROTOBUF_NOINLINE ::backup::PullBackupResponse* Arena::CreateMaybeMessage< ::backup::PullBackupResponse >(Arena* arena) { return Arena::CreateMessageInternal< ::backup::PullBackupResponse >(arena); } +template<> PROTOBUF_NOINLINE ::backup::AddAttachmentRequest* Arena::CreateMaybeMessage< ::backup::AddAttachmentRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::backup::AddAttachmentRequest >(arena); +} PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) diff --git a/native/cpp/CommonCpp/grpc/protos/backup.proto b/native/cpp/CommonCpp/grpc/protos/backup.proto --- a/native/cpp/CommonCpp/grpc/protos/backup.proto +++ b/native/cpp/CommonCpp/grpc/protos/backup.proto @@ -23,6 +23,7 @@ rpc SendLog(stream SendLogRequest) returns (SendLogResponse) {} rpc RecoverBackupKey(stream RecoverBackupKeyRequest) returns (stream RecoverBackupKeyResponse) {} rpc PullBackup(PullBackupRequest) returns (stream PullBackupResponse) {} + rpc AddAttachment(stream AddAttachmentRequest) returns (google.protobuf.Empty) {} } // CreateNewBackup @@ -78,3 +79,15 @@ bytes logChunk = 2; } } + +// AddAttachment + +message AddAttachmentRequest { + oneof data { + string userID = 1; + string backupID = 2; + string logID = 3; + bytes dataHash = 4; + bytes dataChunk = 5; + } +}