diff --git a/Makefile b/Makefile index 3d0e996..6f1805a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ PROTOC_GEN_TS_PATH=${HOME}/npm_modules/bin/protoc-gen-ts +PROTOC_CPP_PLUGIN=$(shell which grpc_cpp_plugin) .PHONY: proto proto: proto-gen tidy @@ -98,6 +99,14 @@ gen-file: --plugin=protoc-gen-grpc-java=build/protoc-gen-grpc-java \ --grpc-java_out=java \ pb/file.proto + # generate cpp bindings + protoc \ + -I=pb \ + -I=${GOPATH}/src \ + --plugin=protoc-gen-grpc=${PROTOC_CPP_PLUGIN} \ + --cpp_out=cpp \ + --grpc_out=cpp \ + pb/file.proto gen-util: # generate golang bindings (util) @@ -134,6 +143,14 @@ gen-util: --plugin=protoc-gen-grpc-java=build/protoc-gen-grpc-java \ --grpc-java_out=java \ pb/util.proto + # generate cpp bindings (file) + protoc \ + -I=pb \ + -I=${GOPATH}/src \ + --plugin=protoc-gen-grpc=${PROTOC_CPP_PLUGIN} \ + --cpp_out=cpp \ + --grpc_out=cpp \ + pb/util.proto gen-node: # generate golang bindings (node) @@ -171,6 +188,14 @@ gen-node: --plugin=protoc-gen-grpc-java=build/protoc-gen-grpc-java \ --grpc-java_out=java \ pb/node.proto + # generate cpp bindings (node) + protoc \ + -I=pb \ + -I=${GOPATH}/src \ + --plugin=protoc-gen-grpc=${PROTOC_CPP_PLUGIN} \ + --cpp_out=cpp \ + --grpc_out=cpp \ + pb/node.proto gen-status: # generate golang bindings (status) @@ -208,6 +233,14 @@ gen-status: --plugin=protoc-gen-grpc-java=build/protoc-gen-grpc-java \ --grpc-java_out=java \ pb/status.proto + # generate cpp bindings (status) + protoc \ + -I=pb \ + -I=${GOPATH}/src \ + --plugin=protoc-gen-grpc=${PROTOC_CPP_PLUGIN} \ + --cpp_out=cpp \ + --grpc_out=cpp \ + pb/status.proto gen-pubsub: # generate golang bindings (pubsub) @@ -245,6 +278,14 @@ gen-pubsub: --plugin=protoc-gen-grpc-java=build/protoc-gen-grpc-java \ --grpc-java_out=java \ pb/pubsub.proto + # generate cpp bindings (pubsub) + protoc \ + -I=pb \ + -I=${GOPATH}/src \ + --plugin=protoc-gen-grpc=${PROTOC_CPP_PLUGIN} \ + --cpp_out=cpp \ + --grpc_out=cpp \ + pb/pubsub.proto gen-admin: # generate golang bindings (admin) @@ -282,6 +323,14 @@ gen-admin: --plugin=protoc-gen-grpc-java=build/protoc-gen-grpc-java \ --grpc-java_out=java \ pb/admin.proto + # generate cpp bindings (admin) + protoc \ + -I=pb \ + -I=${GOPATH}/src \ + --plugin=protoc-gen-grpc=${PROTOC_CPP_PLUGIN} \ + --cpp_out=cpp \ + --grpc_out=cpp \ + pb/admin.proto gen-namesys: # generate golang bindings (namesys) @@ -318,6 +367,14 @@ gen-namesys: --plugin=protoc-gen-grpc-java=build/protoc-gen-grpc-java \ --grpc-java_out=java \ pb/namesys.proto + # generate cpp bindings (namesys) + protoc \ + -I=pb \ + -I=${GOPATH}/src \ + --plugin=protoc-gen-grpc=${PROTOC_CPP_PLUGIN} \ + --cpp_out=cpp \ + --grpc_out=cpp \ + pb/namesys.proto gen-replication: # generate golang bindings (replication) @@ -355,7 +412,15 @@ gen-replication: --plugin=protoc-gen-grpc-java=build/protoc-gen-grpc-java \ --grpc-java_out=java \ pb/replication.proto - + # generate cpp bindings (replication) + protoc \ + -I=pb \ + -I=${GOPATH}/src \ + --plugin=protoc-gen-grpc=${PROTOC_CPP_PLUGIN} \ + --cpp_out=cpp \ + --grpc_out=cpp \ + pb/replication.proto + gen-docs: # generate documentation protoc \ diff --git a/README.md b/README.md index 362f08b..188bd38 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,15 @@ # TxPB -`TxPB` is the main source of information for using TemporalX, and includes protocol buffer definitions, generated code, and documentation. If you are looking for the protocol buffer definitions, check the `pb` folder. +TxPB is the main public information repository for TemporalX. It includes all protocol buffers we use, along with their generated gRPC code in a variety of languages. Additionally there is documentation on some of the TemporalX subsystems, such as the reference counter, and licensing system. Additinoally the configuration file is fully documented, along with a small "getting started" tutorial. -We have pre-generated gRPC bindings for the following languages: +Pre-generated gRPC and protocol buffer bindings exist for the following languages: -* [golang](https://github.com/RTradeLtd/TxPB/tree/master/go) -* [javascript (grpc-web)](https://github.com/RTradeLtd/TxPB/tree/master/js) -* [typescript (grpc-web)](https://github.com/RTradeLtd/TxPB/tree/master/ts) -* [java](https://github.com/RTradeLtd/TxPB/tree/master/java/pb) -* [python](https://github.com/RTradeLtd/TxPB/tree/master/py) - -If you want bindings in other languages, feel free to open a github issue. Alternatively you can generate language bindings independently as long as the languages you are using support the appropriate protocol buffer and gRPC versions. +* [C++](https://github.com/RTradeLtd/TxPB/tree/master/cpp) +* [Golang](https://github.com/RTradeLtd/TxPB/tree/master/go) +* [Java](https://github.com/RTradeLtd/TxPB/tree/master/java) +* [JavaScript (grpc-web)](https://github.com/RTradeLtd/TxPB/tree/master/js) +* [Python](https://github.com/RTradeLtd/TxPB/tree/master/py) +* [TypeScript (grpc-web)](https://github.com/RTradeLtd/TxPB/tree/master/ts) # Documentation @@ -26,17 +25,22 @@ If you want bindings in other languages, feel free to open a github issue. Alter # Code Generation -Before generating the code, you'll need to download quite a few generators. Before downloading the generators you'll need to have a valid installation of the following, please consult appropriate installation manuals as required: +Code generation requires a number of dependencies installed, particularily an environment capable of building gRPC code for the following languages: + +* C++ +* Golang +* Java +* JavaScript +* Python +* TypeScript + +To generate the code for all aforementioned languages, simply type `make`. Along with generating code, this will update the generated markdown documentation. -* Go 1.13+ -* NodeJS -* NPM -* Python3 -* Make +## Installing Generators (TODO) -Once you have all of this installed, you can then install the needed generators which will allow you to generate the gRPC client stubs. To do this run `make install`. This has to download quite a few packages so it might take some time to complete. The only thing this doesn't install is a java generator, to do that visit https://search.maven.org/search?q=g:io.grpc%20a:protoc-gen-grpc-java and download the one for your platform. +### Java -After you've downloaded all generator tooling, you can generate the client stubs, and documentation with a single `make`. +To install the java generator, vist [search.maven.org](https://search.maven.org/search?q=g:io.grpc%20a:protoc-gen-grpc-java) # License diff --git a/cpp/admin.grpc.pb.cc b/cpp/admin.grpc.pb.cc new file mode 100644 index 0000000..d57b44c --- /dev/null +++ b/cpp/admin.grpc.pb.cc @@ -0,0 +1,128 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: admin.proto + +#include "admin.pb.h" +#include "admin.grpc.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace pb { + +static const char* AdminAPI_method_names[] = { + "/pb.AdminAPI/ManageGC", + "/pb.AdminAPI/RefCount", +}; + +std::unique_ptr< AdminAPI::Stub> AdminAPI::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< AdminAPI::Stub> stub(new AdminAPI::Stub(channel)); + return stub; +} + +AdminAPI::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel) + : channel_(channel), rpcmethod_ManageGC_(AdminAPI_method_names[0], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_RefCount_(AdminAPI_method_names[1], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::Status AdminAPI::Stub::ManageGC(::grpc::ClientContext* context, const ::pb::ManageGCRequest& request, ::pb::ManageGCResponse* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_ManageGC_, context, request, response); +} + +void AdminAPI::Stub::experimental_async::ManageGC(::grpc::ClientContext* context, const ::pb::ManageGCRequest* request, ::pb::ManageGCResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_ManageGC_, context, request, response, std::move(f)); +} + +void AdminAPI::Stub::experimental_async::ManageGC(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::ManageGCResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_ManageGC_, context, request, response, std::move(f)); +} + +void AdminAPI::Stub::experimental_async::ManageGC(::grpc::ClientContext* context, const ::pb::ManageGCRequest* request, ::pb::ManageGCResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_ManageGC_, context, request, response, reactor); +} + +void AdminAPI::Stub::experimental_async::ManageGC(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::ManageGCResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_ManageGC_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::pb::ManageGCResponse>* AdminAPI::Stub::AsyncManageGCRaw(::grpc::ClientContext* context, const ::pb::ManageGCRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::ManageGCResponse>::Create(channel_.get(), cq, rpcmethod_ManageGC_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::pb::ManageGCResponse>* AdminAPI::Stub::PrepareAsyncManageGCRaw(::grpc::ClientContext* context, const ::pb::ManageGCRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::ManageGCResponse>::Create(channel_.get(), cq, rpcmethod_ManageGC_, context, request, false); +} + +::grpc::Status AdminAPI::Stub::RefCount(::grpc::ClientContext* context, const ::pb::RefCountRequest& request, ::pb::RefCountResponse* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_RefCount_, context, request, response); +} + +void AdminAPI::Stub::experimental_async::RefCount(::grpc::ClientContext* context, const ::pb::RefCountRequest* request, ::pb::RefCountResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_RefCount_, context, request, response, std::move(f)); +} + +void AdminAPI::Stub::experimental_async::RefCount(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::RefCountResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_RefCount_, context, request, response, std::move(f)); +} + +void AdminAPI::Stub::experimental_async::RefCount(::grpc::ClientContext* context, const ::pb::RefCountRequest* request, ::pb::RefCountResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_RefCount_, context, request, response, reactor); +} + +void AdminAPI::Stub::experimental_async::RefCount(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::RefCountResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_RefCount_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::pb::RefCountResponse>* AdminAPI::Stub::AsyncRefCountRaw(::grpc::ClientContext* context, const ::pb::RefCountRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::RefCountResponse>::Create(channel_.get(), cq, rpcmethod_RefCount_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::pb::RefCountResponse>* AdminAPI::Stub::PrepareAsyncRefCountRaw(::grpc::ClientContext* context, const ::pb::RefCountRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::RefCountResponse>::Create(channel_.get(), cq, rpcmethod_RefCount_, context, request, false); +} + +AdminAPI::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + AdminAPI_method_names[0], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< AdminAPI::Service, ::pb::ManageGCRequest, ::pb::ManageGCResponse>( + std::mem_fn(&AdminAPI::Service::ManageGC), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + AdminAPI_method_names[1], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< AdminAPI::Service, ::pb::RefCountRequest, ::pb::RefCountResponse>( + std::mem_fn(&AdminAPI::Service::RefCount), this))); +} + +AdminAPI::Service::~Service() { +} + +::grpc::Status AdminAPI::Service::ManageGC(::grpc::ServerContext* context, const ::pb::ManageGCRequest* request, ::pb::ManageGCResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status AdminAPI::Service::RefCount(::grpc::ServerContext* context, const ::pb::RefCountRequest* request, ::pb::RefCountResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +} // namespace pb + diff --git a/cpp/admin.grpc.pb.h b/cpp/admin.grpc.pb.h new file mode 100644 index 0000000..6ae2d2b --- /dev/null +++ b/cpp/admin.grpc.pb.h @@ -0,0 +1,510 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: admin.proto +#ifndef GRPC_admin_2eproto__INCLUDED +#define GRPC_admin_2eproto__INCLUDED + +#include "admin.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace pb { + +// AdminAPI facilitates administrative management of TemporalX via a localhost gRPC API +class AdminAPI final { + public: + static constexpr char const* service_full_name() { + return "pb.AdminAPI"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + // ManageGC is used to manage TemporalX's garbage collection process + virtual ::grpc::Status ManageGC(::grpc::ClientContext* context, const ::pb::ManageGCRequest& request, ::pb::ManageGCResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::ManageGCResponse>> AsyncManageGC(::grpc::ClientContext* context, const ::pb::ManageGCRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::ManageGCResponse>>(AsyncManageGCRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::ManageGCResponse>> PrepareAsyncManageGC(::grpc::ClientContext* context, const ::pb::ManageGCRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::ManageGCResponse>>(PrepareAsyncManageGCRaw(context, request, cq)); + } + // RefCount is used to analyze the counter store and pull reference count information + virtual ::grpc::Status RefCount(::grpc::ClientContext* context, const ::pb::RefCountRequest& request, ::pb::RefCountResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::RefCountResponse>> AsyncRefCount(::grpc::ClientContext* context, const ::pb::RefCountRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::RefCountResponse>>(AsyncRefCountRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::RefCountResponse>> PrepareAsyncRefCount(::grpc::ClientContext* context, const ::pb::RefCountRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::RefCountResponse>>(PrepareAsyncRefCountRaw(context, request, cq)); + } + class experimental_async_interface { + public: + virtual ~experimental_async_interface() {} + // ManageGC is used to manage TemporalX's garbage collection process + virtual void ManageGC(::grpc::ClientContext* context, const ::pb::ManageGCRequest* request, ::pb::ManageGCResponse* response, std::function) = 0; + virtual void ManageGC(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::ManageGCResponse* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void ManageGC(::grpc::ClientContext* context, const ::pb::ManageGCRequest* request, ::pb::ManageGCResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void ManageGC(::grpc::ClientContext* context, const ::pb::ManageGCRequest* request, ::pb::ManageGCResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void ManageGC(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::ManageGCResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void ManageGC(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::ManageGCResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + // RefCount is used to analyze the counter store and pull reference count information + virtual void RefCount(::grpc::ClientContext* context, const ::pb::RefCountRequest* request, ::pb::RefCountResponse* response, std::function) = 0; + virtual void RefCount(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::RefCountResponse* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void RefCount(::grpc::ClientContext* context, const ::pb::RefCountRequest* request, ::pb::RefCountResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void RefCount(::grpc::ClientContext* context, const ::pb::RefCountRequest* request, ::pb::RefCountResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void RefCount(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::RefCountResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void RefCount(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::RefCountResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + }; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + typedef class experimental_async_interface async_interface; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + async_interface* async() { return experimental_async(); } + #endif + virtual class experimental_async_interface* experimental_async() { return nullptr; } + private: + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::ManageGCResponse>* AsyncManageGCRaw(::grpc::ClientContext* context, const ::pb::ManageGCRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::ManageGCResponse>* PrepareAsyncManageGCRaw(::grpc::ClientContext* context, const ::pb::ManageGCRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::RefCountResponse>* AsyncRefCountRaw(::grpc::ClientContext* context, const ::pb::RefCountRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::RefCountResponse>* PrepareAsyncRefCountRaw(::grpc::ClientContext* context, const ::pb::RefCountRequest& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel); + ::grpc::Status ManageGC(::grpc::ClientContext* context, const ::pb::ManageGCRequest& request, ::pb::ManageGCResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::ManageGCResponse>> AsyncManageGC(::grpc::ClientContext* context, const ::pb::ManageGCRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::ManageGCResponse>>(AsyncManageGCRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::ManageGCResponse>> PrepareAsyncManageGC(::grpc::ClientContext* context, const ::pb::ManageGCRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::ManageGCResponse>>(PrepareAsyncManageGCRaw(context, request, cq)); + } + ::grpc::Status RefCount(::grpc::ClientContext* context, const ::pb::RefCountRequest& request, ::pb::RefCountResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::RefCountResponse>> AsyncRefCount(::grpc::ClientContext* context, const ::pb::RefCountRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::RefCountResponse>>(AsyncRefCountRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::RefCountResponse>> PrepareAsyncRefCount(::grpc::ClientContext* context, const ::pb::RefCountRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::RefCountResponse>>(PrepareAsyncRefCountRaw(context, request, cq)); + } + class experimental_async final : + public StubInterface::experimental_async_interface { + public: + void ManageGC(::grpc::ClientContext* context, const ::pb::ManageGCRequest* request, ::pb::ManageGCResponse* response, std::function) override; + void ManageGC(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::ManageGCResponse* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void ManageGC(::grpc::ClientContext* context, const ::pb::ManageGCRequest* request, ::pb::ManageGCResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void ManageGC(::grpc::ClientContext* context, const ::pb::ManageGCRequest* request, ::pb::ManageGCResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void ManageGC(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::ManageGCResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void ManageGC(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::ManageGCResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + void RefCount(::grpc::ClientContext* context, const ::pb::RefCountRequest* request, ::pb::RefCountResponse* response, std::function) override; + void RefCount(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::RefCountResponse* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void RefCount(::grpc::ClientContext* context, const ::pb::RefCountRequest* request, ::pb::RefCountResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void RefCount(::grpc::ClientContext* context, const ::pb::RefCountRequest* request, ::pb::RefCountResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void RefCount(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::RefCountResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void RefCount(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::RefCountResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + private: + friend class Stub; + explicit experimental_async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class experimental_async_interface* experimental_async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class experimental_async async_stub_{this}; + ::grpc::ClientAsyncResponseReader< ::pb::ManageGCResponse>* AsyncManageGCRaw(::grpc::ClientContext* context, const ::pb::ManageGCRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::pb::ManageGCResponse>* PrepareAsyncManageGCRaw(::grpc::ClientContext* context, const ::pb::ManageGCRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::pb::RefCountResponse>* AsyncRefCountRaw(::grpc::ClientContext* context, const ::pb::RefCountRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::pb::RefCountResponse>* PrepareAsyncRefCountRaw(::grpc::ClientContext* context, const ::pb::RefCountRequest& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_ManageGC_; + const ::grpc::internal::RpcMethod rpcmethod_RefCount_; + }; + static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + + class Service : public ::grpc::Service { + public: + Service(); + virtual ~Service(); + // ManageGC is used to manage TemporalX's garbage collection process + virtual ::grpc::Status ManageGC(::grpc::ServerContext* context, const ::pb::ManageGCRequest* request, ::pb::ManageGCResponse* response); + // RefCount is used to analyze the counter store and pull reference count information + virtual ::grpc::Status RefCount(::grpc::ServerContext* context, const ::pb::RefCountRequest* request, ::pb::RefCountResponse* response); + }; + template + class WithAsyncMethod_ManageGC : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_ManageGC() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_ManageGC() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ManageGC(::grpc::ServerContext* /*context*/, const ::pb::ManageGCRequest* /*request*/, ::pb::ManageGCResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestManageGC(::grpc::ServerContext* context, ::pb::ManageGCRequest* request, ::grpc::ServerAsyncResponseWriter< ::pb::ManageGCResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_RefCount : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_RefCount() { + ::grpc::Service::MarkMethodAsync(1); + } + ~WithAsyncMethod_RefCount() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RefCount(::grpc::ServerContext* /*context*/, const ::pb::RefCountRequest* /*request*/, ::pb::RefCountResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRefCount(::grpc::ServerContext* context, ::pb::RefCountRequest* request, ::grpc::ServerAsyncResponseWriter< ::pb::RefCountResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); + } + }; + typedef WithAsyncMethod_ManageGC > AsyncService; + template + class ExperimentalWithCallbackMethod_ManageGC : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_ManageGC() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(0, + new ::grpc_impl::internal::CallbackUnaryHandler< ::pb::ManageGCRequest, ::pb::ManageGCResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::pb::ManageGCRequest* request, ::pb::ManageGCResponse* response) { return this->ManageGC(context, request, response); }));} + void SetMessageAllocatorFor_ManageGC( + ::grpc::experimental::MessageAllocator< ::pb::ManageGCRequest, ::pb::ManageGCResponse>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(0); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::pb::ManageGCRequest, ::pb::ManageGCResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_ManageGC() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ManageGC(::grpc::ServerContext* /*context*/, const ::pb::ManageGCRequest* /*request*/, ::pb::ManageGCResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* ManageGC( + ::grpc::CallbackServerContext* /*context*/, const ::pb::ManageGCRequest* /*request*/, ::pb::ManageGCResponse* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* ManageGC( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::pb::ManageGCRequest* /*request*/, ::pb::ManageGCResponse* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_RefCount : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_RefCount() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(1, + new ::grpc_impl::internal::CallbackUnaryHandler< ::pb::RefCountRequest, ::pb::RefCountResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::pb::RefCountRequest* request, ::pb::RefCountResponse* response) { return this->RefCount(context, request, response); }));} + void SetMessageAllocatorFor_RefCount( + ::grpc::experimental::MessageAllocator< ::pb::RefCountRequest, ::pb::RefCountResponse>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(1); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::pb::RefCountRequest, ::pb::RefCountResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_RefCount() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RefCount(::grpc::ServerContext* /*context*/, const ::pb::RefCountRequest* /*request*/, ::pb::RefCountResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* RefCount( + ::grpc::CallbackServerContext* /*context*/, const ::pb::RefCountRequest* /*request*/, ::pb::RefCountResponse* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* RefCount( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::pb::RefCountRequest* /*request*/, ::pb::RefCountResponse* /*response*/) + #endif + { return nullptr; } + }; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + typedef ExperimentalWithCallbackMethod_ManageGC > CallbackService; + #endif + + typedef ExperimentalWithCallbackMethod_ManageGC > ExperimentalCallbackService; + template + class WithGenericMethod_ManageGC : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_ManageGC() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_ManageGC() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ManageGC(::grpc::ServerContext* /*context*/, const ::pb::ManageGCRequest* /*request*/, ::pb::ManageGCResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_RefCount : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_RefCount() { + ::grpc::Service::MarkMethodGeneric(1); + } + ~WithGenericMethod_RefCount() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RefCount(::grpc::ServerContext* /*context*/, const ::pb::RefCountRequest* /*request*/, ::pb::RefCountResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_ManageGC : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_ManageGC() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_ManageGC() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ManageGC(::grpc::ServerContext* /*context*/, const ::pb::ManageGCRequest* /*request*/, ::pb::ManageGCResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestManageGC(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_RefCount : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_RefCount() { + ::grpc::Service::MarkMethodRaw(1); + } + ~WithRawMethod_RefCount() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RefCount(::grpc::ServerContext* /*context*/, const ::pb::RefCountRequest* /*request*/, ::pb::RefCountResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRefCount(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class ExperimentalWithRawCallbackMethod_ManageGC : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_ManageGC() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(0, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->ManageGC(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_ManageGC() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ManageGC(::grpc::ServerContext* /*context*/, const ::pb::ManageGCRequest* /*request*/, ::pb::ManageGCResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* ManageGC( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* ManageGC( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_RefCount : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_RefCount() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(1, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->RefCount(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_RefCount() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RefCount(::grpc::ServerContext* /*context*/, const ::pb::RefCountRequest* /*request*/, ::pb::RefCountResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* RefCount( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* RefCount( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class WithStreamedUnaryMethod_ManageGC : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_ManageGC() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::StreamedUnaryHandler< ::pb::ManageGCRequest, ::pb::ManageGCResponse>(std::bind(&WithStreamedUnaryMethod_ManageGC::StreamedManageGC, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_ManageGC() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status ManageGC(::grpc::ServerContext* /*context*/, const ::pb::ManageGCRequest* /*request*/, ::pb::ManageGCResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedManageGC(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::pb::ManageGCRequest,::pb::ManageGCResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_RefCount : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_RefCount() { + ::grpc::Service::MarkMethodStreamed(1, + new ::grpc::internal::StreamedUnaryHandler< ::pb::RefCountRequest, ::pb::RefCountResponse>(std::bind(&WithStreamedUnaryMethod_RefCount::StreamedRefCount, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_RefCount() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status RefCount(::grpc::ServerContext* /*context*/, const ::pb::RefCountRequest* /*request*/, ::pb::RefCountResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedRefCount(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::pb::RefCountRequest,::pb::RefCountResponse>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_ManageGC > StreamedUnaryService; + typedef Service SplitStreamedService; + typedef WithStreamedUnaryMethod_ManageGC > StreamedService; +}; + +} // namespace pb + + +#endif // GRPC_admin_2eproto__INCLUDED diff --git a/cpp/admin.pb.cc b/cpp/admin.pb.cc new file mode 100644 index 0000000..d8ae262 --- /dev/null +++ b/cpp/admin.pb.cc @@ -0,0 +1,1119 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: admin.proto + +#include "admin.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include +extern PROTOBUF_INTERNAL_EXPORT_admin_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_RefCountResponse_CidsEntry_DoNotUse_admin_2eproto; +namespace pb { +class ManageGCRequestDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _ManageGCRequest_default_instance_; +class ManageGCResponseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _ManageGCResponse_default_instance_; +class RefCountRequestDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _RefCountRequest_default_instance_; +class RefCountResponse_CidsEntry_DoNotUseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _RefCountResponse_CidsEntry_DoNotUse_default_instance_; +class RefCountResponseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _RefCountResponse_default_instance_; +} // namespace pb +static void InitDefaultsscc_info_ManageGCRequest_admin_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_ManageGCRequest_default_instance_; + new (ptr) ::pb::ManageGCRequest(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::ManageGCRequest::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ManageGCRequest_admin_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_ManageGCRequest_admin_2eproto}, {}}; + +static void InitDefaultsscc_info_ManageGCResponse_admin_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_ManageGCResponse_default_instance_; + new (ptr) ::pb::ManageGCResponse(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::ManageGCResponse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ManageGCResponse_admin_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_ManageGCResponse_admin_2eproto}, {}}; + +static void InitDefaultsscc_info_RefCountRequest_admin_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_RefCountRequest_default_instance_; + new (ptr) ::pb::RefCountRequest(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::RefCountRequest::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_RefCountRequest_admin_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_RefCountRequest_admin_2eproto}, {}}; + +static void InitDefaultsscc_info_RefCountResponse_admin_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_RefCountResponse_default_instance_; + new (ptr) ::pb::RefCountResponse(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::RefCountResponse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_RefCountResponse_admin_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_RefCountResponse_admin_2eproto}, { + &scc_info_RefCountResponse_CidsEntry_DoNotUse_admin_2eproto.base,}}; + +static void InitDefaultsscc_info_RefCountResponse_CidsEntry_DoNotUse_admin_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_RefCountResponse_CidsEntry_DoNotUse_default_instance_; + new (ptr) ::pb::RefCountResponse_CidsEntry_DoNotUse(); + } + ::pb::RefCountResponse_CidsEntry_DoNotUse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_RefCountResponse_CidsEntry_DoNotUse_admin_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_RefCountResponse_CidsEntry_DoNotUse_admin_2eproto}, {}}; + +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_admin_2eproto[5]; +static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_admin_2eproto[3]; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_admin_2eproto = nullptr; + +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_admin_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::ManageGCRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::ManageGCRequest, type_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::ManageGCResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::ManageGCResponse, status_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::RefCountRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::RefCountRequest, cids_), + PROTOBUF_FIELD_OFFSET(::pb::RefCountRequest, limit_), + PROTOBUF_FIELD_OFFSET(::pb::RefCountResponse_CidsEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::pb::RefCountResponse_CidsEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::RefCountResponse_CidsEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::pb::RefCountResponse_CidsEntry_DoNotUse, value_), + 0, + 1, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::RefCountResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::RefCountResponse, cids_), +}; +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(::pb::ManageGCRequest)}, + { 6, -1, sizeof(::pb::ManageGCResponse)}, + { 12, -1, sizeof(::pb::RefCountRequest)}, + { 19, 26, sizeof(::pb::RefCountResponse_CidsEntry_DoNotUse)}, + { 28, -1, sizeof(::pb::RefCountResponse)}, +}; + +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&::pb::_ManageGCRequest_default_instance_), + reinterpret_cast(&::pb::_ManageGCResponse_default_instance_), + reinterpret_cast(&::pb::_RefCountRequest_default_instance_), + reinterpret_cast(&::pb::_RefCountResponse_CidsEntry_DoNotUse_default_instance_), + reinterpret_cast(&::pb::_RefCountResponse_default_instance_), +}; + +const char descriptor_table_protodef_admin_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\013admin.proto\022\002pb\".\n\017ManageGCRequest\022\033\n\004" + "type\030\001 \001(\0162\r.pb.GCREQTYPE\"\"\n\020ManageGCRes" + "ponse\022\016\n\006status\030\001 \001(\t\".\n\017RefCountRequest" + "\022\014\n\004cids\030\001 \003(\t\022\r\n\005limit\030\002 \001(\003\"m\n\020RefCoun" + "tResponse\022,\n\004cids\030\001 \003(\0132\036.pb.RefCountRes" + "ponse.CidsEntry\032+\n\tCidsEntry\022\013\n\003key\030\001 \001(" + "\t\022\r\n\005value\030\002 \001(\003:\0028\001*5\n\tGCREQTYPE\022\014\n\010GC_" + "START\020\000\022\013\n\007GC_STOP\020\001\022\r\n\tGC_STATUS\020\002*/\n\nR" + "EFREQTYPE\022\021\n\rREF_GET_COUNT\020\000\022\016\n\nREF_DELE" + "TE\020\001*\033\n\nREFREQOPTS\022\r\n\tREF_FORCE\020\0002|\n\010Adm" + "inAPI\0227\n\010ManageGC\022\023.pb.ManageGCRequest\032\024" + ".pb.ManageGCResponse\"\000\0227\n\010RefCount\022\023.pb." + "RefCountRequest\032\024.pb.RefCountResponse\"\000b" + "\006proto3" + ; +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_admin_2eproto_deps[1] = { +}; +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_admin_2eproto_sccs[5] = { + &scc_info_ManageGCRequest_admin_2eproto.base, + &scc_info_ManageGCResponse_admin_2eproto.base, + &scc_info_RefCountRequest_admin_2eproto.base, + &scc_info_RefCountResponse_admin_2eproto.base, + &scc_info_RefCountResponse_CidsEntry_DoNotUse_admin_2eproto.base, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_admin_2eproto_once; +static bool descriptor_table_admin_2eproto_initialized = false; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_admin_2eproto = { + &descriptor_table_admin_2eproto_initialized, descriptor_table_protodef_admin_2eproto, "admin.proto", 527, + &descriptor_table_admin_2eproto_once, descriptor_table_admin_2eproto_sccs, descriptor_table_admin_2eproto_deps, 5, 0, + schemas, file_default_instances, TableStruct_admin_2eproto::offsets, + file_level_metadata_admin_2eproto, 5, file_level_enum_descriptors_admin_2eproto, file_level_service_descriptors_admin_2eproto, +}; + +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_admin_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_admin_2eproto), true); +namespace pb { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* GCREQTYPE_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_admin_2eproto); + return file_level_enum_descriptors_admin_2eproto[0]; +} +bool GCREQTYPE_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* REFREQTYPE_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_admin_2eproto); + return file_level_enum_descriptors_admin_2eproto[1]; +} +bool REFREQTYPE_IsValid(int value) { + switch (value) { + case 0: + case 1: + return true; + default: + return false; + } +} + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* REFREQOPTS_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_admin_2eproto); + return file_level_enum_descriptors_admin_2eproto[2]; +} +bool REFREQOPTS_IsValid(int value) { + switch (value) { + case 0: + return true; + default: + return false; + } +} + + +// =================================================================== + +void ManageGCRequest::InitAsDefaultInstance() { +} +class ManageGCRequest::_Internal { + public: +}; + +ManageGCRequest::ManageGCRequest() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.ManageGCRequest) +} +ManageGCRequest::ManageGCRequest(const ManageGCRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + type_ = from.type_; + // @@protoc_insertion_point(copy_constructor:pb.ManageGCRequest) +} + +void ManageGCRequest::SharedCtor() { + type_ = 0; +} + +ManageGCRequest::~ManageGCRequest() { + // @@protoc_insertion_point(destructor:pb.ManageGCRequest) + SharedDtor(); +} + +void ManageGCRequest::SharedDtor() { +} + +void ManageGCRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ManageGCRequest& ManageGCRequest::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ManageGCRequest_admin_2eproto.base); + return *internal_default_instance(); +} + + +void ManageGCRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.ManageGCRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + type_ = 0; + _internal_metadata_.Clear(); +} + +const char* ManageGCRequest::_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) { + // .pb.GCREQTYPE type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + _internal_set_type(static_cast<::pb::GCREQTYPE>(val)); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* ManageGCRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.ManageGCRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .pb.GCREQTYPE type = 1; + if (this->type() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_type(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.ManageGCRequest) + return target; +} + +size_t ManageGCRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.ManageGCRequest) + 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; + + // .pb.GCREQTYPE type = 1; + if (this->type() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_type()); + } + + 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 ManageGCRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.ManageGCRequest) + GOOGLE_DCHECK_NE(&from, this); + const ManageGCRequest* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.ManageGCRequest) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.ManageGCRequest) + MergeFrom(*source); + } +} + +void ManageGCRequest::MergeFrom(const ManageGCRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.ManageGCRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.type() != 0) { + _internal_set_type(from._internal_type()); + } +} + +void ManageGCRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.ManageGCRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ManageGCRequest::CopyFrom(const ManageGCRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.ManageGCRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ManageGCRequest::IsInitialized() const { + return true; +} + +void ManageGCRequest::InternalSwap(ManageGCRequest* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(type_, other->type_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ManageGCRequest::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void ManageGCResponse::InitAsDefaultInstance() { +} +class ManageGCResponse::_Internal { + public: +}; + +ManageGCResponse::ManageGCResponse() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.ManageGCResponse) +} +ManageGCResponse::ManageGCResponse(const ManageGCResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + status_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_status().empty()) { + status_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.status_); + } + // @@protoc_insertion_point(copy_constructor:pb.ManageGCResponse) +} + +void ManageGCResponse::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ManageGCResponse_admin_2eproto.base); + status_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +ManageGCResponse::~ManageGCResponse() { + // @@protoc_insertion_point(destructor:pb.ManageGCResponse) + SharedDtor(); +} + +void ManageGCResponse::SharedDtor() { + status_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void ManageGCResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ManageGCResponse& ManageGCResponse::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ManageGCResponse_admin_2eproto.base); + return *internal_default_instance(); +} + + +void ManageGCResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.ManageGCResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + status_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + _internal_metadata_.Clear(); +} + +const char* ManageGCResponse::_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 status = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_status(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.ManageGCResponse.status")); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* ManageGCResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.ManageGCResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string status = 1; + if (this->status().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_status().data(), static_cast(this->_internal_status().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.ManageGCResponse.status"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_status(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.ManageGCResponse) + return target; +} + +size_t ManageGCResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.ManageGCResponse) + 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 status = 1; + if (this->status().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_status()); + } + + 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 ManageGCResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.ManageGCResponse) + GOOGLE_DCHECK_NE(&from, this); + const ManageGCResponse* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.ManageGCResponse) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.ManageGCResponse) + MergeFrom(*source); + } +} + +void ManageGCResponse::MergeFrom(const ManageGCResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.ManageGCResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.status().size() > 0) { + + status_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.status_); + } +} + +void ManageGCResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.ManageGCResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ManageGCResponse::CopyFrom(const ManageGCResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.ManageGCResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ManageGCResponse::IsInitialized() const { + return true; +} + +void ManageGCResponse::InternalSwap(ManageGCResponse* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + status_.Swap(&other->status_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ManageGCResponse::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void RefCountRequest::InitAsDefaultInstance() { +} +class RefCountRequest::_Internal { + public: +}; + +RefCountRequest::RefCountRequest() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.RefCountRequest) +} +RefCountRequest::RefCountRequest(const RefCountRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr), + cids_(from.cids_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + limit_ = from.limit_; + // @@protoc_insertion_point(copy_constructor:pb.RefCountRequest) +} + +void RefCountRequest::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_RefCountRequest_admin_2eproto.base); + limit_ = PROTOBUF_LONGLONG(0); +} + +RefCountRequest::~RefCountRequest() { + // @@protoc_insertion_point(destructor:pb.RefCountRequest) + SharedDtor(); +} + +void RefCountRequest::SharedDtor() { +} + +void RefCountRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const RefCountRequest& RefCountRequest::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RefCountRequest_admin_2eproto.base); + return *internal_default_instance(); +} + + +void RefCountRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.RefCountRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cids_.Clear(); + limit_ = PROTOBUF_LONGLONG(0); + _internal_metadata_.Clear(); +} + +const char* RefCountRequest::_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) { + // repeated string cids = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_cids(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.RefCountRequest.cids")); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else goto handle_unusual; + continue; + // int64 limit = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + limit_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* RefCountRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.RefCountRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // repeated string cids = 1; + for (int i = 0, n = this->_internal_cids_size(); i < n; i++) { + const auto& s = this->_internal_cids(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.RefCountRequest.cids"); + target = stream->WriteString(1, s, target); + } + + // int64 limit = 2; + if (this->limit() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_limit(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.RefCountRequest) + return target; +} + +size_t RefCountRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.RefCountRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string cids = 1; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(cids_.size()); + for (int i = 0, n = cids_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + cids_.Get(i)); + } + + // int64 limit = 2; + if (this->limit() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( + this->_internal_limit()); + } + + 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 RefCountRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.RefCountRequest) + GOOGLE_DCHECK_NE(&from, this); + const RefCountRequest* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.RefCountRequest) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.RefCountRequest) + MergeFrom(*source); + } +} + +void RefCountRequest::MergeFrom(const RefCountRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.RefCountRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + cids_.MergeFrom(from.cids_); + if (from.limit() != 0) { + _internal_set_limit(from._internal_limit()); + } +} + +void RefCountRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.RefCountRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void RefCountRequest::CopyFrom(const RefCountRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.RefCountRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RefCountRequest::IsInitialized() const { + return true; +} + +void RefCountRequest::InternalSwap(RefCountRequest* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + cids_.InternalSwap(&other->cids_); + swap(limit_, other->limit_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata RefCountRequest::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +RefCountResponse_CidsEntry_DoNotUse::RefCountResponse_CidsEntry_DoNotUse() {} +RefCountResponse_CidsEntry_DoNotUse::RefCountResponse_CidsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void RefCountResponse_CidsEntry_DoNotUse::MergeFrom(const RefCountResponse_CidsEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata RefCountResponse_CidsEntry_DoNotUse::GetMetadata() const { + return GetMetadataStatic(); +} +void RefCountResponse_CidsEntry_DoNotUse::MergeFrom( + const ::PROTOBUF_NAMESPACE_ID::Message& other) { + ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); +} + + +// =================================================================== + +void RefCountResponse::InitAsDefaultInstance() { +} +class RefCountResponse::_Internal { + public: +}; + +RefCountResponse::RefCountResponse() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.RefCountResponse) +} +RefCountResponse::RefCountResponse(const RefCountResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + cids_.MergeFrom(from.cids_); + // @@protoc_insertion_point(copy_constructor:pb.RefCountResponse) +} + +void RefCountResponse::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_RefCountResponse_admin_2eproto.base); +} + +RefCountResponse::~RefCountResponse() { + // @@protoc_insertion_point(destructor:pb.RefCountResponse) + SharedDtor(); +} + +void RefCountResponse::SharedDtor() { +} + +void RefCountResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const RefCountResponse& RefCountResponse::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RefCountResponse_admin_2eproto.base); + return *internal_default_instance(); +} + + +void RefCountResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.RefCountResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cids_.Clear(); + _internal_metadata_.Clear(); +} + +const char* RefCountResponse::_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) { + // map cids = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&cids_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* RefCountResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.RefCountResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // map cids = 1; + if (!this->_internal_cids().empty()) { + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::int64 >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), static_cast(p->first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.RefCountResponse.CidsEntry.key"); + } + }; + + if (stream->IsSerializationDeterministic() && + this->_internal_cids().size() > 1) { + ::std::unique_ptr items( + new SortItem[this->_internal_cids().size()]); + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::int64 >::size_type size_type; + size_type n = 0; + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::int64 >::const_iterator + it = this->_internal_cids().begin(); + it != this->_internal_cids().end(); ++it, ++n) { + items[static_cast(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast(n)], Less()); + for (size_type i = 0; i < n; i++) { + target = RefCountResponse_CidsEntry_DoNotUse::Funcs::InternalSerialize(1, items[static_cast(i)]->first, items[static_cast(i)]->second, target, stream); + Utf8Check::Check(&(*items[static_cast(i)])); + } + } else { + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::int64 >::const_iterator + it = this->_internal_cids().begin(); + it != this->_internal_cids().end(); ++it) { + target = RefCountResponse_CidsEntry_DoNotUse::Funcs::InternalSerialize(1, it->first, it->second, target, stream); + Utf8Check::Check(&(*it)); + } + } + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.RefCountResponse) + return target; +} + +size_t RefCountResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.RefCountResponse) + 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; + + // map cids = 1; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_cids_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::int64 >::const_iterator + it = this->_internal_cids().begin(); + it != this->_internal_cids().end(); ++it) { + total_size += RefCountResponse_CidsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + 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 RefCountResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.RefCountResponse) + GOOGLE_DCHECK_NE(&from, this); + const RefCountResponse* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.RefCountResponse) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.RefCountResponse) + MergeFrom(*source); + } +} + +void RefCountResponse::MergeFrom(const RefCountResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.RefCountResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + cids_.MergeFrom(from.cids_); +} + +void RefCountResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.RefCountResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void RefCountResponse::CopyFrom(const RefCountResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.RefCountResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RefCountResponse::IsInitialized() const { + return true; +} + +void RefCountResponse::InternalSwap(RefCountResponse* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + cids_.Swap(&other->cids_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata RefCountResponse::GetMetadata() const { + return GetMetadataStatic(); +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace pb +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::pb::ManageGCRequest* Arena::CreateMaybeMessage< ::pb::ManageGCRequest >(Arena* arena) { + return Arena::CreateInternal< ::pb::ManageGCRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::ManageGCResponse* Arena::CreateMaybeMessage< ::pb::ManageGCResponse >(Arena* arena) { + return Arena::CreateInternal< ::pb::ManageGCResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::RefCountRequest* Arena::CreateMaybeMessage< ::pb::RefCountRequest >(Arena* arena) { + return Arena::CreateInternal< ::pb::RefCountRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::RefCountResponse_CidsEntry_DoNotUse* Arena::CreateMaybeMessage< ::pb::RefCountResponse_CidsEntry_DoNotUse >(Arena* arena) { + return Arena::CreateInternal< ::pb::RefCountResponse_CidsEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::RefCountResponse* Arena::CreateMaybeMessage< ::pb::RefCountResponse >(Arena* arena) { + return Arena::CreateInternal< ::pb::RefCountResponse >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/cpp/admin.pb.h b/cpp/admin.pb.h new file mode 100644 index 0000000..1757c36 --- /dev/null +++ b/cpp/admin.pb.h @@ -0,0 +1,1020 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: admin.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_admin_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_admin_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3011000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3011002 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_admin_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_admin_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[5] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_admin_2eproto; +namespace pb { +class ManageGCRequest; +class ManageGCRequestDefaultTypeInternal; +extern ManageGCRequestDefaultTypeInternal _ManageGCRequest_default_instance_; +class ManageGCResponse; +class ManageGCResponseDefaultTypeInternal; +extern ManageGCResponseDefaultTypeInternal _ManageGCResponse_default_instance_; +class RefCountRequest; +class RefCountRequestDefaultTypeInternal; +extern RefCountRequestDefaultTypeInternal _RefCountRequest_default_instance_; +class RefCountResponse; +class RefCountResponseDefaultTypeInternal; +extern RefCountResponseDefaultTypeInternal _RefCountResponse_default_instance_; +class RefCountResponse_CidsEntry_DoNotUse; +class RefCountResponse_CidsEntry_DoNotUseDefaultTypeInternal; +extern RefCountResponse_CidsEntry_DoNotUseDefaultTypeInternal _RefCountResponse_CidsEntry_DoNotUse_default_instance_; +} // namespace pb +PROTOBUF_NAMESPACE_OPEN +template<> ::pb::ManageGCRequest* Arena::CreateMaybeMessage<::pb::ManageGCRequest>(Arena*); +template<> ::pb::ManageGCResponse* Arena::CreateMaybeMessage<::pb::ManageGCResponse>(Arena*); +template<> ::pb::RefCountRequest* Arena::CreateMaybeMessage<::pb::RefCountRequest>(Arena*); +template<> ::pb::RefCountResponse* Arena::CreateMaybeMessage<::pb::RefCountResponse>(Arena*); +template<> ::pb::RefCountResponse_CidsEntry_DoNotUse* Arena::CreateMaybeMessage<::pb::RefCountResponse_CidsEntry_DoNotUse>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace pb { + +enum GCREQTYPE : int { + GC_START = 0, + GC_STOP = 1, + GC_STATUS = 2, + GCREQTYPE_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + GCREQTYPE_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() +}; +bool GCREQTYPE_IsValid(int value); +constexpr GCREQTYPE GCREQTYPE_MIN = GC_START; +constexpr GCREQTYPE GCREQTYPE_MAX = GC_STATUS; +constexpr int GCREQTYPE_ARRAYSIZE = GCREQTYPE_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* GCREQTYPE_descriptor(); +template +inline const std::string& GCREQTYPE_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function GCREQTYPE_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + GCREQTYPE_descriptor(), enum_t_value); +} +inline bool GCREQTYPE_Parse( + const std::string& name, GCREQTYPE* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + GCREQTYPE_descriptor(), name, value); +} +enum REFREQTYPE : int { + REF_GET_COUNT = 0, + REF_DELETE = 1, + REFREQTYPE_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + REFREQTYPE_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() +}; +bool REFREQTYPE_IsValid(int value); +constexpr REFREQTYPE REFREQTYPE_MIN = REF_GET_COUNT; +constexpr REFREQTYPE REFREQTYPE_MAX = REF_DELETE; +constexpr int REFREQTYPE_ARRAYSIZE = REFREQTYPE_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* REFREQTYPE_descriptor(); +template +inline const std::string& REFREQTYPE_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function REFREQTYPE_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + REFREQTYPE_descriptor(), enum_t_value); +} +inline bool REFREQTYPE_Parse( + const std::string& name, REFREQTYPE* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + REFREQTYPE_descriptor(), name, value); +} +enum REFREQOPTS : int { + REF_FORCE = 0, + REFREQOPTS_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + REFREQOPTS_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() +}; +bool REFREQOPTS_IsValid(int value); +constexpr REFREQOPTS REFREQOPTS_MIN = REF_FORCE; +constexpr REFREQOPTS REFREQOPTS_MAX = REF_FORCE; +constexpr int REFREQOPTS_ARRAYSIZE = REFREQOPTS_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* REFREQOPTS_descriptor(); +template +inline const std::string& REFREQOPTS_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function REFREQOPTS_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + REFREQOPTS_descriptor(), enum_t_value); +} +inline bool REFREQOPTS_Parse( + const std::string& name, REFREQOPTS* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + REFREQOPTS_descriptor(), name, value); +} +// =================================================================== + +class ManageGCRequest : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.ManageGCRequest) */ { + public: + ManageGCRequest(); + virtual ~ManageGCRequest(); + + ManageGCRequest(const ManageGCRequest& from); + ManageGCRequest(ManageGCRequest&& from) noexcept + : ManageGCRequest() { + *this = ::std::move(from); + } + + inline ManageGCRequest& operator=(const ManageGCRequest& from) { + CopyFrom(from); + return *this; + } + inline ManageGCRequest& operator=(ManageGCRequest&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 ManageGCRequest& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const ManageGCRequest* internal_default_instance() { + return reinterpret_cast( + &_ManageGCRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(ManageGCRequest& a, ManageGCRequest& b) { + a.Swap(&b); + } + inline void Swap(ManageGCRequest* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline ManageGCRequest* New() const final { + return CreateMaybeMessage(nullptr); + } + + ManageGCRequest* 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 ManageGCRequest& from); + void MergeFrom(const ManageGCRequest& 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(ManageGCRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.ManageGCRequest"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_admin_2eproto); + return ::descriptor_table_admin_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTypeFieldNumber = 1, + }; + // .pb.GCREQTYPE type = 1; + void clear_type(); + ::pb::GCREQTYPE type() const; + void set_type(::pb::GCREQTYPE value); + private: + ::pb::GCREQTYPE _internal_type() const; + void _internal_set_type(::pb::GCREQTYPE value); + public: + + // @@protoc_insertion_point(class_scope:pb.ManageGCRequest) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + int type_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_admin_2eproto; +}; +// ------------------------------------------------------------------- + +class ManageGCResponse : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.ManageGCResponse) */ { + public: + ManageGCResponse(); + virtual ~ManageGCResponse(); + + ManageGCResponse(const ManageGCResponse& from); + ManageGCResponse(ManageGCResponse&& from) noexcept + : ManageGCResponse() { + *this = ::std::move(from); + } + + inline ManageGCResponse& operator=(const ManageGCResponse& from) { + CopyFrom(from); + return *this; + } + inline ManageGCResponse& operator=(ManageGCResponse&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 ManageGCResponse& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const ManageGCResponse* internal_default_instance() { + return reinterpret_cast( + &_ManageGCResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(ManageGCResponse& a, ManageGCResponse& b) { + a.Swap(&b); + } + inline void Swap(ManageGCResponse* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline ManageGCResponse* New() const final { + return CreateMaybeMessage(nullptr); + } + + ManageGCResponse* 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 ManageGCResponse& from); + void MergeFrom(const ManageGCResponse& 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(ManageGCResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.ManageGCResponse"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_admin_2eproto); + return ::descriptor_table_admin_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kStatusFieldNumber = 1, + }; + // string status = 1; + void clear_status(); + const std::string& status() const; + void set_status(const std::string& value); + void set_status(std::string&& value); + void set_status(const char* value); + void set_status(const char* value, size_t size); + std::string* mutable_status(); + std::string* release_status(); + void set_allocated_status(std::string* status); + private: + const std::string& _internal_status() const; + void _internal_set_status(const std::string& value); + std::string* _internal_mutable_status(); + public: + + // @@protoc_insertion_point(class_scope:pb.ManageGCResponse) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr status_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_admin_2eproto; +}; +// ------------------------------------------------------------------- + +class RefCountRequest : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.RefCountRequest) */ { + public: + RefCountRequest(); + virtual ~RefCountRequest(); + + RefCountRequest(const RefCountRequest& from); + RefCountRequest(RefCountRequest&& from) noexcept + : RefCountRequest() { + *this = ::std::move(from); + } + + inline RefCountRequest& operator=(const RefCountRequest& from) { + CopyFrom(from); + return *this; + } + inline RefCountRequest& operator=(RefCountRequest&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 RefCountRequest& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const RefCountRequest* internal_default_instance() { + return reinterpret_cast( + &_RefCountRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(RefCountRequest& a, RefCountRequest& b) { + a.Swap(&b); + } + inline void Swap(RefCountRequest* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline RefCountRequest* New() const final { + return CreateMaybeMessage(nullptr); + } + + RefCountRequest* 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 RefCountRequest& from); + void MergeFrom(const RefCountRequest& 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(RefCountRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.RefCountRequest"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_admin_2eproto); + return ::descriptor_table_admin_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kCidsFieldNumber = 1, + kLimitFieldNumber = 2, + }; + // repeated string cids = 1; + int cids_size() const; + private: + int _internal_cids_size() const; + public: + void clear_cids(); + const std::string& cids(int index) const; + std::string* mutable_cids(int index); + void set_cids(int index, const std::string& value); + void set_cids(int index, std::string&& value); + void set_cids(int index, const char* value); + void set_cids(int index, const char* value, size_t size); + std::string* add_cids(); + void add_cids(const std::string& value); + void add_cids(std::string&& value); + void add_cids(const char* value); + void add_cids(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& cids() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_cids(); + private: + const std::string& _internal_cids(int index) const; + std::string* _internal_add_cids(); + public: + + // int64 limit = 2; + void clear_limit(); + ::PROTOBUF_NAMESPACE_ID::int64 limit() const; + void set_limit(::PROTOBUF_NAMESPACE_ID::int64 value); + private: + ::PROTOBUF_NAMESPACE_ID::int64 _internal_limit() const; + void _internal_set_limit(::PROTOBUF_NAMESPACE_ID::int64 value); + public: + + // @@protoc_insertion_point(class_scope:pb.RefCountRequest) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField cids_; + ::PROTOBUF_NAMESPACE_ID::int64 limit_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_admin_2eproto; +}; +// ------------------------------------------------------------------- + +class RefCountResponse_CidsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + RefCountResponse_CidsEntry_DoNotUse(); + RefCountResponse_CidsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const RefCountResponse_CidsEntry_DoNotUse& other); + static const RefCountResponse_CidsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_RefCountResponse_CidsEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "pb.RefCountResponse.CidsEntry.key"); + } + static bool ValidateValue(void*) { return true; } + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& other) final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_admin_2eproto); + return ::descriptor_table_admin_2eproto.file_level_metadata[3]; + } + + public: +}; + +// ------------------------------------------------------------------- + +class RefCountResponse : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.RefCountResponse) */ { + public: + RefCountResponse(); + virtual ~RefCountResponse(); + + RefCountResponse(const RefCountResponse& from); + RefCountResponse(RefCountResponse&& from) noexcept + : RefCountResponse() { + *this = ::std::move(from); + } + + inline RefCountResponse& operator=(const RefCountResponse& from) { + CopyFrom(from); + return *this; + } + inline RefCountResponse& operator=(RefCountResponse&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 RefCountResponse& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const RefCountResponse* internal_default_instance() { + return reinterpret_cast( + &_RefCountResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(RefCountResponse& a, RefCountResponse& b) { + a.Swap(&b); + } + inline void Swap(RefCountResponse* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline RefCountResponse* New() const final { + return CreateMaybeMessage(nullptr); + } + + RefCountResponse* 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 RefCountResponse& from); + void MergeFrom(const RefCountResponse& 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(RefCountResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.RefCountResponse"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_admin_2eproto); + return ::descriptor_table_admin_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kCidsFieldNumber = 1, + }; + // map cids = 1; + int cids_size() const; + private: + int _internal_cids_size() const; + public: + void clear_cids(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::int64 >& + _internal_cids() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::int64 >* + _internal_mutable_cids(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::int64 >& + cids() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::int64 >* + mutable_cids(); + + // @@protoc_insertion_point(class_scope:pb.RefCountResponse) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + RefCountResponse_CidsEntry_DoNotUse, + std::string, ::PROTOBUF_NAMESPACE_ID::int64, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64, + 0 > cids_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_admin_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ManageGCRequest + +// .pb.GCREQTYPE type = 1; +inline void ManageGCRequest::clear_type() { + type_ = 0; +} +inline ::pb::GCREQTYPE ManageGCRequest::_internal_type() const { + return static_cast< ::pb::GCREQTYPE >(type_); +} +inline ::pb::GCREQTYPE ManageGCRequest::type() const { + // @@protoc_insertion_point(field_get:pb.ManageGCRequest.type) + return _internal_type(); +} +inline void ManageGCRequest::_internal_set_type(::pb::GCREQTYPE value) { + + type_ = value; +} +inline void ManageGCRequest::set_type(::pb::GCREQTYPE value) { + _internal_set_type(value); + // @@protoc_insertion_point(field_set:pb.ManageGCRequest.type) +} + +// ------------------------------------------------------------------- + +// ManageGCResponse + +// string status = 1; +inline void ManageGCResponse::clear_status() { + status_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& ManageGCResponse::status() const { + // @@protoc_insertion_point(field_get:pb.ManageGCResponse.status) + return _internal_status(); +} +inline void ManageGCResponse::set_status(const std::string& value) { + _internal_set_status(value); + // @@protoc_insertion_point(field_set:pb.ManageGCResponse.status) +} +inline std::string* ManageGCResponse::mutable_status() { + // @@protoc_insertion_point(field_mutable:pb.ManageGCResponse.status) + return _internal_mutable_status(); +} +inline const std::string& ManageGCResponse::_internal_status() const { + return status_.GetNoArena(); +} +inline void ManageGCResponse::_internal_set_status(const std::string& value) { + + status_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void ManageGCResponse::set_status(std::string&& value) { + + status_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.ManageGCResponse.status) +} +inline void ManageGCResponse::set_status(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + status_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.ManageGCResponse.status) +} +inline void ManageGCResponse::set_status(const char* value, size_t size) { + + status_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.ManageGCResponse.status) +} +inline std::string* ManageGCResponse::_internal_mutable_status() { + + return status_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* ManageGCResponse::release_status() { + // @@protoc_insertion_point(field_release:pb.ManageGCResponse.status) + + return status_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void ManageGCResponse::set_allocated_status(std::string* status) { + if (status != nullptr) { + + } else { + + } + status_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), status); + // @@protoc_insertion_point(field_set_allocated:pb.ManageGCResponse.status) +} + +// ------------------------------------------------------------------- + +// RefCountRequest + +// repeated string cids = 1; +inline int RefCountRequest::_internal_cids_size() const { + return cids_.size(); +} +inline int RefCountRequest::cids_size() const { + return _internal_cids_size(); +} +inline void RefCountRequest::clear_cids() { + cids_.Clear(); +} +inline std::string* RefCountRequest::add_cids() { + // @@protoc_insertion_point(field_add_mutable:pb.RefCountRequest.cids) + return _internal_add_cids(); +} +inline const std::string& RefCountRequest::_internal_cids(int index) const { + return cids_.Get(index); +} +inline const std::string& RefCountRequest::cids(int index) const { + // @@protoc_insertion_point(field_get:pb.RefCountRequest.cids) + return _internal_cids(index); +} +inline std::string* RefCountRequest::mutable_cids(int index) { + // @@protoc_insertion_point(field_mutable:pb.RefCountRequest.cids) + return cids_.Mutable(index); +} +inline void RefCountRequest::set_cids(int index, const std::string& value) { + // @@protoc_insertion_point(field_set:pb.RefCountRequest.cids) + cids_.Mutable(index)->assign(value); +} +inline void RefCountRequest::set_cids(int index, std::string&& value) { + // @@protoc_insertion_point(field_set:pb.RefCountRequest.cids) + cids_.Mutable(index)->assign(std::move(value)); +} +inline void RefCountRequest::set_cids(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + cids_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:pb.RefCountRequest.cids) +} +inline void RefCountRequest::set_cids(int index, const char* value, size_t size) { + cids_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:pb.RefCountRequest.cids) +} +inline std::string* RefCountRequest::_internal_add_cids() { + return cids_.Add(); +} +inline void RefCountRequest::add_cids(const std::string& value) { + cids_.Add()->assign(value); + // @@protoc_insertion_point(field_add:pb.RefCountRequest.cids) +} +inline void RefCountRequest::add_cids(std::string&& value) { + cids_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:pb.RefCountRequest.cids) +} +inline void RefCountRequest::add_cids(const char* value) { + GOOGLE_DCHECK(value != nullptr); + cids_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:pb.RefCountRequest.cids) +} +inline void RefCountRequest::add_cids(const char* value, size_t size) { + cids_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:pb.RefCountRequest.cids) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +RefCountRequest::cids() const { + // @@protoc_insertion_point(field_list:pb.RefCountRequest.cids) + return cids_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +RefCountRequest::mutable_cids() { + // @@protoc_insertion_point(field_mutable_list:pb.RefCountRequest.cids) + return &cids_; +} + +// int64 limit = 2; +inline void RefCountRequest::clear_limit() { + limit_ = PROTOBUF_LONGLONG(0); +} +inline ::PROTOBUF_NAMESPACE_ID::int64 RefCountRequest::_internal_limit() const { + return limit_; +} +inline ::PROTOBUF_NAMESPACE_ID::int64 RefCountRequest::limit() const { + // @@protoc_insertion_point(field_get:pb.RefCountRequest.limit) + return _internal_limit(); +} +inline void RefCountRequest::_internal_set_limit(::PROTOBUF_NAMESPACE_ID::int64 value) { + + limit_ = value; +} +inline void RefCountRequest::set_limit(::PROTOBUF_NAMESPACE_ID::int64 value) { + _internal_set_limit(value); + // @@protoc_insertion_point(field_set:pb.RefCountRequest.limit) +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// RefCountResponse + +// map cids = 1; +inline int RefCountResponse::_internal_cids_size() const { + return cids_.size(); +} +inline int RefCountResponse::cids_size() const { + return _internal_cids_size(); +} +inline void RefCountResponse::clear_cids() { + cids_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::int64 >& +RefCountResponse::_internal_cids() const { + return cids_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::int64 >& +RefCountResponse::cids() const { + // @@protoc_insertion_point(field_map:pb.RefCountResponse.cids) + return _internal_cids(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::int64 >* +RefCountResponse::_internal_mutable_cids() { + return cids_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::int64 >* +RefCountResponse::mutable_cids() { + // @@protoc_insertion_point(field_mutable_map:pb.RefCountResponse.cids) + return _internal_mutable_cids(); +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace pb + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::pb::GCREQTYPE> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::pb::GCREQTYPE>() { + return ::pb::GCREQTYPE_descriptor(); +} +template <> struct is_proto_enum< ::pb::REFREQTYPE> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::pb::REFREQTYPE>() { + return ::pb::REFREQTYPE_descriptor(); +} +template <> struct is_proto_enum< ::pb::REFREQOPTS> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::pb::REFREQOPTS>() { + return ::pb::REFREQOPTS_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_admin_2eproto diff --git a/cpp/file.grpc.pb.cc b/cpp/file.grpc.pb.cc new file mode 100644 index 0000000..ddb3cce --- /dev/null +++ b/cpp/file.grpc.pb.cc @@ -0,0 +1,104 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: file.proto + +#include "file.pb.h" +#include "file.grpc.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace pb { + +static const char* FileAPI_method_names[] = { + "/pb.FileAPI/UploadFile", + "/pb.FileAPI/DownloadFile", +}; + +std::unique_ptr< FileAPI::Stub> FileAPI::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< FileAPI::Stub> stub(new FileAPI::Stub(channel)); + return stub; +} + +FileAPI::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel) + : channel_(channel), rpcmethod_UploadFile_(FileAPI_method_names[0], ::grpc::internal::RpcMethod::CLIENT_STREAMING, channel) + , rpcmethod_DownloadFile_(FileAPI_method_names[1], ::grpc::internal::RpcMethod::SERVER_STREAMING, channel) + {} + +::grpc::ClientWriter< ::pb::UploadRequest>* FileAPI::Stub::UploadFileRaw(::grpc::ClientContext* context, ::pb::PutResponse* response) { + return ::grpc_impl::internal::ClientWriterFactory< ::pb::UploadRequest>::Create(channel_.get(), rpcmethod_UploadFile_, context, response); +} + +void FileAPI::Stub::experimental_async::UploadFile(::grpc::ClientContext* context, ::pb::PutResponse* response, ::grpc::experimental::ClientWriteReactor< ::pb::UploadRequest>* reactor) { + ::grpc_impl::internal::ClientCallbackWriterFactory< ::pb::UploadRequest>::Create(stub_->channel_.get(), stub_->rpcmethod_UploadFile_, context, response, reactor); +} + +::grpc::ClientAsyncWriter< ::pb::UploadRequest>* FileAPI::Stub::AsyncUploadFileRaw(::grpc::ClientContext* context, ::pb::PutResponse* response, ::grpc::CompletionQueue* cq, void* tag) { + return ::grpc_impl::internal::ClientAsyncWriterFactory< ::pb::UploadRequest>::Create(channel_.get(), cq, rpcmethod_UploadFile_, context, response, true, tag); +} + +::grpc::ClientAsyncWriter< ::pb::UploadRequest>* FileAPI::Stub::PrepareAsyncUploadFileRaw(::grpc::ClientContext* context, ::pb::PutResponse* response, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncWriterFactory< ::pb::UploadRequest>::Create(channel_.get(), cq, rpcmethod_UploadFile_, context, response, false, nullptr); +} + +::grpc::ClientReader< ::pb::DownloadResponse>* FileAPI::Stub::DownloadFileRaw(::grpc::ClientContext* context, const ::pb::DownloadRequest& request) { + return ::grpc_impl::internal::ClientReaderFactory< ::pb::DownloadResponse>::Create(channel_.get(), rpcmethod_DownloadFile_, context, request); +} + +void FileAPI::Stub::experimental_async::DownloadFile(::grpc::ClientContext* context, ::pb::DownloadRequest* request, ::grpc::experimental::ClientReadReactor< ::pb::DownloadResponse>* reactor) { + ::grpc_impl::internal::ClientCallbackReaderFactory< ::pb::DownloadResponse>::Create(stub_->channel_.get(), stub_->rpcmethod_DownloadFile_, context, request, reactor); +} + +::grpc::ClientAsyncReader< ::pb::DownloadResponse>* FileAPI::Stub::AsyncDownloadFileRaw(::grpc::ClientContext* context, const ::pb::DownloadRequest& request, ::grpc::CompletionQueue* cq, void* tag) { + return ::grpc_impl::internal::ClientAsyncReaderFactory< ::pb::DownloadResponse>::Create(channel_.get(), cq, rpcmethod_DownloadFile_, context, request, true, tag); +} + +::grpc::ClientAsyncReader< ::pb::DownloadResponse>* FileAPI::Stub::PrepareAsyncDownloadFileRaw(::grpc::ClientContext* context, const ::pb::DownloadRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncReaderFactory< ::pb::DownloadResponse>::Create(channel_.get(), cq, rpcmethod_DownloadFile_, context, request, false, nullptr); +} + +FileAPI::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + FileAPI_method_names[0], + ::grpc::internal::RpcMethod::CLIENT_STREAMING, + new ::grpc::internal::ClientStreamingHandler< FileAPI::Service, ::pb::UploadRequest, ::pb::PutResponse>( + std::mem_fn(&FileAPI::Service::UploadFile), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + FileAPI_method_names[1], + ::grpc::internal::RpcMethod::SERVER_STREAMING, + new ::grpc::internal::ServerStreamingHandler< FileAPI::Service, ::pb::DownloadRequest, ::pb::DownloadResponse>( + std::mem_fn(&FileAPI::Service::DownloadFile), this))); +} + +FileAPI::Service::~Service() { +} + +::grpc::Status FileAPI::Service::UploadFile(::grpc::ServerContext* context, ::grpc::ServerReader< ::pb::UploadRequest>* reader, ::pb::PutResponse* response) { + (void) context; + (void) reader; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status FileAPI::Service::DownloadFile(::grpc::ServerContext* context, const ::pb::DownloadRequest* request, ::grpc::ServerWriter< ::pb::DownloadResponse>* writer) { + (void) context; + (void) request; + (void) writer; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +} // namespace pb + diff --git a/cpp/file.grpc.pb.h b/cpp/file.grpc.pb.h new file mode 100644 index 0000000..6b705ad --- /dev/null +++ b/cpp/file.grpc.pb.h @@ -0,0 +1,456 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: file.proto +#ifndef GRPC_file_2eproto__INCLUDED +#define GRPC_file_2eproto__INCLUDED + +#include "file.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace pb { + +// FileAPI provides a gRPC api to upload/download files as UnixFS objects +class FileAPI final { + public: + static constexpr char const* service_full_name() { + return "pb.FileAPI"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + // UploadFile allows uploading a file as a UnixFS object (equivalent to ipfs add) + std::unique_ptr< ::grpc::ClientWriterInterface< ::pb::UploadRequest>> UploadFile(::grpc::ClientContext* context, ::pb::PutResponse* response) { + return std::unique_ptr< ::grpc::ClientWriterInterface< ::pb::UploadRequest>>(UploadFileRaw(context, response)); + } + std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::pb::UploadRequest>> AsyncUploadFile(::grpc::ClientContext* context, ::pb::PutResponse* response, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::pb::UploadRequest>>(AsyncUploadFileRaw(context, response, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::pb::UploadRequest>> PrepareAsyncUploadFile(::grpc::ClientContext* context, ::pb::PutResponse* response, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::pb::UploadRequest>>(PrepareAsyncUploadFileRaw(context, response, cq)); + } + // DownloadFile allows downloading a UnixFS object (equivalent to ipfs get) + std::unique_ptr< ::grpc::ClientReaderInterface< ::pb::DownloadResponse>> DownloadFile(::grpc::ClientContext* context, const ::pb::DownloadRequest& request) { + return std::unique_ptr< ::grpc::ClientReaderInterface< ::pb::DownloadResponse>>(DownloadFileRaw(context, request)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::pb::DownloadResponse>> AsyncDownloadFile(::grpc::ClientContext* context, const ::pb::DownloadRequest& request, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::pb::DownloadResponse>>(AsyncDownloadFileRaw(context, request, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::pb::DownloadResponse>> PrepareAsyncDownloadFile(::grpc::ClientContext* context, const ::pb::DownloadRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::pb::DownloadResponse>>(PrepareAsyncDownloadFileRaw(context, request, cq)); + } + class experimental_async_interface { + public: + virtual ~experimental_async_interface() {} + // UploadFile allows uploading a file as a UnixFS object (equivalent to ipfs add) + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void UploadFile(::grpc::ClientContext* context, ::pb::PutResponse* response, ::grpc::ClientWriteReactor< ::pb::UploadRequest>* reactor) = 0; + #else + virtual void UploadFile(::grpc::ClientContext* context, ::pb::PutResponse* response, ::grpc::experimental::ClientWriteReactor< ::pb::UploadRequest>* reactor) = 0; + #endif + // DownloadFile allows downloading a UnixFS object (equivalent to ipfs get) + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void DownloadFile(::grpc::ClientContext* context, ::pb::DownloadRequest* request, ::grpc::ClientReadReactor< ::pb::DownloadResponse>* reactor) = 0; + #else + virtual void DownloadFile(::grpc::ClientContext* context, ::pb::DownloadRequest* request, ::grpc::experimental::ClientReadReactor< ::pb::DownloadResponse>* reactor) = 0; + #endif + }; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + typedef class experimental_async_interface async_interface; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + async_interface* async() { return experimental_async(); } + #endif + virtual class experimental_async_interface* experimental_async() { return nullptr; } + private: + virtual ::grpc::ClientWriterInterface< ::pb::UploadRequest>* UploadFileRaw(::grpc::ClientContext* context, ::pb::PutResponse* response) = 0; + virtual ::grpc::ClientAsyncWriterInterface< ::pb::UploadRequest>* AsyncUploadFileRaw(::grpc::ClientContext* context, ::pb::PutResponse* response, ::grpc::CompletionQueue* cq, void* tag) = 0; + virtual ::grpc::ClientAsyncWriterInterface< ::pb::UploadRequest>* PrepareAsyncUploadFileRaw(::grpc::ClientContext* context, ::pb::PutResponse* response, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientReaderInterface< ::pb::DownloadResponse>* DownloadFileRaw(::grpc::ClientContext* context, const ::pb::DownloadRequest& request) = 0; + virtual ::grpc::ClientAsyncReaderInterface< ::pb::DownloadResponse>* AsyncDownloadFileRaw(::grpc::ClientContext* context, const ::pb::DownloadRequest& request, ::grpc::CompletionQueue* cq, void* tag) = 0; + virtual ::grpc::ClientAsyncReaderInterface< ::pb::DownloadResponse>* PrepareAsyncDownloadFileRaw(::grpc::ClientContext* context, const ::pb::DownloadRequest& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel); + std::unique_ptr< ::grpc::ClientWriter< ::pb::UploadRequest>> UploadFile(::grpc::ClientContext* context, ::pb::PutResponse* response) { + return std::unique_ptr< ::grpc::ClientWriter< ::pb::UploadRequest>>(UploadFileRaw(context, response)); + } + std::unique_ptr< ::grpc::ClientAsyncWriter< ::pb::UploadRequest>> AsyncUploadFile(::grpc::ClientContext* context, ::pb::PutResponse* response, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncWriter< ::pb::UploadRequest>>(AsyncUploadFileRaw(context, response, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncWriter< ::pb::UploadRequest>> PrepareAsyncUploadFile(::grpc::ClientContext* context, ::pb::PutResponse* response, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncWriter< ::pb::UploadRequest>>(PrepareAsyncUploadFileRaw(context, response, cq)); + } + std::unique_ptr< ::grpc::ClientReader< ::pb::DownloadResponse>> DownloadFile(::grpc::ClientContext* context, const ::pb::DownloadRequest& request) { + return std::unique_ptr< ::grpc::ClientReader< ::pb::DownloadResponse>>(DownloadFileRaw(context, request)); + } + std::unique_ptr< ::grpc::ClientAsyncReader< ::pb::DownloadResponse>> AsyncDownloadFile(::grpc::ClientContext* context, const ::pb::DownloadRequest& request, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReader< ::pb::DownloadResponse>>(AsyncDownloadFileRaw(context, request, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReader< ::pb::DownloadResponse>> PrepareAsyncDownloadFile(::grpc::ClientContext* context, const ::pb::DownloadRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReader< ::pb::DownloadResponse>>(PrepareAsyncDownloadFileRaw(context, request, cq)); + } + class experimental_async final : + public StubInterface::experimental_async_interface { + public: + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void UploadFile(::grpc::ClientContext* context, ::pb::PutResponse* response, ::grpc::ClientWriteReactor< ::pb::UploadRequest>* reactor) override; + #else + void UploadFile(::grpc::ClientContext* context, ::pb::PutResponse* response, ::grpc::experimental::ClientWriteReactor< ::pb::UploadRequest>* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void DownloadFile(::grpc::ClientContext* context, ::pb::DownloadRequest* request, ::grpc::ClientReadReactor< ::pb::DownloadResponse>* reactor) override; + #else + void DownloadFile(::grpc::ClientContext* context, ::pb::DownloadRequest* request, ::grpc::experimental::ClientReadReactor< ::pb::DownloadResponse>* reactor) override; + #endif + private: + friend class Stub; + explicit experimental_async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class experimental_async_interface* experimental_async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class experimental_async async_stub_{this}; + ::grpc::ClientWriter< ::pb::UploadRequest>* UploadFileRaw(::grpc::ClientContext* context, ::pb::PutResponse* response) override; + ::grpc::ClientAsyncWriter< ::pb::UploadRequest>* AsyncUploadFileRaw(::grpc::ClientContext* context, ::pb::PutResponse* response, ::grpc::CompletionQueue* cq, void* tag) override; + ::grpc::ClientAsyncWriter< ::pb::UploadRequest>* PrepareAsyncUploadFileRaw(::grpc::ClientContext* context, ::pb::PutResponse* response, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientReader< ::pb::DownloadResponse>* DownloadFileRaw(::grpc::ClientContext* context, const ::pb::DownloadRequest& request) override; + ::grpc::ClientAsyncReader< ::pb::DownloadResponse>* AsyncDownloadFileRaw(::grpc::ClientContext* context, const ::pb::DownloadRequest& request, ::grpc::CompletionQueue* cq, void* tag) override; + ::grpc::ClientAsyncReader< ::pb::DownloadResponse>* PrepareAsyncDownloadFileRaw(::grpc::ClientContext* context, const ::pb::DownloadRequest& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_UploadFile_; + const ::grpc::internal::RpcMethod rpcmethod_DownloadFile_; + }; + static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + + class Service : public ::grpc::Service { + public: + Service(); + virtual ~Service(); + // UploadFile allows uploading a file as a UnixFS object (equivalent to ipfs add) + virtual ::grpc::Status UploadFile(::grpc::ServerContext* context, ::grpc::ServerReader< ::pb::UploadRequest>* reader, ::pb::PutResponse* response); + // DownloadFile allows downloading a UnixFS object (equivalent to ipfs get) + virtual ::grpc::Status DownloadFile(::grpc::ServerContext* context, const ::pb::DownloadRequest* request, ::grpc::ServerWriter< ::pb::DownloadResponse>* writer); + }; + template + class WithAsyncMethod_UploadFile : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_UploadFile() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_UploadFile() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status UploadFile(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::pb::UploadRequest>* /*reader*/, ::pb::PutResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestUploadFile(::grpc::ServerContext* context, ::grpc::ServerAsyncReader< ::pb::PutResponse, ::pb::UploadRequest>* reader, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncClientStreaming(0, context, reader, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_DownloadFile : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_DownloadFile() { + ::grpc::Service::MarkMethodAsync(1); + } + ~WithAsyncMethod_DownloadFile() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status DownloadFile(::grpc::ServerContext* /*context*/, const ::pb::DownloadRequest* /*request*/, ::grpc::ServerWriter< ::pb::DownloadResponse>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestDownloadFile(::grpc::ServerContext* context, ::pb::DownloadRequest* request, ::grpc::ServerAsyncWriter< ::pb::DownloadResponse>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncServerStreaming(1, context, request, writer, new_call_cq, notification_cq, tag); + } + }; + typedef WithAsyncMethod_UploadFile > AsyncService; + template + class ExperimentalWithCallbackMethod_UploadFile : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_UploadFile() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(0, + new ::grpc_impl::internal::CallbackClientStreamingHandler< ::pb::UploadRequest, ::pb::PutResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, ::pb::PutResponse* response) { return this->UploadFile(context, response); })); + } + ~ExperimentalWithCallbackMethod_UploadFile() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status UploadFile(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::pb::UploadRequest>* /*reader*/, ::pb::PutResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerReadReactor< ::pb::UploadRequest>* UploadFile( + ::grpc::CallbackServerContext* /*context*/, ::pb::PutResponse* /*response*/) + #else + virtual ::grpc::experimental::ServerReadReactor< ::pb::UploadRequest>* UploadFile( + ::grpc::experimental::CallbackServerContext* /*context*/, ::pb::PutResponse* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_DownloadFile : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_DownloadFile() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(1, + new ::grpc_impl::internal::CallbackServerStreamingHandler< ::pb::DownloadRequest, ::pb::DownloadResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::pb::DownloadRequest* request) { return this->DownloadFile(context, request); })); + } + ~ExperimentalWithCallbackMethod_DownloadFile() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status DownloadFile(::grpc::ServerContext* /*context*/, const ::pb::DownloadRequest* /*request*/, ::grpc::ServerWriter< ::pb::DownloadResponse>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerWriteReactor< ::pb::DownloadResponse>* DownloadFile( + ::grpc::CallbackServerContext* /*context*/, const ::pb::DownloadRequest* /*request*/) + #else + virtual ::grpc::experimental::ServerWriteReactor< ::pb::DownloadResponse>* DownloadFile( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::pb::DownloadRequest* /*request*/) + #endif + { return nullptr; } + }; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + typedef ExperimentalWithCallbackMethod_UploadFile > CallbackService; + #endif + + typedef ExperimentalWithCallbackMethod_UploadFile > ExperimentalCallbackService; + template + class WithGenericMethod_UploadFile : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_UploadFile() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_UploadFile() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status UploadFile(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::pb::UploadRequest>* /*reader*/, ::pb::PutResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_DownloadFile : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_DownloadFile() { + ::grpc::Service::MarkMethodGeneric(1); + } + ~WithGenericMethod_DownloadFile() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status DownloadFile(::grpc::ServerContext* /*context*/, const ::pb::DownloadRequest* /*request*/, ::grpc::ServerWriter< ::pb::DownloadResponse>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_UploadFile : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_UploadFile() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_UploadFile() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status UploadFile(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::pb::UploadRequest>* /*reader*/, ::pb::PutResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestUploadFile(::grpc::ServerContext* context, ::grpc::ServerAsyncReader< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* reader, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncClientStreaming(0, context, reader, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_DownloadFile : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_DownloadFile() { + ::grpc::Service::MarkMethodRaw(1); + } + ~WithRawMethod_DownloadFile() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status DownloadFile(::grpc::ServerContext* /*context*/, const ::pb::DownloadRequest* /*request*/, ::grpc::ServerWriter< ::pb::DownloadResponse>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestDownloadFile(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncServerStreaming(1, context, request, writer, new_call_cq, notification_cq, tag); + } + }; + template + class ExperimentalWithRawCallbackMethod_UploadFile : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_UploadFile() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(0, + new ::grpc_impl::internal::CallbackClientStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, ::grpc::ByteBuffer* response) { return this->UploadFile(context, response); })); + } + ~ExperimentalWithRawCallbackMethod_UploadFile() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status UploadFile(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::pb::UploadRequest>* /*reader*/, ::pb::PutResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerReadReactor< ::grpc::ByteBuffer>* UploadFile( + ::grpc::CallbackServerContext* /*context*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerReadReactor< ::grpc::ByteBuffer>* UploadFile( + ::grpc::experimental::CallbackServerContext* /*context*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_DownloadFile : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_DownloadFile() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(1, + new ::grpc_impl::internal::CallbackServerStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const::grpc::ByteBuffer* request) { return this->DownloadFile(context, request); })); + } + ~ExperimentalWithRawCallbackMethod_DownloadFile() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status DownloadFile(::grpc::ServerContext* /*context*/, const ::pb::DownloadRequest* /*request*/, ::grpc::ServerWriter< ::pb::DownloadResponse>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerWriteReactor< ::grpc::ByteBuffer>* DownloadFile( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/) + #else + virtual ::grpc::experimental::ServerWriteReactor< ::grpc::ByteBuffer>* DownloadFile( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/) + #endif + { return nullptr; } + }; + typedef Service StreamedUnaryService; + template + class WithSplitStreamingMethod_DownloadFile : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithSplitStreamingMethod_DownloadFile() { + ::grpc::Service::MarkMethodStreamed(1, + new ::grpc::internal::SplitServerStreamingHandler< ::pb::DownloadRequest, ::pb::DownloadResponse>(std::bind(&WithSplitStreamingMethod_DownloadFile::StreamedDownloadFile, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithSplitStreamingMethod_DownloadFile() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status DownloadFile(::grpc::ServerContext* /*context*/, const ::pb::DownloadRequest* /*request*/, ::grpc::ServerWriter< ::pb::DownloadResponse>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with split streamed + virtual ::grpc::Status StreamedDownloadFile(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::pb::DownloadRequest,::pb::DownloadResponse>* server_split_streamer) = 0; + }; + typedef WithSplitStreamingMethod_DownloadFile SplitStreamedService; + typedef WithSplitStreamingMethod_DownloadFile StreamedService; +}; + +} // namespace pb + + +#endif // GRPC_file_2eproto__INCLUDED diff --git a/cpp/file.pb.cc b/cpp/file.pb.cc new file mode 100644 index 0000000..868a375 --- /dev/null +++ b/cpp/file.pb.cc @@ -0,0 +1,1494 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: file.proto + +#include "file.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include +extern PROTOBUF_INTERNAL_EXPORT_file_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Blob_file_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_file_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_UploadOptions_file_2eproto; +namespace pb { +class UploadRequestDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _UploadRequest_default_instance_; +class UploadOptionsDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _UploadOptions_default_instance_; +class DownloadRequestDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _DownloadRequest_default_instance_; +class DownloadResponseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _DownloadResponse_default_instance_; +class BlobDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Blob_default_instance_; +} // namespace pb +static void InitDefaultsscc_info_Blob_file_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_Blob_default_instance_; + new (ptr) ::pb::Blob(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::Blob::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Blob_file_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Blob_file_2eproto}, {}}; + +static void InitDefaultsscc_info_DownloadRequest_file_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_DownloadRequest_default_instance_; + new (ptr) ::pb::DownloadRequest(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::DownloadRequest::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_DownloadRequest_file_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_DownloadRequest_file_2eproto}, {}}; + +static void InitDefaultsscc_info_DownloadResponse_file_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_DownloadResponse_default_instance_; + new (ptr) ::pb::DownloadResponse(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::DownloadResponse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_DownloadResponse_file_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_DownloadResponse_file_2eproto}, { + &scc_info_Blob_file_2eproto.base,}}; + +static void InitDefaultsscc_info_UploadOptions_file_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_UploadOptions_default_instance_; + new (ptr) ::pb::UploadOptions(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::UploadOptions::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_UploadOptions_file_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_UploadOptions_file_2eproto}, {}}; + +static void InitDefaultsscc_info_UploadRequest_file_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_UploadRequest_default_instance_; + new (ptr) ::pb::UploadRequest(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::UploadRequest::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_UploadRequest_file_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_UploadRequest_file_2eproto}, { + &scc_info_Blob_file_2eproto.base, + &scc_info_UploadOptions_file_2eproto.base,}}; + +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_file_2eproto[5]; +static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_file_2eproto = nullptr; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_file_2eproto = nullptr; + +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_file_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::UploadRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::UploadRequest, blob_), + PROTOBUF_FIELD_OFFSET(::pb::UploadRequest, options_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::UploadOptions, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::UploadOptions, multihash_), + PROTOBUF_FIELD_OFFSET(::pb::UploadOptions, layout_), + PROTOBUF_FIELD_OFFSET(::pb::UploadOptions, chunker_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::DownloadRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::DownloadRequest, hash_), + PROTOBUF_FIELD_OFFSET(::pb::DownloadRequest, chunksize_), + PROTOBUF_FIELD_OFFSET(::pb::DownloadRequest, rangestart_), + PROTOBUF_FIELD_OFFSET(::pb::DownloadRequest, rangeend_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::DownloadResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::DownloadResponse, blob_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::Blob, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::Blob, content_), + PROTOBUF_FIELD_OFFSET(::pb::Blob, rangestart_), + PROTOBUF_FIELD_OFFSET(::pb::Blob, rangeend_), +}; +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(::pb::UploadRequest)}, + { 7, -1, sizeof(::pb::UploadOptions)}, + { 15, -1, sizeof(::pb::DownloadRequest)}, + { 24, -1, sizeof(::pb::DownloadResponse)}, + { 30, -1, sizeof(::pb::Blob)}, +}; + +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&::pb::_UploadRequest_default_instance_), + reinterpret_cast(&::pb::_UploadOptions_default_instance_), + reinterpret_cast(&::pb::_DownloadRequest_default_instance_), + reinterpret_cast(&::pb::_DownloadResponse_default_instance_), + reinterpret_cast(&::pb::_Blob_default_instance_), +}; + +const char descriptor_table_protodef_file_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\nfile.proto\022\002pb\032\nutil.proto\"K\n\rUploadRe" + "quest\022\026\n\004blob\030\001 \001(\0132\010.pb.Blob\022\"\n\007options" + "\030\002 \001(\0132\021.pb.UploadOptions\"C\n\rUploadOptio" + "ns\022\021\n\tmultiHash\030\001 \001(\t\022\016\n\006layout\030\002 \001(\t\022\017\n" + "\007chunker\030\003 \001(\t\"X\n\017DownloadRequest\022\014\n\004has" + "h\030\001 \001(\t\022\021\n\tchunkSize\030\002 \001(\005\022\022\n\nrangeStart" + "\030\003 \001(\004\022\020\n\010rangeEnd\030\004 \001(\004\"*\n\020DownloadResp" + "onse\022\026\n\004blob\030\001 \001(\0132\010.pb.Blob\"=\n\004Blob\022\017\n\007" + "content\030\001 \001(\014\022\022\n\nrangeStart\030\002 \001(\004\022\020\n\010ran" + "geEnd\030\003 \001(\0042~\n\007FileAPI\0224\n\nUploadFile\022\021.p" + "b.UploadRequest\032\017.pb.PutResponse\"\000(\001\022=\n\014" + "DownloadFile\022\023.pb.DownloadRequest\032\024.pb.D" + "ownloadResponse\"\0000\001b\006proto3" + ; +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_file_2eproto_deps[1] = { + &::descriptor_table_util_2eproto, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_file_2eproto_sccs[5] = { + &scc_info_Blob_file_2eproto.base, + &scc_info_DownloadRequest_file_2eproto.base, + &scc_info_DownloadResponse_file_2eproto.base, + &scc_info_UploadOptions_file_2eproto.base, + &scc_info_UploadRequest_file_2eproto.base, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_file_2eproto_once; +static bool descriptor_table_file_2eproto_initialized = false; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_file_2eproto = { + &descriptor_table_file_2eproto_initialized, descriptor_table_protodef_file_2eproto, "file.proto", 507, + &descriptor_table_file_2eproto_once, descriptor_table_file_2eproto_sccs, descriptor_table_file_2eproto_deps, 5, 1, + schemas, file_default_instances, TableStruct_file_2eproto::offsets, + file_level_metadata_file_2eproto, 5, file_level_enum_descriptors_file_2eproto, file_level_service_descriptors_file_2eproto, +}; + +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_file_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_file_2eproto), true); +namespace pb { + +// =================================================================== + +void UploadRequest::InitAsDefaultInstance() { + ::pb::_UploadRequest_default_instance_._instance.get_mutable()->blob_ = const_cast< ::pb::Blob*>( + ::pb::Blob::internal_default_instance()); + ::pb::_UploadRequest_default_instance_._instance.get_mutable()->options_ = const_cast< ::pb::UploadOptions*>( + ::pb::UploadOptions::internal_default_instance()); +} +class UploadRequest::_Internal { + public: + static const ::pb::Blob& blob(const UploadRequest* msg); + static const ::pb::UploadOptions& options(const UploadRequest* msg); +}; + +const ::pb::Blob& +UploadRequest::_Internal::blob(const UploadRequest* msg) { + return *msg->blob_; +} +const ::pb::UploadOptions& +UploadRequest::_Internal::options(const UploadRequest* msg) { + return *msg->options_; +} +UploadRequest::UploadRequest() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.UploadRequest) +} +UploadRequest::UploadRequest(const UploadRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_blob()) { + blob_ = new ::pb::Blob(*from.blob_); + } else { + blob_ = nullptr; + } + if (from._internal_has_options()) { + options_ = new ::pb::UploadOptions(*from.options_); + } else { + options_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:pb.UploadRequest) +} + +void UploadRequest::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_UploadRequest_file_2eproto.base); + ::memset(&blob_, 0, static_cast( + reinterpret_cast(&options_) - + reinterpret_cast(&blob_)) + sizeof(options_)); +} + +UploadRequest::~UploadRequest() { + // @@protoc_insertion_point(destructor:pb.UploadRequest) + SharedDtor(); +} + +void UploadRequest::SharedDtor() { + if (this != internal_default_instance()) delete blob_; + if (this != internal_default_instance()) delete options_; +} + +void UploadRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const UploadRequest& UploadRequest::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_UploadRequest_file_2eproto.base); + return *internal_default_instance(); +} + + +void UploadRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.UploadRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaNoVirtual() == nullptr && blob_ != nullptr) { + delete blob_; + } + blob_ = nullptr; + if (GetArenaNoVirtual() == nullptr && options_ != nullptr) { + delete options_; + } + options_ = nullptr; + _internal_metadata_.Clear(); +} + +const char* UploadRequest::_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) { + // .pb.Blob blob = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_blob(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .pb.UploadOptions options = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_options(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* UploadRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.UploadRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .pb.Blob blob = 1; + if (this->has_blob()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 1, _Internal::blob(this), target, stream); + } + + // .pb.UploadOptions options = 2; + if (this->has_options()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 2, _Internal::options(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.UploadRequest) + return target; +} + +size_t UploadRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.UploadRequest) + 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; + + // .pb.Blob blob = 1; + if (this->has_blob()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *blob_); + } + + // .pb.UploadOptions options = 2; + if (this->has_options()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *options_); + } + + 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 UploadRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.UploadRequest) + GOOGLE_DCHECK_NE(&from, this); + const UploadRequest* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.UploadRequest) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.UploadRequest) + MergeFrom(*source); + } +} + +void UploadRequest::MergeFrom(const UploadRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.UploadRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.has_blob()) { + _internal_mutable_blob()->::pb::Blob::MergeFrom(from._internal_blob()); + } + if (from.has_options()) { + _internal_mutable_options()->::pb::UploadOptions::MergeFrom(from._internal_options()); + } +} + +void UploadRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.UploadRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void UploadRequest::CopyFrom(const UploadRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.UploadRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool UploadRequest::IsInitialized() const { + return true; +} + +void UploadRequest::InternalSwap(UploadRequest* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(blob_, other->blob_); + swap(options_, other->options_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata UploadRequest::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void UploadOptions::InitAsDefaultInstance() { +} +class UploadOptions::_Internal { + public: +}; + +UploadOptions::UploadOptions() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.UploadOptions) +} +UploadOptions::UploadOptions(const UploadOptions& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + multihash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_multihash().empty()) { + multihash_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.multihash_); + } + layout_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_layout().empty()) { + layout_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.layout_); + } + chunker_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_chunker().empty()) { + chunker_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.chunker_); + } + // @@protoc_insertion_point(copy_constructor:pb.UploadOptions) +} + +void UploadOptions::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_UploadOptions_file_2eproto.base); + multihash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + layout_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + chunker_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +UploadOptions::~UploadOptions() { + // @@protoc_insertion_point(destructor:pb.UploadOptions) + SharedDtor(); +} + +void UploadOptions::SharedDtor() { + multihash_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + layout_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + chunker_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void UploadOptions::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const UploadOptions& UploadOptions::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_UploadOptions_file_2eproto.base); + return *internal_default_instance(); +} + + +void UploadOptions::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.UploadOptions) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + multihash_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + layout_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + chunker_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + _internal_metadata_.Clear(); +} + +const char* UploadOptions::_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 multiHash = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_multihash(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.UploadOptions.multiHash")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string layout = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_layout(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.UploadOptions.layout")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string chunker = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + auto str = _internal_mutable_chunker(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.UploadOptions.chunker")); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* UploadOptions::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.UploadOptions) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string multiHash = 1; + if (this->multihash().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_multihash().data(), static_cast(this->_internal_multihash().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.UploadOptions.multiHash"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_multihash(), target); + } + + // string layout = 2; + if (this->layout().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_layout().data(), static_cast(this->_internal_layout().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.UploadOptions.layout"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_layout(), target); + } + + // string chunker = 3; + if (this->chunker().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_chunker().data(), static_cast(this->_internal_chunker().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.UploadOptions.chunker"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_chunker(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.UploadOptions) + return target; +} + +size_t UploadOptions::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.UploadOptions) + 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 multiHash = 1; + if (this->multihash().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_multihash()); + } + + // string layout = 2; + if (this->layout().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_layout()); + } + + // string chunker = 3; + if (this->chunker().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_chunker()); + } + + 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 UploadOptions::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.UploadOptions) + GOOGLE_DCHECK_NE(&from, this); + const UploadOptions* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.UploadOptions) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.UploadOptions) + MergeFrom(*source); + } +} + +void UploadOptions::MergeFrom(const UploadOptions& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.UploadOptions) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.multihash().size() > 0) { + + multihash_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.multihash_); + } + if (from.layout().size() > 0) { + + layout_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.layout_); + } + if (from.chunker().size() > 0) { + + chunker_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.chunker_); + } +} + +void UploadOptions::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.UploadOptions) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void UploadOptions::CopyFrom(const UploadOptions& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.UploadOptions) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool UploadOptions::IsInitialized() const { + return true; +} + +void UploadOptions::InternalSwap(UploadOptions* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + multihash_.Swap(&other->multihash_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + layout_.Swap(&other->layout_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + chunker_.Swap(&other->chunker_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} + +::PROTOBUF_NAMESPACE_ID::Metadata UploadOptions::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void DownloadRequest::InitAsDefaultInstance() { +} +class DownloadRequest::_Internal { + public: +}; + +DownloadRequest::DownloadRequest() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.DownloadRequest) +} +DownloadRequest::DownloadRequest(const DownloadRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_hash().empty()) { + hash_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.hash_); + } + ::memcpy(&rangestart_, &from.rangestart_, + static_cast(reinterpret_cast(&chunksize_) - + reinterpret_cast(&rangestart_)) + sizeof(chunksize_)); + // @@protoc_insertion_point(copy_constructor:pb.DownloadRequest) +} + +void DownloadRequest::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DownloadRequest_file_2eproto.base); + hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&rangestart_, 0, static_cast( + reinterpret_cast(&chunksize_) - + reinterpret_cast(&rangestart_)) + sizeof(chunksize_)); +} + +DownloadRequest::~DownloadRequest() { + // @@protoc_insertion_point(destructor:pb.DownloadRequest) + SharedDtor(); +} + +void DownloadRequest::SharedDtor() { + hash_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void DownloadRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const DownloadRequest& DownloadRequest::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DownloadRequest_file_2eproto.base); + return *internal_default_instance(); +} + + +void DownloadRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.DownloadRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + hash_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&rangestart_, 0, static_cast( + reinterpret_cast(&chunksize_) - + reinterpret_cast(&rangestart_)) + sizeof(chunksize_)); + _internal_metadata_.Clear(); +} + +const char* DownloadRequest::_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 hash = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_hash(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.DownloadRequest.hash")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // int32 chunkSize = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + chunksize_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // uint64 rangeStart = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + rangestart_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // uint64 rangeEnd = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + rangeend_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* DownloadRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.DownloadRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string hash = 1; + if (this->hash().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_hash().data(), static_cast(this->_internal_hash().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.DownloadRequest.hash"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_hash(), target); + } + + // int32 chunkSize = 2; + if (this->chunksize() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_chunksize(), target); + } + + // uint64 rangeStart = 3; + if (this->rangestart() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(3, this->_internal_rangestart(), target); + } + + // uint64 rangeEnd = 4; + if (this->rangeend() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(4, this->_internal_rangeend(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.DownloadRequest) + return target; +} + +size_t DownloadRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.DownloadRequest) + 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 hash = 1; + if (this->hash().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_hash()); + } + + // uint64 rangeStart = 3; + if (this->rangestart() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( + this->_internal_rangestart()); + } + + // uint64 rangeEnd = 4; + if (this->rangeend() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( + this->_internal_rangeend()); + } + + // int32 chunkSize = 2; + if (this->chunksize() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_chunksize()); + } + + 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 DownloadRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.DownloadRequest) + GOOGLE_DCHECK_NE(&from, this); + const DownloadRequest* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.DownloadRequest) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.DownloadRequest) + MergeFrom(*source); + } +} + +void DownloadRequest::MergeFrom(const DownloadRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.DownloadRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.hash().size() > 0) { + + hash_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.hash_); + } + if (from.rangestart() != 0) { + _internal_set_rangestart(from._internal_rangestart()); + } + if (from.rangeend() != 0) { + _internal_set_rangeend(from._internal_rangeend()); + } + if (from.chunksize() != 0) { + _internal_set_chunksize(from._internal_chunksize()); + } +} + +void DownloadRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.DownloadRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void DownloadRequest::CopyFrom(const DownloadRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.DownloadRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool DownloadRequest::IsInitialized() const { + return true; +} + +void DownloadRequest::InternalSwap(DownloadRequest* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + hash_.Swap(&other->hash_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(rangestart_, other->rangestart_); + swap(rangeend_, other->rangeend_); + swap(chunksize_, other->chunksize_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata DownloadRequest::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void DownloadResponse::InitAsDefaultInstance() { + ::pb::_DownloadResponse_default_instance_._instance.get_mutable()->blob_ = const_cast< ::pb::Blob*>( + ::pb::Blob::internal_default_instance()); +} +class DownloadResponse::_Internal { + public: + static const ::pb::Blob& blob(const DownloadResponse* msg); +}; + +const ::pb::Blob& +DownloadResponse::_Internal::blob(const DownloadResponse* msg) { + return *msg->blob_; +} +DownloadResponse::DownloadResponse() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.DownloadResponse) +} +DownloadResponse::DownloadResponse(const DownloadResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_blob()) { + blob_ = new ::pb::Blob(*from.blob_); + } else { + blob_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:pb.DownloadResponse) +} + +void DownloadResponse::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DownloadResponse_file_2eproto.base); + blob_ = nullptr; +} + +DownloadResponse::~DownloadResponse() { + // @@protoc_insertion_point(destructor:pb.DownloadResponse) + SharedDtor(); +} + +void DownloadResponse::SharedDtor() { + if (this != internal_default_instance()) delete blob_; +} + +void DownloadResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const DownloadResponse& DownloadResponse::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DownloadResponse_file_2eproto.base); + return *internal_default_instance(); +} + + +void DownloadResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.DownloadResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaNoVirtual() == nullptr && blob_ != nullptr) { + delete blob_; + } + blob_ = nullptr; + _internal_metadata_.Clear(); +} + +const char* DownloadResponse::_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) { + // .pb.Blob blob = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_blob(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* DownloadResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.DownloadResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .pb.Blob blob = 1; + if (this->has_blob()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 1, _Internal::blob(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.DownloadResponse) + return target; +} + +size_t DownloadResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.DownloadResponse) + 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; + + // .pb.Blob blob = 1; + if (this->has_blob()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *blob_); + } + + 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 DownloadResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.DownloadResponse) + GOOGLE_DCHECK_NE(&from, this); + const DownloadResponse* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.DownloadResponse) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.DownloadResponse) + MergeFrom(*source); + } +} + +void DownloadResponse::MergeFrom(const DownloadResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.DownloadResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.has_blob()) { + _internal_mutable_blob()->::pb::Blob::MergeFrom(from._internal_blob()); + } +} + +void DownloadResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.DownloadResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void DownloadResponse::CopyFrom(const DownloadResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.DownloadResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool DownloadResponse::IsInitialized() const { + return true; +} + +void DownloadResponse::InternalSwap(DownloadResponse* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(blob_, other->blob_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata DownloadResponse::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void Blob::InitAsDefaultInstance() { +} +class Blob::_Internal { + public: +}; + +Blob::Blob() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.Blob) +} +Blob::Blob(const Blob& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_content().empty()) { + content_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.content_); + } + ::memcpy(&rangestart_, &from.rangestart_, + static_cast(reinterpret_cast(&rangeend_) - + reinterpret_cast(&rangestart_)) + sizeof(rangeend_)); + // @@protoc_insertion_point(copy_constructor:pb.Blob) +} + +void Blob::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Blob_file_2eproto.base); + content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&rangestart_, 0, static_cast( + reinterpret_cast(&rangeend_) - + reinterpret_cast(&rangestart_)) + sizeof(rangeend_)); +} + +Blob::~Blob() { + // @@protoc_insertion_point(destructor:pb.Blob) + SharedDtor(); +} + +void Blob::SharedDtor() { + content_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void Blob::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Blob& Blob::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Blob_file_2eproto.base); + return *internal_default_instance(); +} + + +void Blob::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.Blob) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + content_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&rangestart_, 0, static_cast( + reinterpret_cast(&rangeend_) - + reinterpret_cast(&rangestart_)) + sizeof(rangeend_)); + _internal_metadata_.Clear(); +} + +const char* Blob::_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) { + // bytes content = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_content(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else goto handle_unusual; + continue; + // uint64 rangeStart = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + rangestart_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // uint64 rangeEnd = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + rangeend_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Blob::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.Blob) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bytes content = 1; + if (this->content().size() > 0) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_content(), target); + } + + // uint64 rangeStart = 2; + if (this->rangestart() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(2, this->_internal_rangestart(), target); + } + + // uint64 rangeEnd = 3; + if (this->rangeend() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(3, this->_internal_rangeend(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.Blob) + return target; +} + +size_t Blob::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.Blob) + 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; + + // bytes content = 1; + if (this->content().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_content()); + } + + // uint64 rangeStart = 2; + if (this->rangestart() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( + this->_internal_rangestart()); + } + + // uint64 rangeEnd = 3; + if (this->rangeend() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( + this->_internal_rangeend()); + } + + 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 Blob::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.Blob) + GOOGLE_DCHECK_NE(&from, this); + const Blob* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.Blob) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.Blob) + MergeFrom(*source); + } +} + +void Blob::MergeFrom(const Blob& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.Blob) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.content().size() > 0) { + + content_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.content_); + } + if (from.rangestart() != 0) { + _internal_set_rangestart(from._internal_rangestart()); + } + if (from.rangeend() != 0) { + _internal_set_rangeend(from._internal_rangeend()); + } +} + +void Blob::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.Blob) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Blob::CopyFrom(const Blob& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.Blob) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Blob::IsInitialized() const { + return true; +} + +void Blob::InternalSwap(Blob* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + content_.Swap(&other->content_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(rangestart_, other->rangestart_); + swap(rangeend_, other->rangeend_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Blob::GetMetadata() const { + return GetMetadataStatic(); +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace pb +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::pb::UploadRequest* Arena::CreateMaybeMessage< ::pb::UploadRequest >(Arena* arena) { + return Arena::CreateInternal< ::pb::UploadRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::UploadOptions* Arena::CreateMaybeMessage< ::pb::UploadOptions >(Arena* arena) { + return Arena::CreateInternal< ::pb::UploadOptions >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::DownloadRequest* Arena::CreateMaybeMessage< ::pb::DownloadRequest >(Arena* arena) { + return Arena::CreateInternal< ::pb::DownloadRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::DownloadResponse* Arena::CreateMaybeMessage< ::pb::DownloadResponse >(Arena* arena) { + return Arena::CreateInternal< ::pb::DownloadResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::Blob* Arena::CreateMaybeMessage< ::pb::Blob >(Arena* arena) { + return Arena::CreateInternal< ::pb::Blob >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/cpp/file.pb.h b/cpp/file.pb.h new file mode 100644 index 0000000..b39aec9 --- /dev/null +++ b/cpp/file.pb.h @@ -0,0 +1,1491 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: file.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_file_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_file_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3011000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3011002 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include "util.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_file_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_file_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[5] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_file_2eproto; +namespace pb { +class Blob; +class BlobDefaultTypeInternal; +extern BlobDefaultTypeInternal _Blob_default_instance_; +class DownloadRequest; +class DownloadRequestDefaultTypeInternal; +extern DownloadRequestDefaultTypeInternal _DownloadRequest_default_instance_; +class DownloadResponse; +class DownloadResponseDefaultTypeInternal; +extern DownloadResponseDefaultTypeInternal _DownloadResponse_default_instance_; +class UploadOptions; +class UploadOptionsDefaultTypeInternal; +extern UploadOptionsDefaultTypeInternal _UploadOptions_default_instance_; +class UploadRequest; +class UploadRequestDefaultTypeInternal; +extern UploadRequestDefaultTypeInternal _UploadRequest_default_instance_; +} // namespace pb +PROTOBUF_NAMESPACE_OPEN +template<> ::pb::Blob* Arena::CreateMaybeMessage<::pb::Blob>(Arena*); +template<> ::pb::DownloadRequest* Arena::CreateMaybeMessage<::pb::DownloadRequest>(Arena*); +template<> ::pb::DownloadResponse* Arena::CreateMaybeMessage<::pb::DownloadResponse>(Arena*); +template<> ::pb::UploadOptions* Arena::CreateMaybeMessage<::pb::UploadOptions>(Arena*); +template<> ::pb::UploadRequest* Arena::CreateMaybeMessage<::pb::UploadRequest>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace pb { + +// =================================================================== + +class UploadRequest : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.UploadRequest) */ { + public: + UploadRequest(); + virtual ~UploadRequest(); + + UploadRequest(const UploadRequest& from); + UploadRequest(UploadRequest&& from) noexcept + : UploadRequest() { + *this = ::std::move(from); + } + + inline UploadRequest& operator=(const UploadRequest& from) { + CopyFrom(from); + return *this; + } + inline UploadRequest& operator=(UploadRequest&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 UploadRequest& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const UploadRequest* internal_default_instance() { + return reinterpret_cast( + &_UploadRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(UploadRequest& a, UploadRequest& b) { + a.Swap(&b); + } + inline void Swap(UploadRequest* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline UploadRequest* New() const final { + return CreateMaybeMessage(nullptr); + } + + UploadRequest* 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 UploadRequest& from); + void MergeFrom(const UploadRequest& 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(UploadRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.UploadRequest"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_file_2eproto); + return ::descriptor_table_file_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kBlobFieldNumber = 1, + kOptionsFieldNumber = 2, + }; + // .pb.Blob blob = 1; + bool has_blob() const; + private: + bool _internal_has_blob() const; + public: + void clear_blob(); + const ::pb::Blob& blob() const; + ::pb::Blob* release_blob(); + ::pb::Blob* mutable_blob(); + void set_allocated_blob(::pb::Blob* blob); + private: + const ::pb::Blob& _internal_blob() const; + ::pb::Blob* _internal_mutable_blob(); + public: + + // .pb.UploadOptions options = 2; + bool has_options() const; + private: + bool _internal_has_options() const; + public: + void clear_options(); + const ::pb::UploadOptions& options() const; + ::pb::UploadOptions* release_options(); + ::pb::UploadOptions* mutable_options(); + void set_allocated_options(::pb::UploadOptions* options); + private: + const ::pb::UploadOptions& _internal_options() const; + ::pb::UploadOptions* _internal_mutable_options(); + public: + + // @@protoc_insertion_point(class_scope:pb.UploadRequest) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::pb::Blob* blob_; + ::pb::UploadOptions* options_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_file_2eproto; +}; +// ------------------------------------------------------------------- + +class UploadOptions : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.UploadOptions) */ { + public: + UploadOptions(); + virtual ~UploadOptions(); + + UploadOptions(const UploadOptions& from); + UploadOptions(UploadOptions&& from) noexcept + : UploadOptions() { + *this = ::std::move(from); + } + + inline UploadOptions& operator=(const UploadOptions& from) { + CopyFrom(from); + return *this; + } + inline UploadOptions& operator=(UploadOptions&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 UploadOptions& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const UploadOptions* internal_default_instance() { + return reinterpret_cast( + &_UploadOptions_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(UploadOptions& a, UploadOptions& b) { + a.Swap(&b); + } + inline void Swap(UploadOptions* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline UploadOptions* New() const final { + return CreateMaybeMessage(nullptr); + } + + UploadOptions* 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 UploadOptions& from); + void MergeFrom(const UploadOptions& 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(UploadOptions* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.UploadOptions"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_file_2eproto); + return ::descriptor_table_file_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kMultiHashFieldNumber = 1, + kLayoutFieldNumber = 2, + kChunkerFieldNumber = 3, + }; + // string multiHash = 1; + void clear_multihash(); + const std::string& multihash() const; + void set_multihash(const std::string& value); + void set_multihash(std::string&& value); + void set_multihash(const char* value); + void set_multihash(const char* value, size_t size); + std::string* mutable_multihash(); + std::string* release_multihash(); + void set_allocated_multihash(std::string* multihash); + private: + const std::string& _internal_multihash() const; + void _internal_set_multihash(const std::string& value); + std::string* _internal_mutable_multihash(); + public: + + // string layout = 2; + void clear_layout(); + const std::string& layout() const; + void set_layout(const std::string& value); + void set_layout(std::string&& value); + void set_layout(const char* value); + void set_layout(const char* value, size_t size); + std::string* mutable_layout(); + std::string* release_layout(); + void set_allocated_layout(std::string* layout); + private: + const std::string& _internal_layout() const; + void _internal_set_layout(const std::string& value); + std::string* _internal_mutable_layout(); + public: + + // string chunker = 3; + void clear_chunker(); + const std::string& chunker() const; + void set_chunker(const std::string& value); + void set_chunker(std::string&& value); + void set_chunker(const char* value); + void set_chunker(const char* value, size_t size); + std::string* mutable_chunker(); + std::string* release_chunker(); + void set_allocated_chunker(std::string* chunker); + private: + const std::string& _internal_chunker() const; + void _internal_set_chunker(const std::string& value); + std::string* _internal_mutable_chunker(); + public: + + // @@protoc_insertion_point(class_scope:pb.UploadOptions) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr multihash_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr layout_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr chunker_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_file_2eproto; +}; +// ------------------------------------------------------------------- + +class DownloadRequest : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.DownloadRequest) */ { + public: + DownloadRequest(); + virtual ~DownloadRequest(); + + DownloadRequest(const DownloadRequest& from); + DownloadRequest(DownloadRequest&& from) noexcept + : DownloadRequest() { + *this = ::std::move(from); + } + + inline DownloadRequest& operator=(const DownloadRequest& from) { + CopyFrom(from); + return *this; + } + inline DownloadRequest& operator=(DownloadRequest&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 DownloadRequest& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const DownloadRequest* internal_default_instance() { + return reinterpret_cast( + &_DownloadRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(DownloadRequest& a, DownloadRequest& b) { + a.Swap(&b); + } + inline void Swap(DownloadRequest* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline DownloadRequest* New() const final { + return CreateMaybeMessage(nullptr); + } + + DownloadRequest* 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 DownloadRequest& from); + void MergeFrom(const DownloadRequest& 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(DownloadRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.DownloadRequest"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_file_2eproto); + return ::descriptor_table_file_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kHashFieldNumber = 1, + kRangeStartFieldNumber = 3, + kRangeEndFieldNumber = 4, + kChunkSizeFieldNumber = 2, + }; + // string hash = 1; + void clear_hash(); + const std::string& hash() const; + void set_hash(const std::string& value); + void set_hash(std::string&& value); + void set_hash(const char* value); + void set_hash(const char* value, size_t size); + std::string* mutable_hash(); + std::string* release_hash(); + void set_allocated_hash(std::string* hash); + private: + const std::string& _internal_hash() const; + void _internal_set_hash(const std::string& value); + std::string* _internal_mutable_hash(); + public: + + // uint64 rangeStart = 3; + void clear_rangestart(); + ::PROTOBUF_NAMESPACE_ID::uint64 rangestart() const; + void set_rangestart(::PROTOBUF_NAMESPACE_ID::uint64 value); + private: + ::PROTOBUF_NAMESPACE_ID::uint64 _internal_rangestart() const; + void _internal_set_rangestart(::PROTOBUF_NAMESPACE_ID::uint64 value); + public: + + // uint64 rangeEnd = 4; + void clear_rangeend(); + ::PROTOBUF_NAMESPACE_ID::uint64 rangeend() const; + void set_rangeend(::PROTOBUF_NAMESPACE_ID::uint64 value); + private: + ::PROTOBUF_NAMESPACE_ID::uint64 _internal_rangeend() const; + void _internal_set_rangeend(::PROTOBUF_NAMESPACE_ID::uint64 value); + public: + + // int32 chunkSize = 2; + void clear_chunksize(); + ::PROTOBUF_NAMESPACE_ID::int32 chunksize() const; + void set_chunksize(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_chunksize() const; + void _internal_set_chunksize(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // @@protoc_insertion_point(class_scope:pb.DownloadRequest) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr hash_; + ::PROTOBUF_NAMESPACE_ID::uint64 rangestart_; + ::PROTOBUF_NAMESPACE_ID::uint64 rangeend_; + ::PROTOBUF_NAMESPACE_ID::int32 chunksize_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_file_2eproto; +}; +// ------------------------------------------------------------------- + +class DownloadResponse : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.DownloadResponse) */ { + public: + DownloadResponse(); + virtual ~DownloadResponse(); + + DownloadResponse(const DownloadResponse& from); + DownloadResponse(DownloadResponse&& from) noexcept + : DownloadResponse() { + *this = ::std::move(from); + } + + inline DownloadResponse& operator=(const DownloadResponse& from) { + CopyFrom(from); + return *this; + } + inline DownloadResponse& operator=(DownloadResponse&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 DownloadResponse& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const DownloadResponse* internal_default_instance() { + return reinterpret_cast( + &_DownloadResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(DownloadResponse& a, DownloadResponse& b) { + a.Swap(&b); + } + inline void Swap(DownloadResponse* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline DownloadResponse* New() const final { + return CreateMaybeMessage(nullptr); + } + + DownloadResponse* 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 DownloadResponse& from); + void MergeFrom(const DownloadResponse& 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(DownloadResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.DownloadResponse"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_file_2eproto); + return ::descriptor_table_file_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kBlobFieldNumber = 1, + }; + // .pb.Blob blob = 1; + bool has_blob() const; + private: + bool _internal_has_blob() const; + public: + void clear_blob(); + const ::pb::Blob& blob() const; + ::pb::Blob* release_blob(); + ::pb::Blob* mutable_blob(); + void set_allocated_blob(::pb::Blob* blob); + private: + const ::pb::Blob& _internal_blob() const; + ::pb::Blob* _internal_mutable_blob(); + public: + + // @@protoc_insertion_point(class_scope:pb.DownloadResponse) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::pb::Blob* blob_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_file_2eproto; +}; +// ------------------------------------------------------------------- + +class Blob : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.Blob) */ { + public: + Blob(); + virtual ~Blob(); + + Blob(const Blob& from); + Blob(Blob&& from) noexcept + : Blob() { + *this = ::std::move(from); + } + + inline Blob& operator=(const Blob& from) { + CopyFrom(from); + return *this; + } + inline Blob& operator=(Blob&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 Blob& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Blob* internal_default_instance() { + return reinterpret_cast( + &_Blob_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(Blob& a, Blob& b) { + a.Swap(&b); + } + inline void Swap(Blob* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Blob* New() const final { + return CreateMaybeMessage(nullptr); + } + + Blob* 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 Blob& from); + void MergeFrom(const Blob& 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(Blob* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.Blob"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_file_2eproto); + return ::descriptor_table_file_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kContentFieldNumber = 1, + kRangeStartFieldNumber = 2, + kRangeEndFieldNumber = 3, + }; + // bytes content = 1; + void clear_content(); + const std::string& content() const; + void set_content(const std::string& value); + void set_content(std::string&& value); + void set_content(const char* value); + void set_content(const void* value, size_t size); + std::string* mutable_content(); + std::string* release_content(); + void set_allocated_content(std::string* content); + private: + const std::string& _internal_content() const; + void _internal_set_content(const std::string& value); + std::string* _internal_mutable_content(); + public: + + // uint64 rangeStart = 2; + void clear_rangestart(); + ::PROTOBUF_NAMESPACE_ID::uint64 rangestart() const; + void set_rangestart(::PROTOBUF_NAMESPACE_ID::uint64 value); + private: + ::PROTOBUF_NAMESPACE_ID::uint64 _internal_rangestart() const; + void _internal_set_rangestart(::PROTOBUF_NAMESPACE_ID::uint64 value); + public: + + // uint64 rangeEnd = 3; + void clear_rangeend(); + ::PROTOBUF_NAMESPACE_ID::uint64 rangeend() const; + void set_rangeend(::PROTOBUF_NAMESPACE_ID::uint64 value); + private: + ::PROTOBUF_NAMESPACE_ID::uint64 _internal_rangeend() const; + void _internal_set_rangeend(::PROTOBUF_NAMESPACE_ID::uint64 value); + public: + + // @@protoc_insertion_point(class_scope:pb.Blob) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr content_; + ::PROTOBUF_NAMESPACE_ID::uint64 rangestart_; + ::PROTOBUF_NAMESPACE_ID::uint64 rangeend_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_file_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// UploadRequest + +// .pb.Blob blob = 1; +inline bool UploadRequest::_internal_has_blob() const { + return this != internal_default_instance() && blob_ != nullptr; +} +inline bool UploadRequest::has_blob() const { + return _internal_has_blob(); +} +inline void UploadRequest::clear_blob() { + if (GetArenaNoVirtual() == nullptr && blob_ != nullptr) { + delete blob_; + } + blob_ = nullptr; +} +inline const ::pb::Blob& UploadRequest::_internal_blob() const { + const ::pb::Blob* p = blob_; + return p != nullptr ? *p : *reinterpret_cast( + &::pb::_Blob_default_instance_); +} +inline const ::pb::Blob& UploadRequest::blob() const { + // @@protoc_insertion_point(field_get:pb.UploadRequest.blob) + return _internal_blob(); +} +inline ::pb::Blob* UploadRequest::release_blob() { + // @@protoc_insertion_point(field_release:pb.UploadRequest.blob) + + ::pb::Blob* temp = blob_; + blob_ = nullptr; + return temp; +} +inline ::pb::Blob* UploadRequest::_internal_mutable_blob() { + + if (blob_ == nullptr) { + auto* p = CreateMaybeMessage<::pb::Blob>(GetArenaNoVirtual()); + blob_ = p; + } + return blob_; +} +inline ::pb::Blob* UploadRequest::mutable_blob() { + // @@protoc_insertion_point(field_mutable:pb.UploadRequest.blob) + return _internal_mutable_blob(); +} +inline void UploadRequest::set_allocated_blob(::pb::Blob* blob) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete blob_; + } + if (blob) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + blob = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, blob, submessage_arena); + } + + } else { + + } + blob_ = blob; + // @@protoc_insertion_point(field_set_allocated:pb.UploadRequest.blob) +} + +// .pb.UploadOptions options = 2; +inline bool UploadRequest::_internal_has_options() const { + return this != internal_default_instance() && options_ != nullptr; +} +inline bool UploadRequest::has_options() const { + return _internal_has_options(); +} +inline void UploadRequest::clear_options() { + if (GetArenaNoVirtual() == nullptr && options_ != nullptr) { + delete options_; + } + options_ = nullptr; +} +inline const ::pb::UploadOptions& UploadRequest::_internal_options() const { + const ::pb::UploadOptions* p = options_; + return p != nullptr ? *p : *reinterpret_cast( + &::pb::_UploadOptions_default_instance_); +} +inline const ::pb::UploadOptions& UploadRequest::options() const { + // @@protoc_insertion_point(field_get:pb.UploadRequest.options) + return _internal_options(); +} +inline ::pb::UploadOptions* UploadRequest::release_options() { + // @@protoc_insertion_point(field_release:pb.UploadRequest.options) + + ::pb::UploadOptions* temp = options_; + options_ = nullptr; + return temp; +} +inline ::pb::UploadOptions* UploadRequest::_internal_mutable_options() { + + if (options_ == nullptr) { + auto* p = CreateMaybeMessage<::pb::UploadOptions>(GetArenaNoVirtual()); + options_ = p; + } + return options_; +} +inline ::pb::UploadOptions* UploadRequest::mutable_options() { + // @@protoc_insertion_point(field_mutable:pb.UploadRequest.options) + return _internal_mutable_options(); +} +inline void UploadRequest::set_allocated_options(::pb::UploadOptions* options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete options_; + } + if (options) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, options, submessage_arena); + } + + } else { + + } + options_ = options; + // @@protoc_insertion_point(field_set_allocated:pb.UploadRequest.options) +} + +// ------------------------------------------------------------------- + +// UploadOptions + +// string multiHash = 1; +inline void UploadOptions::clear_multihash() { + multihash_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& UploadOptions::multihash() const { + // @@protoc_insertion_point(field_get:pb.UploadOptions.multiHash) + return _internal_multihash(); +} +inline void UploadOptions::set_multihash(const std::string& value) { + _internal_set_multihash(value); + // @@protoc_insertion_point(field_set:pb.UploadOptions.multiHash) +} +inline std::string* UploadOptions::mutable_multihash() { + // @@protoc_insertion_point(field_mutable:pb.UploadOptions.multiHash) + return _internal_mutable_multihash(); +} +inline const std::string& UploadOptions::_internal_multihash() const { + return multihash_.GetNoArena(); +} +inline void UploadOptions::_internal_set_multihash(const std::string& value) { + + multihash_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void UploadOptions::set_multihash(std::string&& value) { + + multihash_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.UploadOptions.multiHash) +} +inline void UploadOptions::set_multihash(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + multihash_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.UploadOptions.multiHash) +} +inline void UploadOptions::set_multihash(const char* value, size_t size) { + + multihash_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.UploadOptions.multiHash) +} +inline std::string* UploadOptions::_internal_mutable_multihash() { + + return multihash_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* UploadOptions::release_multihash() { + // @@protoc_insertion_point(field_release:pb.UploadOptions.multiHash) + + return multihash_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void UploadOptions::set_allocated_multihash(std::string* multihash) { + if (multihash != nullptr) { + + } else { + + } + multihash_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), multihash); + // @@protoc_insertion_point(field_set_allocated:pb.UploadOptions.multiHash) +} + +// string layout = 2; +inline void UploadOptions::clear_layout() { + layout_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& UploadOptions::layout() const { + // @@protoc_insertion_point(field_get:pb.UploadOptions.layout) + return _internal_layout(); +} +inline void UploadOptions::set_layout(const std::string& value) { + _internal_set_layout(value); + // @@protoc_insertion_point(field_set:pb.UploadOptions.layout) +} +inline std::string* UploadOptions::mutable_layout() { + // @@protoc_insertion_point(field_mutable:pb.UploadOptions.layout) + return _internal_mutable_layout(); +} +inline const std::string& UploadOptions::_internal_layout() const { + return layout_.GetNoArena(); +} +inline void UploadOptions::_internal_set_layout(const std::string& value) { + + layout_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void UploadOptions::set_layout(std::string&& value) { + + layout_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.UploadOptions.layout) +} +inline void UploadOptions::set_layout(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + layout_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.UploadOptions.layout) +} +inline void UploadOptions::set_layout(const char* value, size_t size) { + + layout_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.UploadOptions.layout) +} +inline std::string* UploadOptions::_internal_mutable_layout() { + + return layout_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* UploadOptions::release_layout() { + // @@protoc_insertion_point(field_release:pb.UploadOptions.layout) + + return layout_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void UploadOptions::set_allocated_layout(std::string* layout) { + if (layout != nullptr) { + + } else { + + } + layout_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), layout); + // @@protoc_insertion_point(field_set_allocated:pb.UploadOptions.layout) +} + +// string chunker = 3; +inline void UploadOptions::clear_chunker() { + chunker_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& UploadOptions::chunker() const { + // @@protoc_insertion_point(field_get:pb.UploadOptions.chunker) + return _internal_chunker(); +} +inline void UploadOptions::set_chunker(const std::string& value) { + _internal_set_chunker(value); + // @@protoc_insertion_point(field_set:pb.UploadOptions.chunker) +} +inline std::string* UploadOptions::mutable_chunker() { + // @@protoc_insertion_point(field_mutable:pb.UploadOptions.chunker) + return _internal_mutable_chunker(); +} +inline const std::string& UploadOptions::_internal_chunker() const { + return chunker_.GetNoArena(); +} +inline void UploadOptions::_internal_set_chunker(const std::string& value) { + + chunker_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void UploadOptions::set_chunker(std::string&& value) { + + chunker_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.UploadOptions.chunker) +} +inline void UploadOptions::set_chunker(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + chunker_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.UploadOptions.chunker) +} +inline void UploadOptions::set_chunker(const char* value, size_t size) { + + chunker_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.UploadOptions.chunker) +} +inline std::string* UploadOptions::_internal_mutable_chunker() { + + return chunker_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* UploadOptions::release_chunker() { + // @@protoc_insertion_point(field_release:pb.UploadOptions.chunker) + + return chunker_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void UploadOptions::set_allocated_chunker(std::string* chunker) { + if (chunker != nullptr) { + + } else { + + } + chunker_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), chunker); + // @@protoc_insertion_point(field_set_allocated:pb.UploadOptions.chunker) +} + +// ------------------------------------------------------------------- + +// DownloadRequest + +// string hash = 1; +inline void DownloadRequest::clear_hash() { + hash_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& DownloadRequest::hash() const { + // @@protoc_insertion_point(field_get:pb.DownloadRequest.hash) + return _internal_hash(); +} +inline void DownloadRequest::set_hash(const std::string& value) { + _internal_set_hash(value); + // @@protoc_insertion_point(field_set:pb.DownloadRequest.hash) +} +inline std::string* DownloadRequest::mutable_hash() { + // @@protoc_insertion_point(field_mutable:pb.DownloadRequest.hash) + return _internal_mutable_hash(); +} +inline const std::string& DownloadRequest::_internal_hash() const { + return hash_.GetNoArena(); +} +inline void DownloadRequest::_internal_set_hash(const std::string& value) { + + hash_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void DownloadRequest::set_hash(std::string&& value) { + + hash_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.DownloadRequest.hash) +} +inline void DownloadRequest::set_hash(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + hash_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.DownloadRequest.hash) +} +inline void DownloadRequest::set_hash(const char* value, size_t size) { + + hash_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.DownloadRequest.hash) +} +inline std::string* DownloadRequest::_internal_mutable_hash() { + + return hash_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* DownloadRequest::release_hash() { + // @@protoc_insertion_point(field_release:pb.DownloadRequest.hash) + + return hash_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void DownloadRequest::set_allocated_hash(std::string* hash) { + if (hash != nullptr) { + + } else { + + } + hash_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), hash); + // @@protoc_insertion_point(field_set_allocated:pb.DownloadRequest.hash) +} + +// int32 chunkSize = 2; +inline void DownloadRequest::clear_chunksize() { + chunksize_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 DownloadRequest::_internal_chunksize() const { + return chunksize_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 DownloadRequest::chunksize() const { + // @@protoc_insertion_point(field_get:pb.DownloadRequest.chunkSize) + return _internal_chunksize(); +} +inline void DownloadRequest::_internal_set_chunksize(::PROTOBUF_NAMESPACE_ID::int32 value) { + + chunksize_ = value; +} +inline void DownloadRequest::set_chunksize(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_chunksize(value); + // @@protoc_insertion_point(field_set:pb.DownloadRequest.chunkSize) +} + +// uint64 rangeStart = 3; +inline void DownloadRequest::clear_rangestart() { + rangestart_ = PROTOBUF_ULONGLONG(0); +} +inline ::PROTOBUF_NAMESPACE_ID::uint64 DownloadRequest::_internal_rangestart() const { + return rangestart_; +} +inline ::PROTOBUF_NAMESPACE_ID::uint64 DownloadRequest::rangestart() const { + // @@protoc_insertion_point(field_get:pb.DownloadRequest.rangeStart) + return _internal_rangestart(); +} +inline void DownloadRequest::_internal_set_rangestart(::PROTOBUF_NAMESPACE_ID::uint64 value) { + + rangestart_ = value; +} +inline void DownloadRequest::set_rangestart(::PROTOBUF_NAMESPACE_ID::uint64 value) { + _internal_set_rangestart(value); + // @@protoc_insertion_point(field_set:pb.DownloadRequest.rangeStart) +} + +// uint64 rangeEnd = 4; +inline void DownloadRequest::clear_rangeend() { + rangeend_ = PROTOBUF_ULONGLONG(0); +} +inline ::PROTOBUF_NAMESPACE_ID::uint64 DownloadRequest::_internal_rangeend() const { + return rangeend_; +} +inline ::PROTOBUF_NAMESPACE_ID::uint64 DownloadRequest::rangeend() const { + // @@protoc_insertion_point(field_get:pb.DownloadRequest.rangeEnd) + return _internal_rangeend(); +} +inline void DownloadRequest::_internal_set_rangeend(::PROTOBUF_NAMESPACE_ID::uint64 value) { + + rangeend_ = value; +} +inline void DownloadRequest::set_rangeend(::PROTOBUF_NAMESPACE_ID::uint64 value) { + _internal_set_rangeend(value); + // @@protoc_insertion_point(field_set:pb.DownloadRequest.rangeEnd) +} + +// ------------------------------------------------------------------- + +// DownloadResponse + +// .pb.Blob blob = 1; +inline bool DownloadResponse::_internal_has_blob() const { + return this != internal_default_instance() && blob_ != nullptr; +} +inline bool DownloadResponse::has_blob() const { + return _internal_has_blob(); +} +inline void DownloadResponse::clear_blob() { + if (GetArenaNoVirtual() == nullptr && blob_ != nullptr) { + delete blob_; + } + blob_ = nullptr; +} +inline const ::pb::Blob& DownloadResponse::_internal_blob() const { + const ::pb::Blob* p = blob_; + return p != nullptr ? *p : *reinterpret_cast( + &::pb::_Blob_default_instance_); +} +inline const ::pb::Blob& DownloadResponse::blob() const { + // @@protoc_insertion_point(field_get:pb.DownloadResponse.blob) + return _internal_blob(); +} +inline ::pb::Blob* DownloadResponse::release_blob() { + // @@protoc_insertion_point(field_release:pb.DownloadResponse.blob) + + ::pb::Blob* temp = blob_; + blob_ = nullptr; + return temp; +} +inline ::pb::Blob* DownloadResponse::_internal_mutable_blob() { + + if (blob_ == nullptr) { + auto* p = CreateMaybeMessage<::pb::Blob>(GetArenaNoVirtual()); + blob_ = p; + } + return blob_; +} +inline ::pb::Blob* DownloadResponse::mutable_blob() { + // @@protoc_insertion_point(field_mutable:pb.DownloadResponse.blob) + return _internal_mutable_blob(); +} +inline void DownloadResponse::set_allocated_blob(::pb::Blob* blob) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete blob_; + } + if (blob) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + blob = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, blob, submessage_arena); + } + + } else { + + } + blob_ = blob; + // @@protoc_insertion_point(field_set_allocated:pb.DownloadResponse.blob) +} + +// ------------------------------------------------------------------- + +// Blob + +// bytes content = 1; +inline void Blob::clear_content() { + content_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& Blob::content() const { + // @@protoc_insertion_point(field_get:pb.Blob.content) + return _internal_content(); +} +inline void Blob::set_content(const std::string& value) { + _internal_set_content(value); + // @@protoc_insertion_point(field_set:pb.Blob.content) +} +inline std::string* Blob::mutable_content() { + // @@protoc_insertion_point(field_mutable:pb.Blob.content) + return _internal_mutable_content(); +} +inline const std::string& Blob::_internal_content() const { + return content_.GetNoArena(); +} +inline void Blob::_internal_set_content(const std::string& value) { + + content_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void Blob::set_content(std::string&& value) { + + content_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.Blob.content) +} +inline void Blob::set_content(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + content_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.Blob.content) +} +inline void Blob::set_content(const void* value, size_t size) { + + content_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.Blob.content) +} +inline std::string* Blob::_internal_mutable_content() { + + return content_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* Blob::release_content() { + // @@protoc_insertion_point(field_release:pb.Blob.content) + + return content_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void Blob::set_allocated_content(std::string* content) { + if (content != nullptr) { + + } else { + + } + content_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), content); + // @@protoc_insertion_point(field_set_allocated:pb.Blob.content) +} + +// uint64 rangeStart = 2; +inline void Blob::clear_rangestart() { + rangestart_ = PROTOBUF_ULONGLONG(0); +} +inline ::PROTOBUF_NAMESPACE_ID::uint64 Blob::_internal_rangestart() const { + return rangestart_; +} +inline ::PROTOBUF_NAMESPACE_ID::uint64 Blob::rangestart() const { + // @@protoc_insertion_point(field_get:pb.Blob.rangeStart) + return _internal_rangestart(); +} +inline void Blob::_internal_set_rangestart(::PROTOBUF_NAMESPACE_ID::uint64 value) { + + rangestart_ = value; +} +inline void Blob::set_rangestart(::PROTOBUF_NAMESPACE_ID::uint64 value) { + _internal_set_rangestart(value); + // @@protoc_insertion_point(field_set:pb.Blob.rangeStart) +} + +// uint64 rangeEnd = 3; +inline void Blob::clear_rangeend() { + rangeend_ = PROTOBUF_ULONGLONG(0); +} +inline ::PROTOBUF_NAMESPACE_ID::uint64 Blob::_internal_rangeend() const { + return rangeend_; +} +inline ::PROTOBUF_NAMESPACE_ID::uint64 Blob::rangeend() const { + // @@protoc_insertion_point(field_get:pb.Blob.rangeEnd) + return _internal_rangeend(); +} +inline void Blob::_internal_set_rangeend(::PROTOBUF_NAMESPACE_ID::uint64 value) { + + rangeend_ = value; +} +inline void Blob::set_rangeend(::PROTOBUF_NAMESPACE_ID::uint64 value) { + _internal_set_rangeend(value); + // @@protoc_insertion_point(field_set:pb.Blob.rangeEnd) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace pb + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_file_2eproto diff --git a/cpp/namesys.grpc.pb.cc b/cpp/namesys.grpc.pb.cc new file mode 100644 index 0000000..b2ca92d --- /dev/null +++ b/cpp/namesys.grpc.pb.cc @@ -0,0 +1,158 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: namesys.proto + +#include "namesys.pb.h" +#include "namesys.grpc.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace pb { + +static const char* NameSysAPI_method_names[] = { + "/pb.NameSysAPI/NameSysResolve", + "/pb.NameSysAPI/NameSysResolveAsync", + "/pb.NameSysAPI/NameSysPublish", +}; + +std::unique_ptr< NameSysAPI::Stub> NameSysAPI::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< NameSysAPI::Stub> stub(new NameSysAPI::Stub(channel)); + return stub; +} + +NameSysAPI::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel) + : channel_(channel), rpcmethod_NameSysResolve_(NameSysAPI_method_names[0], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_NameSysResolveAsync_(NameSysAPI_method_names[1], ::grpc::internal::RpcMethod::SERVER_STREAMING, channel) + , rpcmethod_NameSysPublish_(NameSysAPI_method_names[2], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::Status NameSysAPI::Stub::NameSysResolve(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request, ::pb::NameSysResolveResult* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_NameSysResolve_, context, request, response); +} + +void NameSysAPI::Stub::experimental_async::NameSysResolve(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest* request, ::pb::NameSysResolveResult* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_NameSysResolve_, context, request, response, std::move(f)); +} + +void NameSysAPI::Stub::experimental_async::NameSysResolve(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::NameSysResolveResult* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_NameSysResolve_, context, request, response, std::move(f)); +} + +void NameSysAPI::Stub::experimental_async::NameSysResolve(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest* request, ::pb::NameSysResolveResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_NameSysResolve_, context, request, response, reactor); +} + +void NameSysAPI::Stub::experimental_async::NameSysResolve(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::NameSysResolveResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_NameSysResolve_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::pb::NameSysResolveResult>* NameSysAPI::Stub::AsyncNameSysResolveRaw(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::NameSysResolveResult>::Create(channel_.get(), cq, rpcmethod_NameSysResolve_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::pb::NameSysResolveResult>* NameSysAPI::Stub::PrepareAsyncNameSysResolveRaw(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::NameSysResolveResult>::Create(channel_.get(), cq, rpcmethod_NameSysResolve_, context, request, false); +} + +::grpc::ClientReader< ::pb::NameSysResolveResult>* NameSysAPI::Stub::NameSysResolveAsyncRaw(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request) { + return ::grpc_impl::internal::ClientReaderFactory< ::pb::NameSysResolveResult>::Create(channel_.get(), rpcmethod_NameSysResolveAsync_, context, request); +} + +void NameSysAPI::Stub::experimental_async::NameSysResolveAsync(::grpc::ClientContext* context, ::pb::NameSysResolveRequest* request, ::grpc::experimental::ClientReadReactor< ::pb::NameSysResolveResult>* reactor) { + ::grpc_impl::internal::ClientCallbackReaderFactory< ::pb::NameSysResolveResult>::Create(stub_->channel_.get(), stub_->rpcmethod_NameSysResolveAsync_, context, request, reactor); +} + +::grpc::ClientAsyncReader< ::pb::NameSysResolveResult>* NameSysAPI::Stub::AsyncNameSysResolveAsyncRaw(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request, ::grpc::CompletionQueue* cq, void* tag) { + return ::grpc_impl::internal::ClientAsyncReaderFactory< ::pb::NameSysResolveResult>::Create(channel_.get(), cq, rpcmethod_NameSysResolveAsync_, context, request, true, tag); +} + +::grpc::ClientAsyncReader< ::pb::NameSysResolveResult>* NameSysAPI::Stub::PrepareAsyncNameSysResolveAsyncRaw(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncReaderFactory< ::pb::NameSysResolveResult>::Create(channel_.get(), cq, rpcmethod_NameSysResolveAsync_, context, request, false, nullptr); +} + +::grpc::Status NameSysAPI::Stub::NameSysPublish(::grpc::ClientContext* context, const ::pb::NameSysPublishRequest& request, ::pb::Empty* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_NameSysPublish_, context, request, response); +} + +void NameSysAPI::Stub::experimental_async::NameSysPublish(::grpc::ClientContext* context, const ::pb::NameSysPublishRequest* request, ::pb::Empty* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_NameSysPublish_, context, request, response, std::move(f)); +} + +void NameSysAPI::Stub::experimental_async::NameSysPublish(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::Empty* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_NameSysPublish_, context, request, response, std::move(f)); +} + +void NameSysAPI::Stub::experimental_async::NameSysPublish(::grpc::ClientContext* context, const ::pb::NameSysPublishRequest* request, ::pb::Empty* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_NameSysPublish_, context, request, response, reactor); +} + +void NameSysAPI::Stub::experimental_async::NameSysPublish(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::Empty* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_NameSysPublish_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::pb::Empty>* NameSysAPI::Stub::AsyncNameSysPublishRaw(::grpc::ClientContext* context, const ::pb::NameSysPublishRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::Empty>::Create(channel_.get(), cq, rpcmethod_NameSysPublish_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::pb::Empty>* NameSysAPI::Stub::PrepareAsyncNameSysPublishRaw(::grpc::ClientContext* context, const ::pb::NameSysPublishRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::Empty>::Create(channel_.get(), cq, rpcmethod_NameSysPublish_, context, request, false); +} + +NameSysAPI::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + NameSysAPI_method_names[0], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< NameSysAPI::Service, ::pb::NameSysResolveRequest, ::pb::NameSysResolveResult>( + std::mem_fn(&NameSysAPI::Service::NameSysResolve), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + NameSysAPI_method_names[1], + ::grpc::internal::RpcMethod::SERVER_STREAMING, + new ::grpc::internal::ServerStreamingHandler< NameSysAPI::Service, ::pb::NameSysResolveRequest, ::pb::NameSysResolveResult>( + std::mem_fn(&NameSysAPI::Service::NameSysResolveAsync), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + NameSysAPI_method_names[2], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< NameSysAPI::Service, ::pb::NameSysPublishRequest, ::pb::Empty>( + std::mem_fn(&NameSysAPI::Service::NameSysPublish), this))); +} + +NameSysAPI::Service::~Service() { +} + +::grpc::Status NameSysAPI::Service::NameSysResolve(::grpc::ServerContext* context, const ::pb::NameSysResolveRequest* request, ::pb::NameSysResolveResult* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status NameSysAPI::Service::NameSysResolveAsync(::grpc::ServerContext* context, const ::pb::NameSysResolveRequest* request, ::grpc::ServerWriter< ::pb::NameSysResolveResult>* writer) { + (void) context; + (void) request; + (void) writer; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status NameSysAPI::Service::NameSysPublish(::grpc::ServerContext* context, const ::pb::NameSysPublishRequest* request, ::pb::Empty* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +} // namespace pb + diff --git a/cpp/namesys.grpc.pb.h b/cpp/namesys.grpc.pb.h new file mode 100644 index 0000000..04cd864 --- /dev/null +++ b/cpp/namesys.grpc.pb.h @@ -0,0 +1,705 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: namesys.proto +#ifndef GRPC_namesys_2eproto__INCLUDED +#define GRPC_namesys_2eproto__INCLUDED + +#include "namesys.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace pb { + +// NameSysAPI provides a generic name resolution API +class NameSysAPI final { + public: + static constexpr char const* service_full_name() { + return "pb.NameSysAPI"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + // NameSysResolve is used to resolve a name, waiting for the request to complete + virtual ::grpc::Status NameSysResolve(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request, ::pb::NameSysResolveResult* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::NameSysResolveResult>> AsyncNameSysResolve(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::NameSysResolveResult>>(AsyncNameSysResolveRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::NameSysResolveResult>> PrepareAsyncNameSysResolve(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::NameSysResolveResult>>(PrepareAsyncNameSysResolveRaw(context, request, cq)); + } + // NameSysResolveAsync is like Resolve, except instead of waiting for the request + // to complete, we send back a stream which we will send the result on + std::unique_ptr< ::grpc::ClientReaderInterface< ::pb::NameSysResolveResult>> NameSysResolveAsync(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request) { + return std::unique_ptr< ::grpc::ClientReaderInterface< ::pb::NameSysResolveResult>>(NameSysResolveAsyncRaw(context, request)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::pb::NameSysResolveResult>> AsyncNameSysResolveAsync(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::pb::NameSysResolveResult>>(AsyncNameSysResolveAsyncRaw(context, request, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::pb::NameSysResolveResult>> PrepareAsyncNameSysResolveAsync(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::pb::NameSysResolveResult>>(PrepareAsyncNameSysResolveAsyncRaw(context, request, cq)); + } + // NameSysPublish is used to publish an IPNS record, with/with-out an EOL + virtual ::grpc::Status NameSysPublish(::grpc::ClientContext* context, const ::pb::NameSysPublishRequest& request, ::pb::Empty* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::Empty>> AsyncNameSysPublish(::grpc::ClientContext* context, const ::pb::NameSysPublishRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::Empty>>(AsyncNameSysPublishRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::Empty>> PrepareAsyncNameSysPublish(::grpc::ClientContext* context, const ::pb::NameSysPublishRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::Empty>>(PrepareAsyncNameSysPublishRaw(context, request, cq)); + } + class experimental_async_interface { + public: + virtual ~experimental_async_interface() {} + // NameSysResolve is used to resolve a name, waiting for the request to complete + virtual void NameSysResolve(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest* request, ::pb::NameSysResolveResult* response, std::function) = 0; + virtual void NameSysResolve(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::NameSysResolveResult* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void NameSysResolve(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest* request, ::pb::NameSysResolveResult* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void NameSysResolve(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest* request, ::pb::NameSysResolveResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void NameSysResolve(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::NameSysResolveResult* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void NameSysResolve(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::NameSysResolveResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + // NameSysResolveAsync is like Resolve, except instead of waiting for the request + // to complete, we send back a stream which we will send the result on + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void NameSysResolveAsync(::grpc::ClientContext* context, ::pb::NameSysResolveRequest* request, ::grpc::ClientReadReactor< ::pb::NameSysResolveResult>* reactor) = 0; + #else + virtual void NameSysResolveAsync(::grpc::ClientContext* context, ::pb::NameSysResolveRequest* request, ::grpc::experimental::ClientReadReactor< ::pb::NameSysResolveResult>* reactor) = 0; + #endif + // NameSysPublish is used to publish an IPNS record, with/with-out an EOL + virtual void NameSysPublish(::grpc::ClientContext* context, const ::pb::NameSysPublishRequest* request, ::pb::Empty* response, std::function) = 0; + virtual void NameSysPublish(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::Empty* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void NameSysPublish(::grpc::ClientContext* context, const ::pb::NameSysPublishRequest* request, ::pb::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void NameSysPublish(::grpc::ClientContext* context, const ::pb::NameSysPublishRequest* request, ::pb::Empty* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void NameSysPublish(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void NameSysPublish(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::Empty* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + }; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + typedef class experimental_async_interface async_interface; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + async_interface* async() { return experimental_async(); } + #endif + virtual class experimental_async_interface* experimental_async() { return nullptr; } + private: + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::NameSysResolveResult>* AsyncNameSysResolveRaw(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::NameSysResolveResult>* PrepareAsyncNameSysResolveRaw(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientReaderInterface< ::pb::NameSysResolveResult>* NameSysResolveAsyncRaw(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request) = 0; + virtual ::grpc::ClientAsyncReaderInterface< ::pb::NameSysResolveResult>* AsyncNameSysResolveAsyncRaw(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request, ::grpc::CompletionQueue* cq, void* tag) = 0; + virtual ::grpc::ClientAsyncReaderInterface< ::pb::NameSysResolveResult>* PrepareAsyncNameSysResolveAsyncRaw(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::Empty>* AsyncNameSysPublishRaw(::grpc::ClientContext* context, const ::pb::NameSysPublishRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::Empty>* PrepareAsyncNameSysPublishRaw(::grpc::ClientContext* context, const ::pb::NameSysPublishRequest& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel); + ::grpc::Status NameSysResolve(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request, ::pb::NameSysResolveResult* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::NameSysResolveResult>> AsyncNameSysResolve(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::NameSysResolveResult>>(AsyncNameSysResolveRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::NameSysResolveResult>> PrepareAsyncNameSysResolve(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::NameSysResolveResult>>(PrepareAsyncNameSysResolveRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientReader< ::pb::NameSysResolveResult>> NameSysResolveAsync(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request) { + return std::unique_ptr< ::grpc::ClientReader< ::pb::NameSysResolveResult>>(NameSysResolveAsyncRaw(context, request)); + } + std::unique_ptr< ::grpc::ClientAsyncReader< ::pb::NameSysResolveResult>> AsyncNameSysResolveAsync(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReader< ::pb::NameSysResolveResult>>(AsyncNameSysResolveAsyncRaw(context, request, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReader< ::pb::NameSysResolveResult>> PrepareAsyncNameSysResolveAsync(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReader< ::pb::NameSysResolveResult>>(PrepareAsyncNameSysResolveAsyncRaw(context, request, cq)); + } + ::grpc::Status NameSysPublish(::grpc::ClientContext* context, const ::pb::NameSysPublishRequest& request, ::pb::Empty* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::Empty>> AsyncNameSysPublish(::grpc::ClientContext* context, const ::pb::NameSysPublishRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::Empty>>(AsyncNameSysPublishRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::Empty>> PrepareAsyncNameSysPublish(::grpc::ClientContext* context, const ::pb::NameSysPublishRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::Empty>>(PrepareAsyncNameSysPublishRaw(context, request, cq)); + } + class experimental_async final : + public StubInterface::experimental_async_interface { + public: + void NameSysResolve(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest* request, ::pb::NameSysResolveResult* response, std::function) override; + void NameSysResolve(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::NameSysResolveResult* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void NameSysResolve(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest* request, ::pb::NameSysResolveResult* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void NameSysResolve(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest* request, ::pb::NameSysResolveResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void NameSysResolve(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::NameSysResolveResult* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void NameSysResolve(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::NameSysResolveResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void NameSysResolveAsync(::grpc::ClientContext* context, ::pb::NameSysResolveRequest* request, ::grpc::ClientReadReactor< ::pb::NameSysResolveResult>* reactor) override; + #else + void NameSysResolveAsync(::grpc::ClientContext* context, ::pb::NameSysResolveRequest* request, ::grpc::experimental::ClientReadReactor< ::pb::NameSysResolveResult>* reactor) override; + #endif + void NameSysPublish(::grpc::ClientContext* context, const ::pb::NameSysPublishRequest* request, ::pb::Empty* response, std::function) override; + void NameSysPublish(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::Empty* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void NameSysPublish(::grpc::ClientContext* context, const ::pb::NameSysPublishRequest* request, ::pb::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void NameSysPublish(::grpc::ClientContext* context, const ::pb::NameSysPublishRequest* request, ::pb::Empty* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void NameSysPublish(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void NameSysPublish(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::Empty* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + private: + friend class Stub; + explicit experimental_async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class experimental_async_interface* experimental_async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class experimental_async async_stub_{this}; + ::grpc::ClientAsyncResponseReader< ::pb::NameSysResolveResult>* AsyncNameSysResolveRaw(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::pb::NameSysResolveResult>* PrepareAsyncNameSysResolveRaw(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientReader< ::pb::NameSysResolveResult>* NameSysResolveAsyncRaw(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request) override; + ::grpc::ClientAsyncReader< ::pb::NameSysResolveResult>* AsyncNameSysResolveAsyncRaw(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request, ::grpc::CompletionQueue* cq, void* tag) override; + ::grpc::ClientAsyncReader< ::pb::NameSysResolveResult>* PrepareAsyncNameSysResolveAsyncRaw(::grpc::ClientContext* context, const ::pb::NameSysResolveRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::pb::Empty>* AsyncNameSysPublishRaw(::grpc::ClientContext* context, const ::pb::NameSysPublishRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::pb::Empty>* PrepareAsyncNameSysPublishRaw(::grpc::ClientContext* context, const ::pb::NameSysPublishRequest& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_NameSysResolve_; + const ::grpc::internal::RpcMethod rpcmethod_NameSysResolveAsync_; + const ::grpc::internal::RpcMethod rpcmethod_NameSysPublish_; + }; + static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + + class Service : public ::grpc::Service { + public: + Service(); + virtual ~Service(); + // NameSysResolve is used to resolve a name, waiting for the request to complete + virtual ::grpc::Status NameSysResolve(::grpc::ServerContext* context, const ::pb::NameSysResolveRequest* request, ::pb::NameSysResolveResult* response); + // NameSysResolveAsync is like Resolve, except instead of waiting for the request + // to complete, we send back a stream which we will send the result on + virtual ::grpc::Status NameSysResolveAsync(::grpc::ServerContext* context, const ::pb::NameSysResolveRequest* request, ::grpc::ServerWriter< ::pb::NameSysResolveResult>* writer); + // NameSysPublish is used to publish an IPNS record, with/with-out an EOL + virtual ::grpc::Status NameSysPublish(::grpc::ServerContext* context, const ::pb::NameSysPublishRequest* request, ::pb::Empty* response); + }; + template + class WithAsyncMethod_NameSysResolve : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_NameSysResolve() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_NameSysResolve() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status NameSysResolve(::grpc::ServerContext* /*context*/, const ::pb::NameSysResolveRequest* /*request*/, ::pb::NameSysResolveResult* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestNameSysResolve(::grpc::ServerContext* context, ::pb::NameSysResolveRequest* request, ::grpc::ServerAsyncResponseWriter< ::pb::NameSysResolveResult>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_NameSysResolveAsync : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_NameSysResolveAsync() { + ::grpc::Service::MarkMethodAsync(1); + } + ~WithAsyncMethod_NameSysResolveAsync() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status NameSysResolveAsync(::grpc::ServerContext* /*context*/, const ::pb::NameSysResolveRequest* /*request*/, ::grpc::ServerWriter< ::pb::NameSysResolveResult>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestNameSysResolveAsync(::grpc::ServerContext* context, ::pb::NameSysResolveRequest* request, ::grpc::ServerAsyncWriter< ::pb::NameSysResolveResult>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncServerStreaming(1, context, request, writer, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_NameSysPublish : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_NameSysPublish() { + ::grpc::Service::MarkMethodAsync(2); + } + ~WithAsyncMethod_NameSysPublish() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status NameSysPublish(::grpc::ServerContext* /*context*/, const ::pb::NameSysPublishRequest* /*request*/, ::pb::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestNameSysPublish(::grpc::ServerContext* context, ::pb::NameSysPublishRequest* request, ::grpc::ServerAsyncResponseWriter< ::pb::Empty>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); + } + }; + typedef WithAsyncMethod_NameSysResolve > > AsyncService; + template + class ExperimentalWithCallbackMethod_NameSysResolve : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_NameSysResolve() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(0, + new ::grpc_impl::internal::CallbackUnaryHandler< ::pb::NameSysResolveRequest, ::pb::NameSysResolveResult>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::pb::NameSysResolveRequest* request, ::pb::NameSysResolveResult* response) { return this->NameSysResolve(context, request, response); }));} + void SetMessageAllocatorFor_NameSysResolve( + ::grpc::experimental::MessageAllocator< ::pb::NameSysResolveRequest, ::pb::NameSysResolveResult>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(0); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::pb::NameSysResolveRequest, ::pb::NameSysResolveResult>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_NameSysResolve() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status NameSysResolve(::grpc::ServerContext* /*context*/, const ::pb::NameSysResolveRequest* /*request*/, ::pb::NameSysResolveResult* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* NameSysResolve( + ::grpc::CallbackServerContext* /*context*/, const ::pb::NameSysResolveRequest* /*request*/, ::pb::NameSysResolveResult* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* NameSysResolve( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::pb::NameSysResolveRequest* /*request*/, ::pb::NameSysResolveResult* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_NameSysResolveAsync : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_NameSysResolveAsync() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(1, + new ::grpc_impl::internal::CallbackServerStreamingHandler< ::pb::NameSysResolveRequest, ::pb::NameSysResolveResult>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::pb::NameSysResolveRequest* request) { return this->NameSysResolveAsync(context, request); })); + } + ~ExperimentalWithCallbackMethod_NameSysResolveAsync() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status NameSysResolveAsync(::grpc::ServerContext* /*context*/, const ::pb::NameSysResolveRequest* /*request*/, ::grpc::ServerWriter< ::pb::NameSysResolveResult>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerWriteReactor< ::pb::NameSysResolveResult>* NameSysResolveAsync( + ::grpc::CallbackServerContext* /*context*/, const ::pb::NameSysResolveRequest* /*request*/) + #else + virtual ::grpc::experimental::ServerWriteReactor< ::pb::NameSysResolveResult>* NameSysResolveAsync( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::pb::NameSysResolveRequest* /*request*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_NameSysPublish : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_NameSysPublish() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(2, + new ::grpc_impl::internal::CallbackUnaryHandler< ::pb::NameSysPublishRequest, ::pb::Empty>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::pb::NameSysPublishRequest* request, ::pb::Empty* response) { return this->NameSysPublish(context, request, response); }));} + void SetMessageAllocatorFor_NameSysPublish( + ::grpc::experimental::MessageAllocator< ::pb::NameSysPublishRequest, ::pb::Empty>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(2); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(2); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::pb::NameSysPublishRequest, ::pb::Empty>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_NameSysPublish() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status NameSysPublish(::grpc::ServerContext* /*context*/, const ::pb::NameSysPublishRequest* /*request*/, ::pb::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* NameSysPublish( + ::grpc::CallbackServerContext* /*context*/, const ::pb::NameSysPublishRequest* /*request*/, ::pb::Empty* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* NameSysPublish( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::pb::NameSysPublishRequest* /*request*/, ::pb::Empty* /*response*/) + #endif + { return nullptr; } + }; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + typedef ExperimentalWithCallbackMethod_NameSysResolve > > CallbackService; + #endif + + typedef ExperimentalWithCallbackMethod_NameSysResolve > > ExperimentalCallbackService; + template + class WithGenericMethod_NameSysResolve : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_NameSysResolve() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_NameSysResolve() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status NameSysResolve(::grpc::ServerContext* /*context*/, const ::pb::NameSysResolveRequest* /*request*/, ::pb::NameSysResolveResult* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_NameSysResolveAsync : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_NameSysResolveAsync() { + ::grpc::Service::MarkMethodGeneric(1); + } + ~WithGenericMethod_NameSysResolveAsync() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status NameSysResolveAsync(::grpc::ServerContext* /*context*/, const ::pb::NameSysResolveRequest* /*request*/, ::grpc::ServerWriter< ::pb::NameSysResolveResult>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_NameSysPublish : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_NameSysPublish() { + ::grpc::Service::MarkMethodGeneric(2); + } + ~WithGenericMethod_NameSysPublish() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status NameSysPublish(::grpc::ServerContext* /*context*/, const ::pb::NameSysPublishRequest* /*request*/, ::pb::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_NameSysResolve : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_NameSysResolve() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_NameSysResolve() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status NameSysResolve(::grpc::ServerContext* /*context*/, const ::pb::NameSysResolveRequest* /*request*/, ::pb::NameSysResolveResult* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestNameSysResolve(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_NameSysResolveAsync : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_NameSysResolveAsync() { + ::grpc::Service::MarkMethodRaw(1); + } + ~WithRawMethod_NameSysResolveAsync() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status NameSysResolveAsync(::grpc::ServerContext* /*context*/, const ::pb::NameSysResolveRequest* /*request*/, ::grpc::ServerWriter< ::pb::NameSysResolveResult>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestNameSysResolveAsync(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncServerStreaming(1, context, request, writer, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_NameSysPublish : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_NameSysPublish() { + ::grpc::Service::MarkMethodRaw(2); + } + ~WithRawMethod_NameSysPublish() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status NameSysPublish(::grpc::ServerContext* /*context*/, const ::pb::NameSysPublishRequest* /*request*/, ::pb::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestNameSysPublish(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class ExperimentalWithRawCallbackMethod_NameSysResolve : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_NameSysResolve() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(0, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->NameSysResolve(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_NameSysResolve() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status NameSysResolve(::grpc::ServerContext* /*context*/, const ::pb::NameSysResolveRequest* /*request*/, ::pb::NameSysResolveResult* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* NameSysResolve( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* NameSysResolve( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_NameSysResolveAsync : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_NameSysResolveAsync() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(1, + new ::grpc_impl::internal::CallbackServerStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const::grpc::ByteBuffer* request) { return this->NameSysResolveAsync(context, request); })); + } + ~ExperimentalWithRawCallbackMethod_NameSysResolveAsync() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status NameSysResolveAsync(::grpc::ServerContext* /*context*/, const ::pb::NameSysResolveRequest* /*request*/, ::grpc::ServerWriter< ::pb::NameSysResolveResult>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerWriteReactor< ::grpc::ByteBuffer>* NameSysResolveAsync( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/) + #else + virtual ::grpc::experimental::ServerWriteReactor< ::grpc::ByteBuffer>* NameSysResolveAsync( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_NameSysPublish : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_NameSysPublish() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(2, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->NameSysPublish(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_NameSysPublish() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status NameSysPublish(::grpc::ServerContext* /*context*/, const ::pb::NameSysPublishRequest* /*request*/, ::pb::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* NameSysPublish( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* NameSysPublish( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class WithStreamedUnaryMethod_NameSysResolve : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_NameSysResolve() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::StreamedUnaryHandler< ::pb::NameSysResolveRequest, ::pb::NameSysResolveResult>(std::bind(&WithStreamedUnaryMethod_NameSysResolve::StreamedNameSysResolve, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_NameSysResolve() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status NameSysResolve(::grpc::ServerContext* /*context*/, const ::pb::NameSysResolveRequest* /*request*/, ::pb::NameSysResolveResult* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedNameSysResolve(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::pb::NameSysResolveRequest,::pb::NameSysResolveResult>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_NameSysPublish : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_NameSysPublish() { + ::grpc::Service::MarkMethodStreamed(2, + new ::grpc::internal::StreamedUnaryHandler< ::pb::NameSysPublishRequest, ::pb::Empty>(std::bind(&WithStreamedUnaryMethod_NameSysPublish::StreamedNameSysPublish, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_NameSysPublish() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status NameSysPublish(::grpc::ServerContext* /*context*/, const ::pb::NameSysPublishRequest* /*request*/, ::pb::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedNameSysPublish(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::pb::NameSysPublishRequest,::pb::Empty>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_NameSysResolve > StreamedUnaryService; + template + class WithSplitStreamingMethod_NameSysResolveAsync : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithSplitStreamingMethod_NameSysResolveAsync() { + ::grpc::Service::MarkMethodStreamed(1, + new ::grpc::internal::SplitServerStreamingHandler< ::pb::NameSysResolveRequest, ::pb::NameSysResolveResult>(std::bind(&WithSplitStreamingMethod_NameSysResolveAsync::StreamedNameSysResolveAsync, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithSplitStreamingMethod_NameSysResolveAsync() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status NameSysResolveAsync(::grpc::ServerContext* /*context*/, const ::pb::NameSysResolveRequest* /*request*/, ::grpc::ServerWriter< ::pb::NameSysResolveResult>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with split streamed + virtual ::grpc::Status StreamedNameSysResolveAsync(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::pb::NameSysResolveRequest,::pb::NameSysResolveResult>* server_split_streamer) = 0; + }; + typedef WithSplitStreamingMethod_NameSysResolveAsync SplitStreamedService; + typedef WithStreamedUnaryMethod_NameSysResolve > > StreamedService; +}; + +} // namespace pb + + +#endif // GRPC_namesys_2eproto__INCLUDED diff --git a/cpp/namesys.pb.cc b/cpp/namesys.pb.cc new file mode 100644 index 0000000..14cea9d --- /dev/null +++ b/cpp/namesys.pb.cc @@ -0,0 +1,975 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: namesys.proto + +#include "namesys.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include +namespace pb { +class NameSysResolveRequestDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _NameSysResolveRequest_default_instance_; +class NameSysResolveResultDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _NameSysResolveResult_default_instance_; +class NameSysPublishRequestDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _NameSysPublishRequest_default_instance_; +} // namespace pb +static void InitDefaultsscc_info_NameSysPublishRequest_namesys_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_NameSysPublishRequest_default_instance_; + new (ptr) ::pb::NameSysPublishRequest(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::NameSysPublishRequest::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_NameSysPublishRequest_namesys_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_NameSysPublishRequest_namesys_2eproto}, {}}; + +static void InitDefaultsscc_info_NameSysResolveRequest_namesys_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_NameSysResolveRequest_default_instance_; + new (ptr) ::pb::NameSysResolveRequest(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::NameSysResolveRequest::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_NameSysResolveRequest_namesys_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_NameSysResolveRequest_namesys_2eproto}, {}}; + +static void InitDefaultsscc_info_NameSysResolveResult_namesys_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_NameSysResolveResult_default_instance_; + new (ptr) ::pb::NameSysResolveResult(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::NameSysResolveResult::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_NameSysResolveResult_namesys_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_NameSysResolveResult_namesys_2eproto}, {}}; + +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_namesys_2eproto[3]; +static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_namesys_2eproto = nullptr; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_namesys_2eproto = nullptr; + +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_namesys_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::NameSysResolveRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::NameSysResolveRequest, name_), + PROTOBUF_FIELD_OFFSET(::pb::NameSysResolveRequest, depth_), + PROTOBUF_FIELD_OFFSET(::pb::NameSysResolveRequest, dhtrecordcount_), + PROTOBUF_FIELD_OFFSET(::pb::NameSysResolveRequest, dhttimeout_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::NameSysResolveResult, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::NameSysResolveResult, path_), + PROTOBUF_FIELD_OFFSET(::pb::NameSysResolveResult, error_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::NameSysPublishRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::NameSysPublishRequest, privatekey_), + PROTOBUF_FIELD_OFFSET(::pb::NameSysPublishRequest, value_), + PROTOBUF_FIELD_OFFSET(::pb::NameSysPublishRequest, eol_), + PROTOBUF_FIELD_OFFSET(::pb::NameSysPublishRequest, ttl_), +}; +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(::pb::NameSysResolveRequest)}, + { 9, -1, sizeof(::pb::NameSysResolveResult)}, + { 16, -1, sizeof(::pb::NameSysPublishRequest)}, +}; + +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&::pb::_NameSysResolveRequest_default_instance_), + reinterpret_cast(&::pb::_NameSysResolveResult_default_instance_), + reinterpret_cast(&::pb::_NameSysPublishRequest_default_instance_), +}; + +const char descriptor_table_protodef_namesys_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\rnamesys.proto\022\002pb\032\nutil.proto\"`\n\025NameS" + "ysResolveRequest\022\014\n\004name\030\001 \001(\t\022\r\n\005depth\030" + "\002 \001(\r\022\026\n\016dhtRecordCount\030\003 \001(\r\022\022\n\ndhtTime" + "out\030\004 \001(\005\"3\n\024NameSysResolveResult\022\014\n\004pat" + "h\030\001 \001(\t\022\r\n\005error\030\002 \001(\t\"T\n\025NameSysPublish" + "Request\022\022\n\nprivateKey\030\001 \001(\014\022\r\n\005value\030\002 \001" + "(\t\022\013\n\003eol\030\003 \001(\005\022\013\n\003ttl\030\004 \001(\0052\337\001\n\nNameSys" + "API\022G\n\016NameSysResolve\022\031.pb.NameSysResolv" + "eRequest\032\030.pb.NameSysResolveResult\"\000\022N\n\023" + "NameSysResolveAsync\022\031.pb.NameSysResolveR" + "equest\032\030.pb.NameSysResolveResult\"\0000\001\0228\n\016" + "NameSysPublish\022\031.pb.NameSysPublishReques" + "t\032\t.pb.Empty\"\000b\006proto3" + ; +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_namesys_2eproto_deps[1] = { + &::descriptor_table_util_2eproto, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_namesys_2eproto_sccs[3] = { + &scc_info_NameSysPublishRequest_namesys_2eproto.base, + &scc_info_NameSysResolveRequest_namesys_2eproto.base, + &scc_info_NameSysResolveResult_namesys_2eproto.base, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_namesys_2eproto_once; +static bool descriptor_table_namesys_2eproto_initialized = false; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_namesys_2eproto = { + &descriptor_table_namesys_2eproto_initialized, descriptor_table_protodef_namesys_2eproto, "namesys.proto", 502, + &descriptor_table_namesys_2eproto_once, descriptor_table_namesys_2eproto_sccs, descriptor_table_namesys_2eproto_deps, 3, 1, + schemas, file_default_instances, TableStruct_namesys_2eproto::offsets, + file_level_metadata_namesys_2eproto, 3, file_level_enum_descriptors_namesys_2eproto, file_level_service_descriptors_namesys_2eproto, +}; + +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_namesys_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_namesys_2eproto), true); +namespace pb { + +// =================================================================== + +void NameSysResolveRequest::InitAsDefaultInstance() { +} +class NameSysResolveRequest::_Internal { + public: +}; + +NameSysResolveRequest::NameSysResolveRequest() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.NameSysResolveRequest) +} +NameSysResolveRequest::NameSysResolveRequest(const NameSysResolveRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_name().empty()) { + name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); + } + ::memcpy(&depth_, &from.depth_, + static_cast(reinterpret_cast(&dhttimeout_) - + reinterpret_cast(&depth_)) + sizeof(dhttimeout_)); + // @@protoc_insertion_point(copy_constructor:pb.NameSysResolveRequest) +} + +void NameSysResolveRequest::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_NameSysResolveRequest_namesys_2eproto.base); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&depth_, 0, static_cast( + reinterpret_cast(&dhttimeout_) - + reinterpret_cast(&depth_)) + sizeof(dhttimeout_)); +} + +NameSysResolveRequest::~NameSysResolveRequest() { + // @@protoc_insertion_point(destructor:pb.NameSysResolveRequest) + SharedDtor(); +} + +void NameSysResolveRequest::SharedDtor() { + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void NameSysResolveRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const NameSysResolveRequest& NameSysResolveRequest::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_NameSysResolveRequest_namesys_2eproto.base); + return *internal_default_instance(); +} + + +void NameSysResolveRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.NameSysResolveRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&depth_, 0, static_cast( + reinterpret_cast(&dhttimeout_) - + reinterpret_cast(&depth_)) + sizeof(dhttimeout_)); + _internal_metadata_.Clear(); +} + +const char* NameSysResolveRequest::_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 name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.NameSysResolveRequest.name")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // uint32 depth = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + depth_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // uint32 dhtRecordCount = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + dhtrecordcount_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // int32 dhtTimeout = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + dhttimeout_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* NameSysResolveRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.NameSysResolveRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string name = 1; + if (this->name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.NameSysResolveRequest.name"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); + } + + // uint32 depth = 2; + if (this->depth() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(2, this->_internal_depth(), target); + } + + // uint32 dhtRecordCount = 3; + if (this->dhtrecordcount() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(3, this->_internal_dhtrecordcount(), target); + } + + // int32 dhtTimeout = 4; + if (this->dhttimeout() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_dhttimeout(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.NameSysResolveRequest) + return target; +} + +size_t NameSysResolveRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.NameSysResolveRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string name = 1; + if (this->name().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // uint32 depth = 2; + if (this->depth() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size( + this->_internal_depth()); + } + + // uint32 dhtRecordCount = 3; + if (this->dhtrecordcount() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size( + this->_internal_dhtrecordcount()); + } + + // int32 dhtTimeout = 4; + if (this->dhttimeout() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_dhttimeout()); + } + + 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 NameSysResolveRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.NameSysResolveRequest) + GOOGLE_DCHECK_NE(&from, this); + const NameSysResolveRequest* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.NameSysResolveRequest) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.NameSysResolveRequest) + MergeFrom(*source); + } +} + +void NameSysResolveRequest::MergeFrom(const NameSysResolveRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.NameSysResolveRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.name().size() > 0) { + + name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); + } + if (from.depth() != 0) { + _internal_set_depth(from._internal_depth()); + } + if (from.dhtrecordcount() != 0) { + _internal_set_dhtrecordcount(from._internal_dhtrecordcount()); + } + if (from.dhttimeout() != 0) { + _internal_set_dhttimeout(from._internal_dhttimeout()); + } +} + +void NameSysResolveRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.NameSysResolveRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void NameSysResolveRequest::CopyFrom(const NameSysResolveRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.NameSysResolveRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool NameSysResolveRequest::IsInitialized() const { + return true; +} + +void NameSysResolveRequest::InternalSwap(NameSysResolveRequest* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(depth_, other->depth_); + swap(dhtrecordcount_, other->dhtrecordcount_); + swap(dhttimeout_, other->dhttimeout_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata NameSysResolveRequest::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void NameSysResolveResult::InitAsDefaultInstance() { +} +class NameSysResolveResult::_Internal { + public: +}; + +NameSysResolveResult::NameSysResolveResult() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.NameSysResolveResult) +} +NameSysResolveResult::NameSysResolveResult(const NameSysResolveResult& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + path_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_path().empty()) { + path_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.path_); + } + error_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_error().empty()) { + error_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.error_); + } + // @@protoc_insertion_point(copy_constructor:pb.NameSysResolveResult) +} + +void NameSysResolveResult::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_NameSysResolveResult_namesys_2eproto.base); + path_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + error_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +NameSysResolveResult::~NameSysResolveResult() { + // @@protoc_insertion_point(destructor:pb.NameSysResolveResult) + SharedDtor(); +} + +void NameSysResolveResult::SharedDtor() { + path_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + error_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void NameSysResolveResult::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const NameSysResolveResult& NameSysResolveResult::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_NameSysResolveResult_namesys_2eproto.base); + return *internal_default_instance(); +} + + +void NameSysResolveResult::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.NameSysResolveResult) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + path_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + error_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + _internal_metadata_.Clear(); +} + +const char* NameSysResolveResult::_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 path = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_path(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.NameSysResolveResult.path")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string error = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_error(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.NameSysResolveResult.error")); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* NameSysResolveResult::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.NameSysResolveResult) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string path = 1; + if (this->path().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_path().data(), static_cast(this->_internal_path().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.NameSysResolveResult.path"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_path(), target); + } + + // string error = 2; + if (this->error().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_error().data(), static_cast(this->_internal_error().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.NameSysResolveResult.error"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_error(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.NameSysResolveResult) + return target; +} + +size_t NameSysResolveResult::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.NameSysResolveResult) + 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 path = 1; + if (this->path().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_path()); + } + + // string error = 2; + if (this->error().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_error()); + } + + 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 NameSysResolveResult::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.NameSysResolveResult) + GOOGLE_DCHECK_NE(&from, this); + const NameSysResolveResult* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.NameSysResolveResult) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.NameSysResolveResult) + MergeFrom(*source); + } +} + +void NameSysResolveResult::MergeFrom(const NameSysResolveResult& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.NameSysResolveResult) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.path().size() > 0) { + + path_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.path_); + } + if (from.error().size() > 0) { + + error_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.error_); + } +} + +void NameSysResolveResult::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.NameSysResolveResult) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void NameSysResolveResult::CopyFrom(const NameSysResolveResult& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.NameSysResolveResult) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool NameSysResolveResult::IsInitialized() const { + return true; +} + +void NameSysResolveResult::InternalSwap(NameSysResolveResult* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + path_.Swap(&other->path_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + error_.Swap(&other->error_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} + +::PROTOBUF_NAMESPACE_ID::Metadata NameSysResolveResult::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void NameSysPublishRequest::InitAsDefaultInstance() { +} +class NameSysPublishRequest::_Internal { + public: +}; + +NameSysPublishRequest::NameSysPublishRequest() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.NameSysPublishRequest) +} +NameSysPublishRequest::NameSysPublishRequest(const NameSysPublishRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + privatekey_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_privatekey().empty()) { + privatekey_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.privatekey_); + } + value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_value().empty()) { + value_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.value_); + } + ::memcpy(&eol_, &from.eol_, + static_cast(reinterpret_cast(&ttl_) - + reinterpret_cast(&eol_)) + sizeof(ttl_)); + // @@protoc_insertion_point(copy_constructor:pb.NameSysPublishRequest) +} + +void NameSysPublishRequest::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_NameSysPublishRequest_namesys_2eproto.base); + privatekey_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&eol_, 0, static_cast( + reinterpret_cast(&ttl_) - + reinterpret_cast(&eol_)) + sizeof(ttl_)); +} + +NameSysPublishRequest::~NameSysPublishRequest() { + // @@protoc_insertion_point(destructor:pb.NameSysPublishRequest) + SharedDtor(); +} + +void NameSysPublishRequest::SharedDtor() { + privatekey_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + value_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void NameSysPublishRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const NameSysPublishRequest& NameSysPublishRequest::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_NameSysPublishRequest_namesys_2eproto.base); + return *internal_default_instance(); +} + + +void NameSysPublishRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.NameSysPublishRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + privatekey_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + value_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&eol_, 0, static_cast( + reinterpret_cast(&ttl_) - + reinterpret_cast(&eol_)) + sizeof(ttl_)); + _internal_metadata_.Clear(); +} + +const char* NameSysPublishRequest::_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) { + // bytes privateKey = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_privatekey(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string value = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_value(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.NameSysPublishRequest.value")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // int32 eol = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + eol_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // int32 ttl = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + ttl_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* NameSysPublishRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.NameSysPublishRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bytes privateKey = 1; + if (this->privatekey().size() > 0) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_privatekey(), target); + } + + // string value = 2; + if (this->value().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_value().data(), static_cast(this->_internal_value().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.NameSysPublishRequest.value"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_value(), target); + } + + // int32 eol = 3; + if (this->eol() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_eol(), target); + } + + // int32 ttl = 4; + if (this->ttl() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_ttl(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.NameSysPublishRequest) + return target; +} + +size_t NameSysPublishRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.NameSysPublishRequest) + 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; + + // bytes privateKey = 1; + if (this->privatekey().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_privatekey()); + } + + // string value = 2; + if (this->value().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_value()); + } + + // int32 eol = 3; + if (this->eol() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_eol()); + } + + // int32 ttl = 4; + if (this->ttl() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_ttl()); + } + + 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 NameSysPublishRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.NameSysPublishRequest) + GOOGLE_DCHECK_NE(&from, this); + const NameSysPublishRequest* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.NameSysPublishRequest) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.NameSysPublishRequest) + MergeFrom(*source); + } +} + +void NameSysPublishRequest::MergeFrom(const NameSysPublishRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.NameSysPublishRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.privatekey().size() > 0) { + + privatekey_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.privatekey_); + } + if (from.value().size() > 0) { + + value_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.value_); + } + if (from.eol() != 0) { + _internal_set_eol(from._internal_eol()); + } + if (from.ttl() != 0) { + _internal_set_ttl(from._internal_ttl()); + } +} + +void NameSysPublishRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.NameSysPublishRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void NameSysPublishRequest::CopyFrom(const NameSysPublishRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.NameSysPublishRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool NameSysPublishRequest::IsInitialized() const { + return true; +} + +void NameSysPublishRequest::InternalSwap(NameSysPublishRequest* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + privatekey_.Swap(&other->privatekey_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + value_.Swap(&other->value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(eol_, other->eol_); + swap(ttl_, other->ttl_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata NameSysPublishRequest::GetMetadata() const { + return GetMetadataStatic(); +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace pb +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::pb::NameSysResolveRequest* Arena::CreateMaybeMessage< ::pb::NameSysResolveRequest >(Arena* arena) { + return Arena::CreateInternal< ::pb::NameSysResolveRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::NameSysResolveResult* Arena::CreateMaybeMessage< ::pb::NameSysResolveResult >(Arena* arena) { + return Arena::CreateInternal< ::pb::NameSysResolveResult >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::NameSysPublishRequest* Arena::CreateMaybeMessage< ::pb::NameSysPublishRequest >(Arena* arena) { + return Arena::CreateInternal< ::pb::NameSysPublishRequest >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/cpp/namesys.pb.h b/cpp/namesys.pb.h new file mode 100644 index 0000000..1d6fcfc --- /dev/null +++ b/cpp/namesys.pb.h @@ -0,0 +1,1006 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: namesys.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_namesys_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_namesys_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3011000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3011002 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include "util.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_namesys_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_namesys_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[3] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_namesys_2eproto; +namespace pb { +class NameSysPublishRequest; +class NameSysPublishRequestDefaultTypeInternal; +extern NameSysPublishRequestDefaultTypeInternal _NameSysPublishRequest_default_instance_; +class NameSysResolveRequest; +class NameSysResolveRequestDefaultTypeInternal; +extern NameSysResolveRequestDefaultTypeInternal _NameSysResolveRequest_default_instance_; +class NameSysResolveResult; +class NameSysResolveResultDefaultTypeInternal; +extern NameSysResolveResultDefaultTypeInternal _NameSysResolveResult_default_instance_; +} // namespace pb +PROTOBUF_NAMESPACE_OPEN +template<> ::pb::NameSysPublishRequest* Arena::CreateMaybeMessage<::pb::NameSysPublishRequest>(Arena*); +template<> ::pb::NameSysResolveRequest* Arena::CreateMaybeMessage<::pb::NameSysResolveRequest>(Arena*); +template<> ::pb::NameSysResolveResult* Arena::CreateMaybeMessage<::pb::NameSysResolveResult>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace pb { + +// =================================================================== + +class NameSysResolveRequest : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.NameSysResolveRequest) */ { + public: + NameSysResolveRequest(); + virtual ~NameSysResolveRequest(); + + NameSysResolveRequest(const NameSysResolveRequest& from); + NameSysResolveRequest(NameSysResolveRequest&& from) noexcept + : NameSysResolveRequest() { + *this = ::std::move(from); + } + + inline NameSysResolveRequest& operator=(const NameSysResolveRequest& from) { + CopyFrom(from); + return *this; + } + inline NameSysResolveRequest& operator=(NameSysResolveRequest&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 NameSysResolveRequest& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const NameSysResolveRequest* internal_default_instance() { + return reinterpret_cast( + &_NameSysResolveRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(NameSysResolveRequest& a, NameSysResolveRequest& b) { + a.Swap(&b); + } + inline void Swap(NameSysResolveRequest* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline NameSysResolveRequest* New() const final { + return CreateMaybeMessage(nullptr); + } + + NameSysResolveRequest* 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 NameSysResolveRequest& from); + void MergeFrom(const NameSysResolveRequest& 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(NameSysResolveRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.NameSysResolveRequest"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_namesys_2eproto); + return ::descriptor_table_namesys_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + kDepthFieldNumber = 2, + kDhtRecordCountFieldNumber = 3, + kDhtTimeoutFieldNumber = 4, + }; + // string name = 1; + void clear_name(); + const std::string& name() const; + void set_name(const std::string& value); + void set_name(std::string&& value); + void set_name(const char* value); + void set_name(const char* value, size_t size); + std::string* mutable_name(); + std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // uint32 depth = 2; + void clear_depth(); + ::PROTOBUF_NAMESPACE_ID::uint32 depth() const; + void set_depth(::PROTOBUF_NAMESPACE_ID::uint32 value); + private: + ::PROTOBUF_NAMESPACE_ID::uint32 _internal_depth() const; + void _internal_set_depth(::PROTOBUF_NAMESPACE_ID::uint32 value); + public: + + // uint32 dhtRecordCount = 3; + void clear_dhtrecordcount(); + ::PROTOBUF_NAMESPACE_ID::uint32 dhtrecordcount() const; + void set_dhtrecordcount(::PROTOBUF_NAMESPACE_ID::uint32 value); + private: + ::PROTOBUF_NAMESPACE_ID::uint32 _internal_dhtrecordcount() const; + void _internal_set_dhtrecordcount(::PROTOBUF_NAMESPACE_ID::uint32 value); + public: + + // int32 dhtTimeout = 4; + void clear_dhttimeout(); + ::PROTOBUF_NAMESPACE_ID::int32 dhttimeout() const; + void set_dhttimeout(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_dhttimeout() const; + void _internal_set_dhttimeout(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // @@protoc_insertion_point(class_scope:pb.NameSysResolveRequest) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::uint32 depth_; + ::PROTOBUF_NAMESPACE_ID::uint32 dhtrecordcount_; + ::PROTOBUF_NAMESPACE_ID::int32 dhttimeout_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_namesys_2eproto; +}; +// ------------------------------------------------------------------- + +class NameSysResolveResult : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.NameSysResolveResult) */ { + public: + NameSysResolveResult(); + virtual ~NameSysResolveResult(); + + NameSysResolveResult(const NameSysResolveResult& from); + NameSysResolveResult(NameSysResolveResult&& from) noexcept + : NameSysResolveResult() { + *this = ::std::move(from); + } + + inline NameSysResolveResult& operator=(const NameSysResolveResult& from) { + CopyFrom(from); + return *this; + } + inline NameSysResolveResult& operator=(NameSysResolveResult&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 NameSysResolveResult& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const NameSysResolveResult* internal_default_instance() { + return reinterpret_cast( + &_NameSysResolveResult_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(NameSysResolveResult& a, NameSysResolveResult& b) { + a.Swap(&b); + } + inline void Swap(NameSysResolveResult* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline NameSysResolveResult* New() const final { + return CreateMaybeMessage(nullptr); + } + + NameSysResolveResult* 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 NameSysResolveResult& from); + void MergeFrom(const NameSysResolveResult& 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(NameSysResolveResult* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.NameSysResolveResult"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_namesys_2eproto); + return ::descriptor_table_namesys_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kPathFieldNumber = 1, + kErrorFieldNumber = 2, + }; + // string path = 1; + void clear_path(); + const std::string& path() const; + void set_path(const std::string& value); + void set_path(std::string&& value); + void set_path(const char* value); + void set_path(const char* value, size_t size); + std::string* mutable_path(); + std::string* release_path(); + void set_allocated_path(std::string* path); + private: + const std::string& _internal_path() const; + void _internal_set_path(const std::string& value); + std::string* _internal_mutable_path(); + public: + + // string error = 2; + void clear_error(); + const std::string& error() const; + void set_error(const std::string& value); + void set_error(std::string&& value); + void set_error(const char* value); + void set_error(const char* value, size_t size); + std::string* mutable_error(); + std::string* release_error(); + void set_allocated_error(std::string* error); + private: + const std::string& _internal_error() const; + void _internal_set_error(const std::string& value); + std::string* _internal_mutable_error(); + public: + + // @@protoc_insertion_point(class_scope:pb.NameSysResolveResult) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr path_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr error_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_namesys_2eproto; +}; +// ------------------------------------------------------------------- + +class NameSysPublishRequest : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.NameSysPublishRequest) */ { + public: + NameSysPublishRequest(); + virtual ~NameSysPublishRequest(); + + NameSysPublishRequest(const NameSysPublishRequest& from); + NameSysPublishRequest(NameSysPublishRequest&& from) noexcept + : NameSysPublishRequest() { + *this = ::std::move(from); + } + + inline NameSysPublishRequest& operator=(const NameSysPublishRequest& from) { + CopyFrom(from); + return *this; + } + inline NameSysPublishRequest& operator=(NameSysPublishRequest&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 NameSysPublishRequest& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const NameSysPublishRequest* internal_default_instance() { + return reinterpret_cast( + &_NameSysPublishRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(NameSysPublishRequest& a, NameSysPublishRequest& b) { + a.Swap(&b); + } + inline void Swap(NameSysPublishRequest* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline NameSysPublishRequest* New() const final { + return CreateMaybeMessage(nullptr); + } + + NameSysPublishRequest* 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 NameSysPublishRequest& from); + void MergeFrom(const NameSysPublishRequest& 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(NameSysPublishRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.NameSysPublishRequest"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_namesys_2eproto); + return ::descriptor_table_namesys_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kPrivateKeyFieldNumber = 1, + kValueFieldNumber = 2, + kEolFieldNumber = 3, + kTtlFieldNumber = 4, + }; + // bytes privateKey = 1; + void clear_privatekey(); + const std::string& privatekey() const; + void set_privatekey(const std::string& value); + void set_privatekey(std::string&& value); + void set_privatekey(const char* value); + void set_privatekey(const void* value, size_t size); + std::string* mutable_privatekey(); + std::string* release_privatekey(); + void set_allocated_privatekey(std::string* privatekey); + private: + const std::string& _internal_privatekey() const; + void _internal_set_privatekey(const std::string& value); + std::string* _internal_mutable_privatekey(); + public: + + // string value = 2; + void clear_value(); + const std::string& value() const; + void set_value(const std::string& value); + void set_value(std::string&& value); + void set_value(const char* value); + void set_value(const char* value, size_t size); + std::string* mutable_value(); + std::string* release_value(); + void set_allocated_value(std::string* value); + private: + const std::string& _internal_value() const; + void _internal_set_value(const std::string& value); + std::string* _internal_mutable_value(); + public: + + // int32 eol = 3; + void clear_eol(); + ::PROTOBUF_NAMESPACE_ID::int32 eol() const; + void set_eol(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_eol() const; + void _internal_set_eol(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // int32 ttl = 4; + void clear_ttl(); + ::PROTOBUF_NAMESPACE_ID::int32 ttl() const; + void set_ttl(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_ttl() const; + void _internal_set_ttl(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // @@protoc_insertion_point(class_scope:pb.NameSysPublishRequest) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr privatekey_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_; + ::PROTOBUF_NAMESPACE_ID::int32 eol_; + ::PROTOBUF_NAMESPACE_ID::int32 ttl_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_namesys_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// NameSysResolveRequest + +// string name = 1; +inline void NameSysResolveRequest::clear_name() { + name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& NameSysResolveRequest::name() const { + // @@protoc_insertion_point(field_get:pb.NameSysResolveRequest.name) + return _internal_name(); +} +inline void NameSysResolveRequest::set_name(const std::string& value) { + _internal_set_name(value); + // @@protoc_insertion_point(field_set:pb.NameSysResolveRequest.name) +} +inline std::string* NameSysResolveRequest::mutable_name() { + // @@protoc_insertion_point(field_mutable:pb.NameSysResolveRequest.name) + return _internal_mutable_name(); +} +inline const std::string& NameSysResolveRequest::_internal_name() const { + return name_.GetNoArena(); +} +inline void NameSysResolveRequest::_internal_set_name(const std::string& value) { + + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void NameSysResolveRequest::set_name(std::string&& value) { + + name_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.NameSysResolveRequest.name) +} +inline void NameSysResolveRequest::set_name(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.NameSysResolveRequest.name) +} +inline void NameSysResolveRequest::set_name(const char* value, size_t size) { + + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.NameSysResolveRequest.name) +} +inline std::string* NameSysResolveRequest::_internal_mutable_name() { + + return name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* NameSysResolveRequest::release_name() { + // @@protoc_insertion_point(field_release:pb.NameSysResolveRequest.name) + + return name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void NameSysResolveRequest::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:pb.NameSysResolveRequest.name) +} + +// uint32 depth = 2; +inline void NameSysResolveRequest::clear_depth() { + depth_ = 0u; +} +inline ::PROTOBUF_NAMESPACE_ID::uint32 NameSysResolveRequest::_internal_depth() const { + return depth_; +} +inline ::PROTOBUF_NAMESPACE_ID::uint32 NameSysResolveRequest::depth() const { + // @@protoc_insertion_point(field_get:pb.NameSysResolveRequest.depth) + return _internal_depth(); +} +inline void NameSysResolveRequest::_internal_set_depth(::PROTOBUF_NAMESPACE_ID::uint32 value) { + + depth_ = value; +} +inline void NameSysResolveRequest::set_depth(::PROTOBUF_NAMESPACE_ID::uint32 value) { + _internal_set_depth(value); + // @@protoc_insertion_point(field_set:pb.NameSysResolveRequest.depth) +} + +// uint32 dhtRecordCount = 3; +inline void NameSysResolveRequest::clear_dhtrecordcount() { + dhtrecordcount_ = 0u; +} +inline ::PROTOBUF_NAMESPACE_ID::uint32 NameSysResolveRequest::_internal_dhtrecordcount() const { + return dhtrecordcount_; +} +inline ::PROTOBUF_NAMESPACE_ID::uint32 NameSysResolveRequest::dhtrecordcount() const { + // @@protoc_insertion_point(field_get:pb.NameSysResolveRequest.dhtRecordCount) + return _internal_dhtrecordcount(); +} +inline void NameSysResolveRequest::_internal_set_dhtrecordcount(::PROTOBUF_NAMESPACE_ID::uint32 value) { + + dhtrecordcount_ = value; +} +inline void NameSysResolveRequest::set_dhtrecordcount(::PROTOBUF_NAMESPACE_ID::uint32 value) { + _internal_set_dhtrecordcount(value); + // @@protoc_insertion_point(field_set:pb.NameSysResolveRequest.dhtRecordCount) +} + +// int32 dhtTimeout = 4; +inline void NameSysResolveRequest::clear_dhttimeout() { + dhttimeout_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 NameSysResolveRequest::_internal_dhttimeout() const { + return dhttimeout_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 NameSysResolveRequest::dhttimeout() const { + // @@protoc_insertion_point(field_get:pb.NameSysResolveRequest.dhtTimeout) + return _internal_dhttimeout(); +} +inline void NameSysResolveRequest::_internal_set_dhttimeout(::PROTOBUF_NAMESPACE_ID::int32 value) { + + dhttimeout_ = value; +} +inline void NameSysResolveRequest::set_dhttimeout(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_dhttimeout(value); + // @@protoc_insertion_point(field_set:pb.NameSysResolveRequest.dhtTimeout) +} + +// ------------------------------------------------------------------- + +// NameSysResolveResult + +// string path = 1; +inline void NameSysResolveResult::clear_path() { + path_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& NameSysResolveResult::path() const { + // @@protoc_insertion_point(field_get:pb.NameSysResolveResult.path) + return _internal_path(); +} +inline void NameSysResolveResult::set_path(const std::string& value) { + _internal_set_path(value); + // @@protoc_insertion_point(field_set:pb.NameSysResolveResult.path) +} +inline std::string* NameSysResolveResult::mutable_path() { + // @@protoc_insertion_point(field_mutable:pb.NameSysResolveResult.path) + return _internal_mutable_path(); +} +inline const std::string& NameSysResolveResult::_internal_path() const { + return path_.GetNoArena(); +} +inline void NameSysResolveResult::_internal_set_path(const std::string& value) { + + path_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void NameSysResolveResult::set_path(std::string&& value) { + + path_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.NameSysResolveResult.path) +} +inline void NameSysResolveResult::set_path(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + path_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.NameSysResolveResult.path) +} +inline void NameSysResolveResult::set_path(const char* value, size_t size) { + + path_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.NameSysResolveResult.path) +} +inline std::string* NameSysResolveResult::_internal_mutable_path() { + + return path_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* NameSysResolveResult::release_path() { + // @@protoc_insertion_point(field_release:pb.NameSysResolveResult.path) + + return path_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void NameSysResolveResult::set_allocated_path(std::string* path) { + if (path != nullptr) { + + } else { + + } + path_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), path); + // @@protoc_insertion_point(field_set_allocated:pb.NameSysResolveResult.path) +} + +// string error = 2; +inline void NameSysResolveResult::clear_error() { + error_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& NameSysResolveResult::error() const { + // @@protoc_insertion_point(field_get:pb.NameSysResolveResult.error) + return _internal_error(); +} +inline void NameSysResolveResult::set_error(const std::string& value) { + _internal_set_error(value); + // @@protoc_insertion_point(field_set:pb.NameSysResolveResult.error) +} +inline std::string* NameSysResolveResult::mutable_error() { + // @@protoc_insertion_point(field_mutable:pb.NameSysResolveResult.error) + return _internal_mutable_error(); +} +inline const std::string& NameSysResolveResult::_internal_error() const { + return error_.GetNoArena(); +} +inline void NameSysResolveResult::_internal_set_error(const std::string& value) { + + error_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void NameSysResolveResult::set_error(std::string&& value) { + + error_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.NameSysResolveResult.error) +} +inline void NameSysResolveResult::set_error(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + error_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.NameSysResolveResult.error) +} +inline void NameSysResolveResult::set_error(const char* value, size_t size) { + + error_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.NameSysResolveResult.error) +} +inline std::string* NameSysResolveResult::_internal_mutable_error() { + + return error_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* NameSysResolveResult::release_error() { + // @@protoc_insertion_point(field_release:pb.NameSysResolveResult.error) + + return error_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void NameSysResolveResult::set_allocated_error(std::string* error) { + if (error != nullptr) { + + } else { + + } + error_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), error); + // @@protoc_insertion_point(field_set_allocated:pb.NameSysResolveResult.error) +} + +// ------------------------------------------------------------------- + +// NameSysPublishRequest + +// bytes privateKey = 1; +inline void NameSysPublishRequest::clear_privatekey() { + privatekey_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& NameSysPublishRequest::privatekey() const { + // @@protoc_insertion_point(field_get:pb.NameSysPublishRequest.privateKey) + return _internal_privatekey(); +} +inline void NameSysPublishRequest::set_privatekey(const std::string& value) { + _internal_set_privatekey(value); + // @@protoc_insertion_point(field_set:pb.NameSysPublishRequest.privateKey) +} +inline std::string* NameSysPublishRequest::mutable_privatekey() { + // @@protoc_insertion_point(field_mutable:pb.NameSysPublishRequest.privateKey) + return _internal_mutable_privatekey(); +} +inline const std::string& NameSysPublishRequest::_internal_privatekey() const { + return privatekey_.GetNoArena(); +} +inline void NameSysPublishRequest::_internal_set_privatekey(const std::string& value) { + + privatekey_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void NameSysPublishRequest::set_privatekey(std::string&& value) { + + privatekey_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.NameSysPublishRequest.privateKey) +} +inline void NameSysPublishRequest::set_privatekey(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + privatekey_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.NameSysPublishRequest.privateKey) +} +inline void NameSysPublishRequest::set_privatekey(const void* value, size_t size) { + + privatekey_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.NameSysPublishRequest.privateKey) +} +inline std::string* NameSysPublishRequest::_internal_mutable_privatekey() { + + return privatekey_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* NameSysPublishRequest::release_privatekey() { + // @@protoc_insertion_point(field_release:pb.NameSysPublishRequest.privateKey) + + return privatekey_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void NameSysPublishRequest::set_allocated_privatekey(std::string* privatekey) { + if (privatekey != nullptr) { + + } else { + + } + privatekey_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), privatekey); + // @@protoc_insertion_point(field_set_allocated:pb.NameSysPublishRequest.privateKey) +} + +// string value = 2; +inline void NameSysPublishRequest::clear_value() { + value_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& NameSysPublishRequest::value() const { + // @@protoc_insertion_point(field_get:pb.NameSysPublishRequest.value) + return _internal_value(); +} +inline void NameSysPublishRequest::set_value(const std::string& value) { + _internal_set_value(value); + // @@protoc_insertion_point(field_set:pb.NameSysPublishRequest.value) +} +inline std::string* NameSysPublishRequest::mutable_value() { + // @@protoc_insertion_point(field_mutable:pb.NameSysPublishRequest.value) + return _internal_mutable_value(); +} +inline const std::string& NameSysPublishRequest::_internal_value() const { + return value_.GetNoArena(); +} +inline void NameSysPublishRequest::_internal_set_value(const std::string& value) { + + value_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void NameSysPublishRequest::set_value(std::string&& value) { + + value_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.NameSysPublishRequest.value) +} +inline void NameSysPublishRequest::set_value(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + value_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.NameSysPublishRequest.value) +} +inline void NameSysPublishRequest::set_value(const char* value, size_t size) { + + value_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.NameSysPublishRequest.value) +} +inline std::string* NameSysPublishRequest::_internal_mutable_value() { + + return value_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* NameSysPublishRequest::release_value() { + // @@protoc_insertion_point(field_release:pb.NameSysPublishRequest.value) + + return value_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void NameSysPublishRequest::set_allocated_value(std::string* value) { + if (value != nullptr) { + + } else { + + } + value_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set_allocated:pb.NameSysPublishRequest.value) +} + +// int32 eol = 3; +inline void NameSysPublishRequest::clear_eol() { + eol_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 NameSysPublishRequest::_internal_eol() const { + return eol_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 NameSysPublishRequest::eol() const { + // @@protoc_insertion_point(field_get:pb.NameSysPublishRequest.eol) + return _internal_eol(); +} +inline void NameSysPublishRequest::_internal_set_eol(::PROTOBUF_NAMESPACE_ID::int32 value) { + + eol_ = value; +} +inline void NameSysPublishRequest::set_eol(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_eol(value); + // @@protoc_insertion_point(field_set:pb.NameSysPublishRequest.eol) +} + +// int32 ttl = 4; +inline void NameSysPublishRequest::clear_ttl() { + ttl_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 NameSysPublishRequest::_internal_ttl() const { + return ttl_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 NameSysPublishRequest::ttl() const { + // @@protoc_insertion_point(field_get:pb.NameSysPublishRequest.ttl) + return _internal_ttl(); +} +inline void NameSysPublishRequest::_internal_set_ttl(::PROTOBUF_NAMESPACE_ID::int32 value) { + + ttl_ = value; +} +inline void NameSysPublishRequest::set_ttl(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_ttl(value); + // @@protoc_insertion_point(field_set:pb.NameSysPublishRequest.ttl) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace pb + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_namesys_2eproto diff --git a/cpp/node.grpc.pb.cc b/cpp/node.grpc.pb.cc new file mode 100644 index 0000000..928854c --- /dev/null +++ b/cpp/node.grpc.pb.cc @@ -0,0 +1,338 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: node.proto + +#include "node.pb.h" +#include "node.grpc.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace pb { + +static const char* NodeAPI_method_names[] = { + "/pb.NodeAPI/ConnMgmt", + "/pb.NodeAPI/Extras", + "/pb.NodeAPI/P2P", + "/pb.NodeAPI/Blockstore", + "/pb.NodeAPI/Dag", + "/pb.NodeAPI/Keystore", + "/pb.NodeAPI/Persist", +}; + +std::unique_ptr< NodeAPI::Stub> NodeAPI::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< NodeAPI::Stub> stub(new NodeAPI::Stub(channel)); + return stub; +} + +NodeAPI::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel) + : channel_(channel), rpcmethod_ConnMgmt_(NodeAPI_method_names[0], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_Extras_(NodeAPI_method_names[1], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_P2P_(NodeAPI_method_names[2], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_Blockstore_(NodeAPI_method_names[3], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_Dag_(NodeAPI_method_names[4], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_Keystore_(NodeAPI_method_names[5], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_Persist_(NodeAPI_method_names[6], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::Status NodeAPI::Stub::ConnMgmt(::grpc::ClientContext* context, const ::pb::ConnMgmtRequest& request, ::pb::ConnMgmtResponse* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_ConnMgmt_, context, request, response); +} + +void NodeAPI::Stub::experimental_async::ConnMgmt(::grpc::ClientContext* context, const ::pb::ConnMgmtRequest* request, ::pb::ConnMgmtResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_ConnMgmt_, context, request, response, std::move(f)); +} + +void NodeAPI::Stub::experimental_async::ConnMgmt(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::ConnMgmtResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_ConnMgmt_, context, request, response, std::move(f)); +} + +void NodeAPI::Stub::experimental_async::ConnMgmt(::grpc::ClientContext* context, const ::pb::ConnMgmtRequest* request, ::pb::ConnMgmtResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_ConnMgmt_, context, request, response, reactor); +} + +void NodeAPI::Stub::experimental_async::ConnMgmt(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::ConnMgmtResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_ConnMgmt_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::pb::ConnMgmtResponse>* NodeAPI::Stub::AsyncConnMgmtRaw(::grpc::ClientContext* context, const ::pb::ConnMgmtRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::ConnMgmtResponse>::Create(channel_.get(), cq, rpcmethod_ConnMgmt_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::pb::ConnMgmtResponse>* NodeAPI::Stub::PrepareAsyncConnMgmtRaw(::grpc::ClientContext* context, const ::pb::ConnMgmtRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::ConnMgmtResponse>::Create(channel_.get(), cq, rpcmethod_ConnMgmt_, context, request, false); +} + +::grpc::Status NodeAPI::Stub::Extras(::grpc::ClientContext* context, const ::pb::ExtrasRequest& request, ::pb::Empty* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_Extras_, context, request, response); +} + +void NodeAPI::Stub::experimental_async::Extras(::grpc::ClientContext* context, const ::pb::ExtrasRequest* request, ::pb::Empty* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_Extras_, context, request, response, std::move(f)); +} + +void NodeAPI::Stub::experimental_async::Extras(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::Empty* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_Extras_, context, request, response, std::move(f)); +} + +void NodeAPI::Stub::experimental_async::Extras(::grpc::ClientContext* context, const ::pb::ExtrasRequest* request, ::pb::Empty* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_Extras_, context, request, response, reactor); +} + +void NodeAPI::Stub::experimental_async::Extras(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::Empty* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_Extras_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::pb::Empty>* NodeAPI::Stub::AsyncExtrasRaw(::grpc::ClientContext* context, const ::pb::ExtrasRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::Empty>::Create(channel_.get(), cq, rpcmethod_Extras_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::pb::Empty>* NodeAPI::Stub::PrepareAsyncExtrasRaw(::grpc::ClientContext* context, const ::pb::ExtrasRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::Empty>::Create(channel_.get(), cq, rpcmethod_Extras_, context, request, false); +} + +::grpc::Status NodeAPI::Stub::P2P(::grpc::ClientContext* context, const ::pb::P2PRequest& request, ::pb::P2PResponse* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_P2P_, context, request, response); +} + +void NodeAPI::Stub::experimental_async::P2P(::grpc::ClientContext* context, const ::pb::P2PRequest* request, ::pb::P2PResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_P2P_, context, request, response, std::move(f)); +} + +void NodeAPI::Stub::experimental_async::P2P(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::P2PResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_P2P_, context, request, response, std::move(f)); +} + +void NodeAPI::Stub::experimental_async::P2P(::grpc::ClientContext* context, const ::pb::P2PRequest* request, ::pb::P2PResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_P2P_, context, request, response, reactor); +} + +void NodeAPI::Stub::experimental_async::P2P(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::P2PResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_P2P_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::pb::P2PResponse>* NodeAPI::Stub::AsyncP2PRaw(::grpc::ClientContext* context, const ::pb::P2PRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::P2PResponse>::Create(channel_.get(), cq, rpcmethod_P2P_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::pb::P2PResponse>* NodeAPI::Stub::PrepareAsyncP2PRaw(::grpc::ClientContext* context, const ::pb::P2PRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::P2PResponse>::Create(channel_.get(), cq, rpcmethod_P2P_, context, request, false); +} + +::grpc::Status NodeAPI::Stub::Blockstore(::grpc::ClientContext* context, const ::pb::BlockstoreRequest& request, ::pb::BlockstoreResponse* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_Blockstore_, context, request, response); +} + +void NodeAPI::Stub::experimental_async::Blockstore(::grpc::ClientContext* context, const ::pb::BlockstoreRequest* request, ::pb::BlockstoreResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_Blockstore_, context, request, response, std::move(f)); +} + +void NodeAPI::Stub::experimental_async::Blockstore(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::BlockstoreResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_Blockstore_, context, request, response, std::move(f)); +} + +void NodeAPI::Stub::experimental_async::Blockstore(::grpc::ClientContext* context, const ::pb::BlockstoreRequest* request, ::pb::BlockstoreResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_Blockstore_, context, request, response, reactor); +} + +void NodeAPI::Stub::experimental_async::Blockstore(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::BlockstoreResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_Blockstore_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::pb::BlockstoreResponse>* NodeAPI::Stub::AsyncBlockstoreRaw(::grpc::ClientContext* context, const ::pb::BlockstoreRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::BlockstoreResponse>::Create(channel_.get(), cq, rpcmethod_Blockstore_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::pb::BlockstoreResponse>* NodeAPI::Stub::PrepareAsyncBlockstoreRaw(::grpc::ClientContext* context, const ::pb::BlockstoreRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::BlockstoreResponse>::Create(channel_.get(), cq, rpcmethod_Blockstore_, context, request, false); +} + +::grpc::Status NodeAPI::Stub::Dag(::grpc::ClientContext* context, const ::pb::DagRequest& request, ::pb::DagResponse* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_Dag_, context, request, response); +} + +void NodeAPI::Stub::experimental_async::Dag(::grpc::ClientContext* context, const ::pb::DagRequest* request, ::pb::DagResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_Dag_, context, request, response, std::move(f)); +} + +void NodeAPI::Stub::experimental_async::Dag(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::DagResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_Dag_, context, request, response, std::move(f)); +} + +void NodeAPI::Stub::experimental_async::Dag(::grpc::ClientContext* context, const ::pb::DagRequest* request, ::pb::DagResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_Dag_, context, request, response, reactor); +} + +void NodeAPI::Stub::experimental_async::Dag(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::DagResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_Dag_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::pb::DagResponse>* NodeAPI::Stub::AsyncDagRaw(::grpc::ClientContext* context, const ::pb::DagRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::DagResponse>::Create(channel_.get(), cq, rpcmethod_Dag_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::pb::DagResponse>* NodeAPI::Stub::PrepareAsyncDagRaw(::grpc::ClientContext* context, const ::pb::DagRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::DagResponse>::Create(channel_.get(), cq, rpcmethod_Dag_, context, request, false); +} + +::grpc::Status NodeAPI::Stub::Keystore(::grpc::ClientContext* context, const ::pb::KeystoreRequest& request, ::pb::KeystoreResponse* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_Keystore_, context, request, response); +} + +void NodeAPI::Stub::experimental_async::Keystore(::grpc::ClientContext* context, const ::pb::KeystoreRequest* request, ::pb::KeystoreResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_Keystore_, context, request, response, std::move(f)); +} + +void NodeAPI::Stub::experimental_async::Keystore(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::KeystoreResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_Keystore_, context, request, response, std::move(f)); +} + +void NodeAPI::Stub::experimental_async::Keystore(::grpc::ClientContext* context, const ::pb::KeystoreRequest* request, ::pb::KeystoreResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_Keystore_, context, request, response, reactor); +} + +void NodeAPI::Stub::experimental_async::Keystore(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::KeystoreResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_Keystore_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::pb::KeystoreResponse>* NodeAPI::Stub::AsyncKeystoreRaw(::grpc::ClientContext* context, const ::pb::KeystoreRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::KeystoreResponse>::Create(channel_.get(), cq, rpcmethod_Keystore_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::pb::KeystoreResponse>* NodeAPI::Stub::PrepareAsyncKeystoreRaw(::grpc::ClientContext* context, const ::pb::KeystoreRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::KeystoreResponse>::Create(channel_.get(), cq, rpcmethod_Keystore_, context, request, false); +} + +::grpc::Status NodeAPI::Stub::Persist(::grpc::ClientContext* context, const ::pb::PersistRequest& request, ::pb::PersistResponse* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_Persist_, context, request, response); +} + +void NodeAPI::Stub::experimental_async::Persist(::grpc::ClientContext* context, const ::pb::PersistRequest* request, ::pb::PersistResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_Persist_, context, request, response, std::move(f)); +} + +void NodeAPI::Stub::experimental_async::Persist(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::PersistResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_Persist_, context, request, response, std::move(f)); +} + +void NodeAPI::Stub::experimental_async::Persist(::grpc::ClientContext* context, const ::pb::PersistRequest* request, ::pb::PersistResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_Persist_, context, request, response, reactor); +} + +void NodeAPI::Stub::experimental_async::Persist(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::PersistResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_Persist_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::pb::PersistResponse>* NodeAPI::Stub::AsyncPersistRaw(::grpc::ClientContext* context, const ::pb::PersistRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::PersistResponse>::Create(channel_.get(), cq, rpcmethod_Persist_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::pb::PersistResponse>* NodeAPI::Stub::PrepareAsyncPersistRaw(::grpc::ClientContext* context, const ::pb::PersistRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::PersistResponse>::Create(channel_.get(), cq, rpcmethod_Persist_, context, request, false); +} + +NodeAPI::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + NodeAPI_method_names[0], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< NodeAPI::Service, ::pb::ConnMgmtRequest, ::pb::ConnMgmtResponse>( + std::mem_fn(&NodeAPI::Service::ConnMgmt), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + NodeAPI_method_names[1], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< NodeAPI::Service, ::pb::ExtrasRequest, ::pb::Empty>( + std::mem_fn(&NodeAPI::Service::Extras), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + NodeAPI_method_names[2], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< NodeAPI::Service, ::pb::P2PRequest, ::pb::P2PResponse>( + std::mem_fn(&NodeAPI::Service::P2P), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + NodeAPI_method_names[3], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< NodeAPI::Service, ::pb::BlockstoreRequest, ::pb::BlockstoreResponse>( + std::mem_fn(&NodeAPI::Service::Blockstore), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + NodeAPI_method_names[4], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< NodeAPI::Service, ::pb::DagRequest, ::pb::DagResponse>( + std::mem_fn(&NodeAPI::Service::Dag), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + NodeAPI_method_names[5], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< NodeAPI::Service, ::pb::KeystoreRequest, ::pb::KeystoreResponse>( + std::mem_fn(&NodeAPI::Service::Keystore), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + NodeAPI_method_names[6], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< NodeAPI::Service, ::pb::PersistRequest, ::pb::PersistResponse>( + std::mem_fn(&NodeAPI::Service::Persist), this))); +} + +NodeAPI::Service::~Service() { +} + +::grpc::Status NodeAPI::Service::ConnMgmt(::grpc::ServerContext* context, const ::pb::ConnMgmtRequest* request, ::pb::ConnMgmtResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status NodeAPI::Service::Extras(::grpc::ServerContext* context, const ::pb::ExtrasRequest* request, ::pb::Empty* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status NodeAPI::Service::P2P(::grpc::ServerContext* context, const ::pb::P2PRequest* request, ::pb::P2PResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status NodeAPI::Service::Blockstore(::grpc::ServerContext* context, const ::pb::BlockstoreRequest* request, ::pb::BlockstoreResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status NodeAPI::Service::Dag(::grpc::ServerContext* context, const ::pb::DagRequest* request, ::pb::DagResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status NodeAPI::Service::Keystore(::grpc::ServerContext* context, const ::pb::KeystoreRequest* request, ::pb::KeystoreResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status NodeAPI::Service::Persist(::grpc::ServerContext* context, const ::pb::PersistRequest* request, ::pb::PersistResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +} // namespace pb + diff --git a/cpp/node.grpc.pb.h b/cpp/node.grpc.pb.h new file mode 100644 index 0000000..6f6c059 --- /dev/null +++ b/cpp/node.grpc.pb.h @@ -0,0 +1,1561 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: node.proto +#ifndef GRPC_node_2eproto__INCLUDED +#define GRPC_node_2eproto__INCLUDED + +#include "node.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace pb { + +// NodeAPI provide an API to control the underlying custom ipfs node +class NodeAPI final { + public: + static constexpr char const* service_full_name() { + return "pb.NodeAPI"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + // ConnMgmt provides control over libp2p connections + virtual ::grpc::Status ConnMgmt(::grpc::ClientContext* context, const ::pb::ConnMgmtRequest& request, ::pb::ConnMgmtResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::ConnMgmtResponse>> AsyncConnMgmt(::grpc::ClientContext* context, const ::pb::ConnMgmtRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::ConnMgmtResponse>>(AsyncConnMgmtRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::ConnMgmtResponse>> PrepareAsyncConnMgmt(::grpc::ClientContext* context, const ::pb::ConnMgmtRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::ConnMgmtResponse>>(PrepareAsyncConnMgmtRaw(context, request, cq)); + } + // Extras provide control over node extras capabilities + virtual ::grpc::Status Extras(::grpc::ClientContext* context, const ::pb::ExtrasRequest& request, ::pb::Empty* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::Empty>> AsyncExtras(::grpc::ClientContext* context, const ::pb::ExtrasRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::Empty>>(AsyncExtrasRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::Empty>> PrepareAsyncExtras(::grpc::ClientContext* context, const ::pb::ExtrasRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::Empty>>(PrepareAsyncExtrasRaw(context, request, cq)); + } + // P2P allows control of generalized p2p streams for tcp/udp based protocol. + // By using this RPC, we can tunnel traffic similar to ssh tunneling + // except using libp2p as the transport layer, and and tcp/udp port. + virtual ::grpc::Status P2P(::grpc::ClientContext* context, const ::pb::P2PRequest& request, ::pb::P2PResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::P2PResponse>> AsyncP2P(::grpc::ClientContext* context, const ::pb::P2PRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::P2PResponse>>(AsyncP2PRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::P2PResponse>> PrepareAsyncP2P(::grpc::ClientContext* context, const ::pb::P2PRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::P2PResponse>>(PrepareAsyncP2PRaw(context, request, cq)); + } + // Blockstore allows low-level management of the underlying blockstore + virtual ::grpc::Status Blockstore(::grpc::ClientContext* context, const ::pb::BlockstoreRequest& request, ::pb::BlockstoreResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::BlockstoreResponse>> AsyncBlockstore(::grpc::ClientContext* context, const ::pb::BlockstoreRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::BlockstoreResponse>>(AsyncBlockstoreRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::BlockstoreResponse>> PrepareAsyncBlockstore(::grpc::ClientContext* context, const ::pb::BlockstoreRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::BlockstoreResponse>>(PrepareAsyncBlockstoreRaw(context, request, cq)); + } + // Dag is a unidirectional rpc allowing manipulation of low-level ipld objects + virtual ::grpc::Status Dag(::grpc::ClientContext* context, const ::pb::DagRequest& request, ::pb::DagResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::DagResponse>> AsyncDag(::grpc::ClientContext* context, const ::pb::DagRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::DagResponse>>(AsyncDagRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::DagResponse>> PrepareAsyncDag(::grpc::ClientContext* context, const ::pb::DagRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::DagResponse>>(PrepareAsyncDagRaw(context, request, cq)); + } + // Keystore is a unidirectional RPC allowing management of ipfs keystores + virtual ::grpc::Status Keystore(::grpc::ClientContext* context, const ::pb::KeystoreRequest& request, ::pb::KeystoreResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::KeystoreResponse>> AsyncKeystore(::grpc::ClientContext* context, const ::pb::KeystoreRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::KeystoreResponse>>(AsyncKeystoreRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::KeystoreResponse>> PrepareAsyncKeystore(::grpc::ClientContext* context, const ::pb::KeystoreRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::KeystoreResponse>>(PrepareAsyncKeystoreRaw(context, request, cq)); + } + // Persist is used to retrieve data from the network and make it available locally + virtual ::grpc::Status Persist(::grpc::ClientContext* context, const ::pb::PersistRequest& request, ::pb::PersistResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::PersistResponse>> AsyncPersist(::grpc::ClientContext* context, const ::pb::PersistRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::PersistResponse>>(AsyncPersistRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::PersistResponse>> PrepareAsyncPersist(::grpc::ClientContext* context, const ::pb::PersistRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::PersistResponse>>(PrepareAsyncPersistRaw(context, request, cq)); + } + class experimental_async_interface { + public: + virtual ~experimental_async_interface() {} + // ConnMgmt provides control over libp2p connections + virtual void ConnMgmt(::grpc::ClientContext* context, const ::pb::ConnMgmtRequest* request, ::pb::ConnMgmtResponse* response, std::function) = 0; + virtual void ConnMgmt(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::ConnMgmtResponse* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void ConnMgmt(::grpc::ClientContext* context, const ::pb::ConnMgmtRequest* request, ::pb::ConnMgmtResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void ConnMgmt(::grpc::ClientContext* context, const ::pb::ConnMgmtRequest* request, ::pb::ConnMgmtResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void ConnMgmt(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::ConnMgmtResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void ConnMgmt(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::ConnMgmtResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + // Extras provide control over node extras capabilities + virtual void Extras(::grpc::ClientContext* context, const ::pb::ExtrasRequest* request, ::pb::Empty* response, std::function) = 0; + virtual void Extras(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::Empty* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void Extras(::grpc::ClientContext* context, const ::pb::ExtrasRequest* request, ::pb::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void Extras(::grpc::ClientContext* context, const ::pb::ExtrasRequest* request, ::pb::Empty* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void Extras(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void Extras(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::Empty* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + // P2P allows control of generalized p2p streams for tcp/udp based protocol. + // By using this RPC, we can tunnel traffic similar to ssh tunneling + // except using libp2p as the transport layer, and and tcp/udp port. + virtual void P2P(::grpc::ClientContext* context, const ::pb::P2PRequest* request, ::pb::P2PResponse* response, std::function) = 0; + virtual void P2P(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::P2PResponse* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void P2P(::grpc::ClientContext* context, const ::pb::P2PRequest* request, ::pb::P2PResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void P2P(::grpc::ClientContext* context, const ::pb::P2PRequest* request, ::pb::P2PResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void P2P(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::P2PResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void P2P(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::P2PResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + // Blockstore allows low-level management of the underlying blockstore + virtual void Blockstore(::grpc::ClientContext* context, const ::pb::BlockstoreRequest* request, ::pb::BlockstoreResponse* response, std::function) = 0; + virtual void Blockstore(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::BlockstoreResponse* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void Blockstore(::grpc::ClientContext* context, const ::pb::BlockstoreRequest* request, ::pb::BlockstoreResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void Blockstore(::grpc::ClientContext* context, const ::pb::BlockstoreRequest* request, ::pb::BlockstoreResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void Blockstore(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::BlockstoreResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void Blockstore(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::BlockstoreResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + // Dag is a unidirectional rpc allowing manipulation of low-level ipld objects + virtual void Dag(::grpc::ClientContext* context, const ::pb::DagRequest* request, ::pb::DagResponse* response, std::function) = 0; + virtual void Dag(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::DagResponse* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void Dag(::grpc::ClientContext* context, const ::pb::DagRequest* request, ::pb::DagResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void Dag(::grpc::ClientContext* context, const ::pb::DagRequest* request, ::pb::DagResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void Dag(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::DagResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void Dag(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::DagResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + // Keystore is a unidirectional RPC allowing management of ipfs keystores + virtual void Keystore(::grpc::ClientContext* context, const ::pb::KeystoreRequest* request, ::pb::KeystoreResponse* response, std::function) = 0; + virtual void Keystore(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::KeystoreResponse* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void Keystore(::grpc::ClientContext* context, const ::pb::KeystoreRequest* request, ::pb::KeystoreResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void Keystore(::grpc::ClientContext* context, const ::pb::KeystoreRequest* request, ::pb::KeystoreResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void Keystore(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::KeystoreResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void Keystore(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::KeystoreResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + // Persist is used to retrieve data from the network and make it available locally + virtual void Persist(::grpc::ClientContext* context, const ::pb::PersistRequest* request, ::pb::PersistResponse* response, std::function) = 0; + virtual void Persist(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::PersistResponse* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void Persist(::grpc::ClientContext* context, const ::pb::PersistRequest* request, ::pb::PersistResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void Persist(::grpc::ClientContext* context, const ::pb::PersistRequest* request, ::pb::PersistResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void Persist(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::PersistResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void Persist(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::PersistResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + }; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + typedef class experimental_async_interface async_interface; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + async_interface* async() { return experimental_async(); } + #endif + virtual class experimental_async_interface* experimental_async() { return nullptr; } + private: + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::ConnMgmtResponse>* AsyncConnMgmtRaw(::grpc::ClientContext* context, const ::pb::ConnMgmtRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::ConnMgmtResponse>* PrepareAsyncConnMgmtRaw(::grpc::ClientContext* context, const ::pb::ConnMgmtRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::Empty>* AsyncExtrasRaw(::grpc::ClientContext* context, const ::pb::ExtrasRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::Empty>* PrepareAsyncExtrasRaw(::grpc::ClientContext* context, const ::pb::ExtrasRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::P2PResponse>* AsyncP2PRaw(::grpc::ClientContext* context, const ::pb::P2PRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::P2PResponse>* PrepareAsyncP2PRaw(::grpc::ClientContext* context, const ::pb::P2PRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::BlockstoreResponse>* AsyncBlockstoreRaw(::grpc::ClientContext* context, const ::pb::BlockstoreRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::BlockstoreResponse>* PrepareAsyncBlockstoreRaw(::grpc::ClientContext* context, const ::pb::BlockstoreRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::DagResponse>* AsyncDagRaw(::grpc::ClientContext* context, const ::pb::DagRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::DagResponse>* PrepareAsyncDagRaw(::grpc::ClientContext* context, const ::pb::DagRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::KeystoreResponse>* AsyncKeystoreRaw(::grpc::ClientContext* context, const ::pb::KeystoreRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::KeystoreResponse>* PrepareAsyncKeystoreRaw(::grpc::ClientContext* context, const ::pb::KeystoreRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::PersistResponse>* AsyncPersistRaw(::grpc::ClientContext* context, const ::pb::PersistRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::PersistResponse>* PrepareAsyncPersistRaw(::grpc::ClientContext* context, const ::pb::PersistRequest& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel); + ::grpc::Status ConnMgmt(::grpc::ClientContext* context, const ::pb::ConnMgmtRequest& request, ::pb::ConnMgmtResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::ConnMgmtResponse>> AsyncConnMgmt(::grpc::ClientContext* context, const ::pb::ConnMgmtRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::ConnMgmtResponse>>(AsyncConnMgmtRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::ConnMgmtResponse>> PrepareAsyncConnMgmt(::grpc::ClientContext* context, const ::pb::ConnMgmtRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::ConnMgmtResponse>>(PrepareAsyncConnMgmtRaw(context, request, cq)); + } + ::grpc::Status Extras(::grpc::ClientContext* context, const ::pb::ExtrasRequest& request, ::pb::Empty* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::Empty>> AsyncExtras(::grpc::ClientContext* context, const ::pb::ExtrasRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::Empty>>(AsyncExtrasRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::Empty>> PrepareAsyncExtras(::grpc::ClientContext* context, const ::pb::ExtrasRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::Empty>>(PrepareAsyncExtrasRaw(context, request, cq)); + } + ::grpc::Status P2P(::grpc::ClientContext* context, const ::pb::P2PRequest& request, ::pb::P2PResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::P2PResponse>> AsyncP2P(::grpc::ClientContext* context, const ::pb::P2PRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::P2PResponse>>(AsyncP2PRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::P2PResponse>> PrepareAsyncP2P(::grpc::ClientContext* context, const ::pb::P2PRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::P2PResponse>>(PrepareAsyncP2PRaw(context, request, cq)); + } + ::grpc::Status Blockstore(::grpc::ClientContext* context, const ::pb::BlockstoreRequest& request, ::pb::BlockstoreResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::BlockstoreResponse>> AsyncBlockstore(::grpc::ClientContext* context, const ::pb::BlockstoreRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::BlockstoreResponse>>(AsyncBlockstoreRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::BlockstoreResponse>> PrepareAsyncBlockstore(::grpc::ClientContext* context, const ::pb::BlockstoreRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::BlockstoreResponse>>(PrepareAsyncBlockstoreRaw(context, request, cq)); + } + ::grpc::Status Dag(::grpc::ClientContext* context, const ::pb::DagRequest& request, ::pb::DagResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::DagResponse>> AsyncDag(::grpc::ClientContext* context, const ::pb::DagRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::DagResponse>>(AsyncDagRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::DagResponse>> PrepareAsyncDag(::grpc::ClientContext* context, const ::pb::DagRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::DagResponse>>(PrepareAsyncDagRaw(context, request, cq)); + } + ::grpc::Status Keystore(::grpc::ClientContext* context, const ::pb::KeystoreRequest& request, ::pb::KeystoreResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::KeystoreResponse>> AsyncKeystore(::grpc::ClientContext* context, const ::pb::KeystoreRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::KeystoreResponse>>(AsyncKeystoreRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::KeystoreResponse>> PrepareAsyncKeystore(::grpc::ClientContext* context, const ::pb::KeystoreRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::KeystoreResponse>>(PrepareAsyncKeystoreRaw(context, request, cq)); + } + ::grpc::Status Persist(::grpc::ClientContext* context, const ::pb::PersistRequest& request, ::pb::PersistResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::PersistResponse>> AsyncPersist(::grpc::ClientContext* context, const ::pb::PersistRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::PersistResponse>>(AsyncPersistRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::PersistResponse>> PrepareAsyncPersist(::grpc::ClientContext* context, const ::pb::PersistRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::PersistResponse>>(PrepareAsyncPersistRaw(context, request, cq)); + } + class experimental_async final : + public StubInterface::experimental_async_interface { + public: + void ConnMgmt(::grpc::ClientContext* context, const ::pb::ConnMgmtRequest* request, ::pb::ConnMgmtResponse* response, std::function) override; + void ConnMgmt(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::ConnMgmtResponse* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void ConnMgmt(::grpc::ClientContext* context, const ::pb::ConnMgmtRequest* request, ::pb::ConnMgmtResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void ConnMgmt(::grpc::ClientContext* context, const ::pb::ConnMgmtRequest* request, ::pb::ConnMgmtResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void ConnMgmt(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::ConnMgmtResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void ConnMgmt(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::ConnMgmtResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + void Extras(::grpc::ClientContext* context, const ::pb::ExtrasRequest* request, ::pb::Empty* response, std::function) override; + void Extras(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::Empty* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void Extras(::grpc::ClientContext* context, const ::pb::ExtrasRequest* request, ::pb::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void Extras(::grpc::ClientContext* context, const ::pb::ExtrasRequest* request, ::pb::Empty* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void Extras(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void Extras(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::Empty* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + void P2P(::grpc::ClientContext* context, const ::pb::P2PRequest* request, ::pb::P2PResponse* response, std::function) override; + void P2P(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::P2PResponse* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void P2P(::grpc::ClientContext* context, const ::pb::P2PRequest* request, ::pb::P2PResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void P2P(::grpc::ClientContext* context, const ::pb::P2PRequest* request, ::pb::P2PResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void P2P(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::P2PResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void P2P(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::P2PResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + void Blockstore(::grpc::ClientContext* context, const ::pb::BlockstoreRequest* request, ::pb::BlockstoreResponse* response, std::function) override; + void Blockstore(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::BlockstoreResponse* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void Blockstore(::grpc::ClientContext* context, const ::pb::BlockstoreRequest* request, ::pb::BlockstoreResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void Blockstore(::grpc::ClientContext* context, const ::pb::BlockstoreRequest* request, ::pb::BlockstoreResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void Blockstore(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::BlockstoreResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void Blockstore(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::BlockstoreResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + void Dag(::grpc::ClientContext* context, const ::pb::DagRequest* request, ::pb::DagResponse* response, std::function) override; + void Dag(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::DagResponse* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void Dag(::grpc::ClientContext* context, const ::pb::DagRequest* request, ::pb::DagResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void Dag(::grpc::ClientContext* context, const ::pb::DagRequest* request, ::pb::DagResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void Dag(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::DagResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void Dag(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::DagResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + void Keystore(::grpc::ClientContext* context, const ::pb::KeystoreRequest* request, ::pb::KeystoreResponse* response, std::function) override; + void Keystore(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::KeystoreResponse* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void Keystore(::grpc::ClientContext* context, const ::pb::KeystoreRequest* request, ::pb::KeystoreResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void Keystore(::grpc::ClientContext* context, const ::pb::KeystoreRequest* request, ::pb::KeystoreResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void Keystore(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::KeystoreResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void Keystore(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::KeystoreResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + void Persist(::grpc::ClientContext* context, const ::pb::PersistRequest* request, ::pb::PersistResponse* response, std::function) override; + void Persist(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::PersistResponse* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void Persist(::grpc::ClientContext* context, const ::pb::PersistRequest* request, ::pb::PersistResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void Persist(::grpc::ClientContext* context, const ::pb::PersistRequest* request, ::pb::PersistResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void Persist(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::PersistResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void Persist(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::PersistResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + private: + friend class Stub; + explicit experimental_async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class experimental_async_interface* experimental_async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class experimental_async async_stub_{this}; + ::grpc::ClientAsyncResponseReader< ::pb::ConnMgmtResponse>* AsyncConnMgmtRaw(::grpc::ClientContext* context, const ::pb::ConnMgmtRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::pb::ConnMgmtResponse>* PrepareAsyncConnMgmtRaw(::grpc::ClientContext* context, const ::pb::ConnMgmtRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::pb::Empty>* AsyncExtrasRaw(::grpc::ClientContext* context, const ::pb::ExtrasRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::pb::Empty>* PrepareAsyncExtrasRaw(::grpc::ClientContext* context, const ::pb::ExtrasRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::pb::P2PResponse>* AsyncP2PRaw(::grpc::ClientContext* context, const ::pb::P2PRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::pb::P2PResponse>* PrepareAsyncP2PRaw(::grpc::ClientContext* context, const ::pb::P2PRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::pb::BlockstoreResponse>* AsyncBlockstoreRaw(::grpc::ClientContext* context, const ::pb::BlockstoreRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::pb::BlockstoreResponse>* PrepareAsyncBlockstoreRaw(::grpc::ClientContext* context, const ::pb::BlockstoreRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::pb::DagResponse>* AsyncDagRaw(::grpc::ClientContext* context, const ::pb::DagRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::pb::DagResponse>* PrepareAsyncDagRaw(::grpc::ClientContext* context, const ::pb::DagRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::pb::KeystoreResponse>* AsyncKeystoreRaw(::grpc::ClientContext* context, const ::pb::KeystoreRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::pb::KeystoreResponse>* PrepareAsyncKeystoreRaw(::grpc::ClientContext* context, const ::pb::KeystoreRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::pb::PersistResponse>* AsyncPersistRaw(::grpc::ClientContext* context, const ::pb::PersistRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::pb::PersistResponse>* PrepareAsyncPersistRaw(::grpc::ClientContext* context, const ::pb::PersistRequest& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_ConnMgmt_; + const ::grpc::internal::RpcMethod rpcmethod_Extras_; + const ::grpc::internal::RpcMethod rpcmethod_P2P_; + const ::grpc::internal::RpcMethod rpcmethod_Blockstore_; + const ::grpc::internal::RpcMethod rpcmethod_Dag_; + const ::grpc::internal::RpcMethod rpcmethod_Keystore_; + const ::grpc::internal::RpcMethod rpcmethod_Persist_; + }; + static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + + class Service : public ::grpc::Service { + public: + Service(); + virtual ~Service(); + // ConnMgmt provides control over libp2p connections + virtual ::grpc::Status ConnMgmt(::grpc::ServerContext* context, const ::pb::ConnMgmtRequest* request, ::pb::ConnMgmtResponse* response); + // Extras provide control over node extras capabilities + virtual ::grpc::Status Extras(::grpc::ServerContext* context, const ::pb::ExtrasRequest* request, ::pb::Empty* response); + // P2P allows control of generalized p2p streams for tcp/udp based protocol. + // By using this RPC, we can tunnel traffic similar to ssh tunneling + // except using libp2p as the transport layer, and and tcp/udp port. + virtual ::grpc::Status P2P(::grpc::ServerContext* context, const ::pb::P2PRequest* request, ::pb::P2PResponse* response); + // Blockstore allows low-level management of the underlying blockstore + virtual ::grpc::Status Blockstore(::grpc::ServerContext* context, const ::pb::BlockstoreRequest* request, ::pb::BlockstoreResponse* response); + // Dag is a unidirectional rpc allowing manipulation of low-level ipld objects + virtual ::grpc::Status Dag(::grpc::ServerContext* context, const ::pb::DagRequest* request, ::pb::DagResponse* response); + // Keystore is a unidirectional RPC allowing management of ipfs keystores + virtual ::grpc::Status Keystore(::grpc::ServerContext* context, const ::pb::KeystoreRequest* request, ::pb::KeystoreResponse* response); + // Persist is used to retrieve data from the network and make it available locally + virtual ::grpc::Status Persist(::grpc::ServerContext* context, const ::pb::PersistRequest* request, ::pb::PersistResponse* response); + }; + template + class WithAsyncMethod_ConnMgmt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_ConnMgmt() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_ConnMgmt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ConnMgmt(::grpc::ServerContext* /*context*/, const ::pb::ConnMgmtRequest* /*request*/, ::pb::ConnMgmtResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestConnMgmt(::grpc::ServerContext* context, ::pb::ConnMgmtRequest* request, ::grpc::ServerAsyncResponseWriter< ::pb::ConnMgmtResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_Extras : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_Extras() { + ::grpc::Service::MarkMethodAsync(1); + } + ~WithAsyncMethod_Extras() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Extras(::grpc::ServerContext* /*context*/, const ::pb::ExtrasRequest* /*request*/, ::pb::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestExtras(::grpc::ServerContext* context, ::pb::ExtrasRequest* request, ::grpc::ServerAsyncResponseWriter< ::pb::Empty>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_P2P : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_P2P() { + ::grpc::Service::MarkMethodAsync(2); + } + ~WithAsyncMethod_P2P() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status P2P(::grpc::ServerContext* /*context*/, const ::pb::P2PRequest* /*request*/, ::pb::P2PResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestP2P(::grpc::ServerContext* context, ::pb::P2PRequest* request, ::grpc::ServerAsyncResponseWriter< ::pb::P2PResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_Blockstore : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_Blockstore() { + ::grpc::Service::MarkMethodAsync(3); + } + ~WithAsyncMethod_Blockstore() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Blockstore(::grpc::ServerContext* /*context*/, const ::pb::BlockstoreRequest* /*request*/, ::pb::BlockstoreResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestBlockstore(::grpc::ServerContext* context, ::pb::BlockstoreRequest* request, ::grpc::ServerAsyncResponseWriter< ::pb::BlockstoreResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(3, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_Dag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_Dag() { + ::grpc::Service::MarkMethodAsync(4); + } + ~WithAsyncMethod_Dag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Dag(::grpc::ServerContext* /*context*/, const ::pb::DagRequest* /*request*/, ::pb::DagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestDag(::grpc::ServerContext* context, ::pb::DagRequest* request, ::grpc::ServerAsyncResponseWriter< ::pb::DagResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(4, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_Keystore : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_Keystore() { + ::grpc::Service::MarkMethodAsync(5); + } + ~WithAsyncMethod_Keystore() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Keystore(::grpc::ServerContext* /*context*/, const ::pb::KeystoreRequest* /*request*/, ::pb::KeystoreResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestKeystore(::grpc::ServerContext* context, ::pb::KeystoreRequest* request, ::grpc::ServerAsyncResponseWriter< ::pb::KeystoreResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(5, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_Persist : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_Persist() { + ::grpc::Service::MarkMethodAsync(6); + } + ~WithAsyncMethod_Persist() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Persist(::grpc::ServerContext* /*context*/, const ::pb::PersistRequest* /*request*/, ::pb::PersistResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestPersist(::grpc::ServerContext* context, ::pb::PersistRequest* request, ::grpc::ServerAsyncResponseWriter< ::pb::PersistResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(6, context, request, response, new_call_cq, notification_cq, tag); + } + }; + typedef WithAsyncMethod_ConnMgmt > > > > > > AsyncService; + template + class ExperimentalWithCallbackMethod_ConnMgmt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_ConnMgmt() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(0, + new ::grpc_impl::internal::CallbackUnaryHandler< ::pb::ConnMgmtRequest, ::pb::ConnMgmtResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::pb::ConnMgmtRequest* request, ::pb::ConnMgmtResponse* response) { return this->ConnMgmt(context, request, response); }));} + void SetMessageAllocatorFor_ConnMgmt( + ::grpc::experimental::MessageAllocator< ::pb::ConnMgmtRequest, ::pb::ConnMgmtResponse>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(0); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::pb::ConnMgmtRequest, ::pb::ConnMgmtResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_ConnMgmt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ConnMgmt(::grpc::ServerContext* /*context*/, const ::pb::ConnMgmtRequest* /*request*/, ::pb::ConnMgmtResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* ConnMgmt( + ::grpc::CallbackServerContext* /*context*/, const ::pb::ConnMgmtRequest* /*request*/, ::pb::ConnMgmtResponse* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* ConnMgmt( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::pb::ConnMgmtRequest* /*request*/, ::pb::ConnMgmtResponse* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_Extras : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_Extras() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(1, + new ::grpc_impl::internal::CallbackUnaryHandler< ::pb::ExtrasRequest, ::pb::Empty>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::pb::ExtrasRequest* request, ::pb::Empty* response) { return this->Extras(context, request, response); }));} + void SetMessageAllocatorFor_Extras( + ::grpc::experimental::MessageAllocator< ::pb::ExtrasRequest, ::pb::Empty>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(1); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::pb::ExtrasRequest, ::pb::Empty>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_Extras() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Extras(::grpc::ServerContext* /*context*/, const ::pb::ExtrasRequest* /*request*/, ::pb::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* Extras( + ::grpc::CallbackServerContext* /*context*/, const ::pb::ExtrasRequest* /*request*/, ::pb::Empty* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* Extras( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::pb::ExtrasRequest* /*request*/, ::pb::Empty* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_P2P : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_P2P() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(2, + new ::grpc_impl::internal::CallbackUnaryHandler< ::pb::P2PRequest, ::pb::P2PResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::pb::P2PRequest* request, ::pb::P2PResponse* response) { return this->P2P(context, request, response); }));} + void SetMessageAllocatorFor_P2P( + ::grpc::experimental::MessageAllocator< ::pb::P2PRequest, ::pb::P2PResponse>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(2); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(2); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::pb::P2PRequest, ::pb::P2PResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_P2P() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status P2P(::grpc::ServerContext* /*context*/, const ::pb::P2PRequest* /*request*/, ::pb::P2PResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* P2P( + ::grpc::CallbackServerContext* /*context*/, const ::pb::P2PRequest* /*request*/, ::pb::P2PResponse* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* P2P( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::pb::P2PRequest* /*request*/, ::pb::P2PResponse* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_Blockstore : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_Blockstore() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(3, + new ::grpc_impl::internal::CallbackUnaryHandler< ::pb::BlockstoreRequest, ::pb::BlockstoreResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::pb::BlockstoreRequest* request, ::pb::BlockstoreResponse* response) { return this->Blockstore(context, request, response); }));} + void SetMessageAllocatorFor_Blockstore( + ::grpc::experimental::MessageAllocator< ::pb::BlockstoreRequest, ::pb::BlockstoreResponse>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(3); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(3); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::pb::BlockstoreRequest, ::pb::BlockstoreResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_Blockstore() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Blockstore(::grpc::ServerContext* /*context*/, const ::pb::BlockstoreRequest* /*request*/, ::pb::BlockstoreResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* Blockstore( + ::grpc::CallbackServerContext* /*context*/, const ::pb::BlockstoreRequest* /*request*/, ::pb::BlockstoreResponse* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* Blockstore( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::pb::BlockstoreRequest* /*request*/, ::pb::BlockstoreResponse* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_Dag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_Dag() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(4, + new ::grpc_impl::internal::CallbackUnaryHandler< ::pb::DagRequest, ::pb::DagResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::pb::DagRequest* request, ::pb::DagResponse* response) { return this->Dag(context, request, response); }));} + void SetMessageAllocatorFor_Dag( + ::grpc::experimental::MessageAllocator< ::pb::DagRequest, ::pb::DagResponse>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(4); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(4); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::pb::DagRequest, ::pb::DagResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_Dag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Dag(::grpc::ServerContext* /*context*/, const ::pb::DagRequest* /*request*/, ::pb::DagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* Dag( + ::grpc::CallbackServerContext* /*context*/, const ::pb::DagRequest* /*request*/, ::pb::DagResponse* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* Dag( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::pb::DagRequest* /*request*/, ::pb::DagResponse* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_Keystore : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_Keystore() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(5, + new ::grpc_impl::internal::CallbackUnaryHandler< ::pb::KeystoreRequest, ::pb::KeystoreResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::pb::KeystoreRequest* request, ::pb::KeystoreResponse* response) { return this->Keystore(context, request, response); }));} + void SetMessageAllocatorFor_Keystore( + ::grpc::experimental::MessageAllocator< ::pb::KeystoreRequest, ::pb::KeystoreResponse>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(5); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(5); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::pb::KeystoreRequest, ::pb::KeystoreResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_Keystore() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Keystore(::grpc::ServerContext* /*context*/, const ::pb::KeystoreRequest* /*request*/, ::pb::KeystoreResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* Keystore( + ::grpc::CallbackServerContext* /*context*/, const ::pb::KeystoreRequest* /*request*/, ::pb::KeystoreResponse* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* Keystore( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::pb::KeystoreRequest* /*request*/, ::pb::KeystoreResponse* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_Persist : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_Persist() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(6, + new ::grpc_impl::internal::CallbackUnaryHandler< ::pb::PersistRequest, ::pb::PersistResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::pb::PersistRequest* request, ::pb::PersistResponse* response) { return this->Persist(context, request, response); }));} + void SetMessageAllocatorFor_Persist( + ::grpc::experimental::MessageAllocator< ::pb::PersistRequest, ::pb::PersistResponse>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(6); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(6); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::pb::PersistRequest, ::pb::PersistResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_Persist() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Persist(::grpc::ServerContext* /*context*/, const ::pb::PersistRequest* /*request*/, ::pb::PersistResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* Persist( + ::grpc::CallbackServerContext* /*context*/, const ::pb::PersistRequest* /*request*/, ::pb::PersistResponse* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* Persist( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::pb::PersistRequest* /*request*/, ::pb::PersistResponse* /*response*/) + #endif + { return nullptr; } + }; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + typedef ExperimentalWithCallbackMethod_ConnMgmt > > > > > > CallbackService; + #endif + + typedef ExperimentalWithCallbackMethod_ConnMgmt > > > > > > ExperimentalCallbackService; + template + class WithGenericMethod_ConnMgmt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_ConnMgmt() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_ConnMgmt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ConnMgmt(::grpc::ServerContext* /*context*/, const ::pb::ConnMgmtRequest* /*request*/, ::pb::ConnMgmtResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_Extras : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_Extras() { + ::grpc::Service::MarkMethodGeneric(1); + } + ~WithGenericMethod_Extras() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Extras(::grpc::ServerContext* /*context*/, const ::pb::ExtrasRequest* /*request*/, ::pb::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_P2P : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_P2P() { + ::grpc::Service::MarkMethodGeneric(2); + } + ~WithGenericMethod_P2P() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status P2P(::grpc::ServerContext* /*context*/, const ::pb::P2PRequest* /*request*/, ::pb::P2PResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_Blockstore : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_Blockstore() { + ::grpc::Service::MarkMethodGeneric(3); + } + ~WithGenericMethod_Blockstore() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Blockstore(::grpc::ServerContext* /*context*/, const ::pb::BlockstoreRequest* /*request*/, ::pb::BlockstoreResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_Dag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_Dag() { + ::grpc::Service::MarkMethodGeneric(4); + } + ~WithGenericMethod_Dag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Dag(::grpc::ServerContext* /*context*/, const ::pb::DagRequest* /*request*/, ::pb::DagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_Keystore : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_Keystore() { + ::grpc::Service::MarkMethodGeneric(5); + } + ~WithGenericMethod_Keystore() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Keystore(::grpc::ServerContext* /*context*/, const ::pb::KeystoreRequest* /*request*/, ::pb::KeystoreResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_Persist : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_Persist() { + ::grpc::Service::MarkMethodGeneric(6); + } + ~WithGenericMethod_Persist() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Persist(::grpc::ServerContext* /*context*/, const ::pb::PersistRequest* /*request*/, ::pb::PersistResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_ConnMgmt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_ConnMgmt() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_ConnMgmt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ConnMgmt(::grpc::ServerContext* /*context*/, const ::pb::ConnMgmtRequest* /*request*/, ::pb::ConnMgmtResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestConnMgmt(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_Extras : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_Extras() { + ::grpc::Service::MarkMethodRaw(1); + } + ~WithRawMethod_Extras() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Extras(::grpc::ServerContext* /*context*/, const ::pb::ExtrasRequest* /*request*/, ::pb::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestExtras(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_P2P : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_P2P() { + ::grpc::Service::MarkMethodRaw(2); + } + ~WithRawMethod_P2P() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status P2P(::grpc::ServerContext* /*context*/, const ::pb::P2PRequest* /*request*/, ::pb::P2PResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestP2P(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_Blockstore : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_Blockstore() { + ::grpc::Service::MarkMethodRaw(3); + } + ~WithRawMethod_Blockstore() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Blockstore(::grpc::ServerContext* /*context*/, const ::pb::BlockstoreRequest* /*request*/, ::pb::BlockstoreResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestBlockstore(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(3, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_Dag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_Dag() { + ::grpc::Service::MarkMethodRaw(4); + } + ~WithRawMethod_Dag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Dag(::grpc::ServerContext* /*context*/, const ::pb::DagRequest* /*request*/, ::pb::DagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestDag(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(4, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_Keystore : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_Keystore() { + ::grpc::Service::MarkMethodRaw(5); + } + ~WithRawMethod_Keystore() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Keystore(::grpc::ServerContext* /*context*/, const ::pb::KeystoreRequest* /*request*/, ::pb::KeystoreResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestKeystore(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(5, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_Persist : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_Persist() { + ::grpc::Service::MarkMethodRaw(6); + } + ~WithRawMethod_Persist() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Persist(::grpc::ServerContext* /*context*/, const ::pb::PersistRequest* /*request*/, ::pb::PersistResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestPersist(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(6, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class ExperimentalWithRawCallbackMethod_ConnMgmt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_ConnMgmt() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(0, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->ConnMgmt(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_ConnMgmt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ConnMgmt(::grpc::ServerContext* /*context*/, const ::pb::ConnMgmtRequest* /*request*/, ::pb::ConnMgmtResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* ConnMgmt( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* ConnMgmt( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_Extras : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_Extras() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(1, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Extras(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_Extras() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Extras(::grpc::ServerContext* /*context*/, const ::pb::ExtrasRequest* /*request*/, ::pb::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* Extras( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* Extras( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_P2P : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_P2P() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(2, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->P2P(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_P2P() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status P2P(::grpc::ServerContext* /*context*/, const ::pb::P2PRequest* /*request*/, ::pb::P2PResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* P2P( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* P2P( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_Blockstore : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_Blockstore() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(3, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Blockstore(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_Blockstore() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Blockstore(::grpc::ServerContext* /*context*/, const ::pb::BlockstoreRequest* /*request*/, ::pb::BlockstoreResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* Blockstore( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* Blockstore( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_Dag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_Dag() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(4, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Dag(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_Dag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Dag(::grpc::ServerContext* /*context*/, const ::pb::DagRequest* /*request*/, ::pb::DagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* Dag( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* Dag( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_Keystore : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_Keystore() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(5, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Keystore(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_Keystore() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Keystore(::grpc::ServerContext* /*context*/, const ::pb::KeystoreRequest* /*request*/, ::pb::KeystoreResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* Keystore( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* Keystore( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_Persist : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_Persist() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(6, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Persist(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_Persist() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Persist(::grpc::ServerContext* /*context*/, const ::pb::PersistRequest* /*request*/, ::pb::PersistResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* Persist( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* Persist( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class WithStreamedUnaryMethod_ConnMgmt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_ConnMgmt() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::StreamedUnaryHandler< ::pb::ConnMgmtRequest, ::pb::ConnMgmtResponse>(std::bind(&WithStreamedUnaryMethod_ConnMgmt::StreamedConnMgmt, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_ConnMgmt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status ConnMgmt(::grpc::ServerContext* /*context*/, const ::pb::ConnMgmtRequest* /*request*/, ::pb::ConnMgmtResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedConnMgmt(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::pb::ConnMgmtRequest,::pb::ConnMgmtResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_Extras : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_Extras() { + ::grpc::Service::MarkMethodStreamed(1, + new ::grpc::internal::StreamedUnaryHandler< ::pb::ExtrasRequest, ::pb::Empty>(std::bind(&WithStreamedUnaryMethod_Extras::StreamedExtras, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_Extras() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status Extras(::grpc::ServerContext* /*context*/, const ::pb::ExtrasRequest* /*request*/, ::pb::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedExtras(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::pb::ExtrasRequest,::pb::Empty>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_P2P : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_P2P() { + ::grpc::Service::MarkMethodStreamed(2, + new ::grpc::internal::StreamedUnaryHandler< ::pb::P2PRequest, ::pb::P2PResponse>(std::bind(&WithStreamedUnaryMethod_P2P::StreamedP2P, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_P2P() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status P2P(::grpc::ServerContext* /*context*/, const ::pb::P2PRequest* /*request*/, ::pb::P2PResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedP2P(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::pb::P2PRequest,::pb::P2PResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_Blockstore : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_Blockstore() { + ::grpc::Service::MarkMethodStreamed(3, + new ::grpc::internal::StreamedUnaryHandler< ::pb::BlockstoreRequest, ::pb::BlockstoreResponse>(std::bind(&WithStreamedUnaryMethod_Blockstore::StreamedBlockstore, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_Blockstore() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status Blockstore(::grpc::ServerContext* /*context*/, const ::pb::BlockstoreRequest* /*request*/, ::pb::BlockstoreResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedBlockstore(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::pb::BlockstoreRequest,::pb::BlockstoreResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_Dag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_Dag() { + ::grpc::Service::MarkMethodStreamed(4, + new ::grpc::internal::StreamedUnaryHandler< ::pb::DagRequest, ::pb::DagResponse>(std::bind(&WithStreamedUnaryMethod_Dag::StreamedDag, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_Dag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status Dag(::grpc::ServerContext* /*context*/, const ::pb::DagRequest* /*request*/, ::pb::DagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedDag(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::pb::DagRequest,::pb::DagResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_Keystore : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_Keystore() { + ::grpc::Service::MarkMethodStreamed(5, + new ::grpc::internal::StreamedUnaryHandler< ::pb::KeystoreRequest, ::pb::KeystoreResponse>(std::bind(&WithStreamedUnaryMethod_Keystore::StreamedKeystore, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_Keystore() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status Keystore(::grpc::ServerContext* /*context*/, const ::pb::KeystoreRequest* /*request*/, ::pb::KeystoreResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedKeystore(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::pb::KeystoreRequest,::pb::KeystoreResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_Persist : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_Persist() { + ::grpc::Service::MarkMethodStreamed(6, + new ::grpc::internal::StreamedUnaryHandler< ::pb::PersistRequest, ::pb::PersistResponse>(std::bind(&WithStreamedUnaryMethod_Persist::StreamedPersist, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_Persist() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status Persist(::grpc::ServerContext* /*context*/, const ::pb::PersistRequest* /*request*/, ::pb::PersistResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedPersist(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::pb::PersistRequest,::pb::PersistResponse>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_ConnMgmt > > > > > > StreamedUnaryService; + typedef Service SplitStreamedService; + typedef WithStreamedUnaryMethod_ConnMgmt > > > > > > StreamedService; +}; + +} // namespace pb + + +#endif // GRPC_node_2eproto__INCLUDED diff --git a/cpp/node.pb.cc b/cpp/node.pb.cc new file mode 100644 index 0000000..d56eff3 --- /dev/null +++ b/cpp/node.pb.cc @@ -0,0 +1,6542 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: node.proto + +#include "node.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include +extern PROTOBUF_INTERNAL_EXPORT_node_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Block_node_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_node_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ConnMgmtResponse_ConnectedEntry_DoNotUse_node_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_node_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ConnMgmtResponse_StatusEntry_DoNotUse_node_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_node_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ConnMgmtStatus_node_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_node_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_DagRequest_LinksEntry_DoNotUse_node_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_node_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_IPLDLink_node_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_node_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_P2PLsInfo_node_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_node_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_PersistResponse_ErrorsEntry_DoNotUse_node_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_node_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_PersistResponse_StatusEntry_DoNotUse_node_2eproto; +namespace pb { +class P2PRequestDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _P2PRequest_default_instance_; +class P2PResponseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _P2PResponse_default_instance_; +class P2PLsInfoDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _P2PLsInfo_default_instance_; +class GetPeersResponseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _GetPeersResponse_default_instance_; +class ConnMgmtRequestDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _ConnMgmtRequest_default_instance_; +class ConnMgmtResponse_ConnectedEntry_DoNotUseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _ConnMgmtResponse_ConnectedEntry_DoNotUse_default_instance_; +class ConnMgmtResponse_StatusEntry_DoNotUseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _ConnMgmtResponse_StatusEntry_DoNotUse_default_instance_; +class ConnMgmtResponseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _ConnMgmtResponse_default_instance_; +class ConnMgmtStatusDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _ConnMgmtStatus_default_instance_; +class ExtrasRequestDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _ExtrasRequest_default_instance_; +class BlockstoreRequestDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _BlockstoreRequest_default_instance_; +class BlockstoreResponseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _BlockstoreResponse_default_instance_; +class BlockDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Block_default_instance_; +class DagRequest_LinksEntry_DoNotUseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _DagRequest_LinksEntry_DoNotUse_default_instance_; +class DagRequestDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _DagRequest_default_instance_; +class DagResponseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _DagResponse_default_instance_; +class IPLDLinkDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _IPLDLink_default_instance_; +class IPLDNodeDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _IPLDNode_default_instance_; +class KeystoreRequestDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _KeystoreRequest_default_instance_; +class KeystoreResponseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _KeystoreResponse_default_instance_; +class PersistRequestDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _PersistRequest_default_instance_; +class PersistResponse_StatusEntry_DoNotUseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _PersistResponse_StatusEntry_DoNotUse_default_instance_; +class PersistResponse_ErrorsEntry_DoNotUseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _PersistResponse_ErrorsEntry_DoNotUse_default_instance_; +class PersistResponseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _PersistResponse_default_instance_; +} // namespace pb +static void InitDefaultsscc_info_Block_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_Block_default_instance_; + new (ptr) ::pb::Block(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::Block::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Block_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Block_node_2eproto}, {}}; + +static void InitDefaultsscc_info_BlockstoreRequest_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_BlockstoreRequest_default_instance_; + new (ptr) ::pb::BlockstoreRequest(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::BlockstoreRequest::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_BlockstoreRequest_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_BlockstoreRequest_node_2eproto}, {}}; + +static void InitDefaultsscc_info_BlockstoreResponse_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_BlockstoreResponse_default_instance_; + new (ptr) ::pb::BlockstoreResponse(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::BlockstoreResponse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_BlockstoreResponse_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_BlockstoreResponse_node_2eproto}, { + &scc_info_Block_node_2eproto.base,}}; + +static void InitDefaultsscc_info_ConnMgmtRequest_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_ConnMgmtRequest_default_instance_; + new (ptr) ::pb::ConnMgmtRequest(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::ConnMgmtRequest::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ConnMgmtRequest_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_ConnMgmtRequest_node_2eproto}, {}}; + +static void InitDefaultsscc_info_ConnMgmtResponse_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_ConnMgmtResponse_default_instance_; + new (ptr) ::pb::ConnMgmtResponse(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::ConnMgmtResponse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_ConnMgmtResponse_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_ConnMgmtResponse_node_2eproto}, { + &scc_info_ConnMgmtResponse_ConnectedEntry_DoNotUse_node_2eproto.base, + &scc_info_ConnMgmtResponse_StatusEntry_DoNotUse_node_2eproto.base,}}; + +static void InitDefaultsscc_info_ConnMgmtResponse_ConnectedEntry_DoNotUse_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_ConnMgmtResponse_ConnectedEntry_DoNotUse_default_instance_; + new (ptr) ::pb::ConnMgmtResponse_ConnectedEntry_DoNotUse(); + } + ::pb::ConnMgmtResponse_ConnectedEntry_DoNotUse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ConnMgmtResponse_ConnectedEntry_DoNotUse_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_ConnMgmtResponse_ConnectedEntry_DoNotUse_node_2eproto}, {}}; + +static void InitDefaultsscc_info_ConnMgmtResponse_StatusEntry_DoNotUse_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_ConnMgmtResponse_StatusEntry_DoNotUse_default_instance_; + new (ptr) ::pb::ConnMgmtResponse_StatusEntry_DoNotUse(); + } + ::pb::ConnMgmtResponse_StatusEntry_DoNotUse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ConnMgmtResponse_StatusEntry_DoNotUse_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_ConnMgmtResponse_StatusEntry_DoNotUse_node_2eproto}, { + &scc_info_ConnMgmtStatus_node_2eproto.base,}}; + +static void InitDefaultsscc_info_ConnMgmtStatus_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_ConnMgmtStatus_default_instance_; + new (ptr) ::pb::ConnMgmtStatus(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::ConnMgmtStatus::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ConnMgmtStatus_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_ConnMgmtStatus_node_2eproto}, {}}; + +static void InitDefaultsscc_info_DagRequest_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_DagRequest_default_instance_; + new (ptr) ::pb::DagRequest(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::DagRequest::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_DagRequest_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_DagRequest_node_2eproto}, { + &scc_info_DagRequest_LinksEntry_DoNotUse_node_2eproto.base,}}; + +static void InitDefaultsscc_info_DagRequest_LinksEntry_DoNotUse_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_DagRequest_LinksEntry_DoNotUse_default_instance_; + new (ptr) ::pb::DagRequest_LinksEntry_DoNotUse(); + } + ::pb::DagRequest_LinksEntry_DoNotUse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_DagRequest_LinksEntry_DoNotUse_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_DagRequest_LinksEntry_DoNotUse_node_2eproto}, {}}; + +static void InitDefaultsscc_info_DagResponse_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_DagResponse_default_instance_; + new (ptr) ::pb::DagResponse(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::DagResponse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_DagResponse_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_DagResponse_node_2eproto}, { + &scc_info_IPLDLink_node_2eproto.base,}}; + +static void InitDefaultsscc_info_ExtrasRequest_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_ExtrasRequest_default_instance_; + new (ptr) ::pb::ExtrasRequest(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::ExtrasRequest::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ExtrasRequest_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_ExtrasRequest_node_2eproto}, {}}; + +static void InitDefaultsscc_info_GetPeersResponse_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_GetPeersResponse_default_instance_; + new (ptr) ::pb::GetPeersResponse(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::GetPeersResponse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_GetPeersResponse_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_GetPeersResponse_node_2eproto}, {}}; + +static void InitDefaultsscc_info_IPLDLink_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_IPLDLink_default_instance_; + new (ptr) ::pb::IPLDLink(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::IPLDLink::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_IPLDLink_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_IPLDLink_node_2eproto}, {}}; + +static void InitDefaultsscc_info_IPLDNode_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_IPLDNode_default_instance_; + new (ptr) ::pb::IPLDNode(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::IPLDNode::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_IPLDNode_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_IPLDNode_node_2eproto}, { + &scc_info_IPLDLink_node_2eproto.base,}}; + +static void InitDefaultsscc_info_KeystoreRequest_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_KeystoreRequest_default_instance_; + new (ptr) ::pb::KeystoreRequest(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::KeystoreRequest::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_KeystoreRequest_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_KeystoreRequest_node_2eproto}, {}}; + +static void InitDefaultsscc_info_KeystoreResponse_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_KeystoreResponse_default_instance_; + new (ptr) ::pb::KeystoreResponse(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::KeystoreResponse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_KeystoreResponse_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_KeystoreResponse_node_2eproto}, {}}; + +static void InitDefaultsscc_info_P2PLsInfo_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_P2PLsInfo_default_instance_; + new (ptr) ::pb::P2PLsInfo(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::P2PLsInfo::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_P2PLsInfo_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_P2PLsInfo_node_2eproto}, {}}; + +static void InitDefaultsscc_info_P2PRequest_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_P2PRequest_default_instance_; + new (ptr) ::pb::P2PRequest(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::P2PRequest::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_P2PRequest_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_P2PRequest_node_2eproto}, {}}; + +static void InitDefaultsscc_info_P2PResponse_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_P2PResponse_default_instance_; + new (ptr) ::pb::P2PResponse(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::P2PResponse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_P2PResponse_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_P2PResponse_node_2eproto}, { + &scc_info_P2PLsInfo_node_2eproto.base,}}; + +static void InitDefaultsscc_info_PersistRequest_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_PersistRequest_default_instance_; + new (ptr) ::pb::PersistRequest(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::PersistRequest::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_PersistRequest_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_PersistRequest_node_2eproto}, {}}; + +static void InitDefaultsscc_info_PersistResponse_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_PersistResponse_default_instance_; + new (ptr) ::pb::PersistResponse(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::PersistResponse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_PersistResponse_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_PersistResponse_node_2eproto}, { + &scc_info_PersistResponse_StatusEntry_DoNotUse_node_2eproto.base, + &scc_info_PersistResponse_ErrorsEntry_DoNotUse_node_2eproto.base,}}; + +static void InitDefaultsscc_info_PersistResponse_ErrorsEntry_DoNotUse_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_PersistResponse_ErrorsEntry_DoNotUse_default_instance_; + new (ptr) ::pb::PersistResponse_ErrorsEntry_DoNotUse(); + } + ::pb::PersistResponse_ErrorsEntry_DoNotUse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_PersistResponse_ErrorsEntry_DoNotUse_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_PersistResponse_ErrorsEntry_DoNotUse_node_2eproto}, {}}; + +static void InitDefaultsscc_info_PersistResponse_StatusEntry_DoNotUse_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_PersistResponse_StatusEntry_DoNotUse_default_instance_; + new (ptr) ::pb::PersistResponse_StatusEntry_DoNotUse(); + } + ::pb::PersistResponse_StatusEntry_DoNotUse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_PersistResponse_StatusEntry_DoNotUse_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_PersistResponse_StatusEntry_DoNotUse_node_2eproto}, {}}; + +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_node_2eproto[24]; +static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_node_2eproto[8]; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_node_2eproto = nullptr; + +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_node_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::P2PRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::P2PRequest, requesttype_), + PROTOBUF_FIELD_OFFSET(::pb::P2PRequest, all_), + PROTOBUF_FIELD_OFFSET(::pb::P2PRequest, verbose_), + PROTOBUF_FIELD_OFFSET(::pb::P2PRequest, protocolname_), + PROTOBUF_FIELD_OFFSET(::pb::P2PRequest, listenaddress_), + PROTOBUF_FIELD_OFFSET(::pb::P2PRequest, targetaddress_), + PROTOBUF_FIELD_OFFSET(::pb::P2PRequest, remoteaddress_), + PROTOBUF_FIELD_OFFSET(::pb::P2PRequest, allowcustomprotocols_), + PROTOBUF_FIELD_OFFSET(::pb::P2PRequest, reportpeerid_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::P2PResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::P2PResponse, requesttype_), + PROTOBUF_FIELD_OFFSET(::pb::P2PResponse, names_), + PROTOBUF_FIELD_OFFSET(::pb::P2PResponse, connsclosed_), + PROTOBUF_FIELD_OFFSET(::pb::P2PResponse, streaminfos_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::P2PLsInfo, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::P2PLsInfo, protocolname_), + PROTOBUF_FIELD_OFFSET(::pb::P2PLsInfo, listenaddress_), + PROTOBUF_FIELD_OFFSET(::pb::P2PLsInfo, targetaddress_), + PROTOBUF_FIELD_OFFSET(::pb::P2PLsInfo, local_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::GetPeersResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::GetPeersResponse, peerids_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::ConnMgmtRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::ConnMgmtRequest, requesttype_), + PROTOBUF_FIELD_OFFSET(::pb::ConnMgmtRequest, multiaddrs_), + PROTOBUF_FIELD_OFFSET(::pb::ConnMgmtRequest, peerids_), + PROTOBUF_FIELD_OFFSET(::pb::ConnMgmtResponse_ConnectedEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::pb::ConnMgmtResponse_ConnectedEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::ConnMgmtResponse_ConnectedEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::pb::ConnMgmtResponse_ConnectedEntry_DoNotUse, value_), + 0, + 1, + PROTOBUF_FIELD_OFFSET(::pb::ConnMgmtResponse_StatusEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::pb::ConnMgmtResponse_StatusEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::ConnMgmtResponse_StatusEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::pb::ConnMgmtResponse_StatusEntry_DoNotUse, value_), + 0, + 1, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::ConnMgmtResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::ConnMgmtResponse, requesttype_), + PROTOBUF_FIELD_OFFSET(::pb::ConnMgmtResponse, connected_), + PROTOBUF_FIELD_OFFSET(::pb::ConnMgmtResponse, status_), + PROTOBUF_FIELD_OFFSET(::pb::ConnMgmtResponse, peerids_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::ConnMgmtStatus, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::ConnMgmtStatus, disconnected_), + PROTOBUF_FIELD_OFFSET(::pb::ConnMgmtStatus, reason_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::ExtrasRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::ExtrasRequest, requesttype_), + PROTOBUF_FIELD_OFFSET(::pb::ExtrasRequest, extrasfeature_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::BlockstoreRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::BlockstoreRequest, requesttype_), + PROTOBUF_FIELD_OFFSET(::pb::BlockstoreRequest, reqopts_), + PROTOBUF_FIELD_OFFSET(::pb::BlockstoreRequest, cids_), + PROTOBUF_FIELD_OFFSET(::pb::BlockstoreRequest, data_), + PROTOBUF_FIELD_OFFSET(::pb::BlockstoreRequest, cidversion_), + PROTOBUF_FIELD_OFFSET(::pb::BlockstoreRequest, hashfunc_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::BlockstoreResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::BlockstoreResponse, requesttype_), + PROTOBUF_FIELD_OFFSET(::pb::BlockstoreResponse, blocks_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::Block, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::Block, cid_), + PROTOBUF_FIELD_OFFSET(::pb::Block, data_), + PROTOBUF_FIELD_OFFSET(::pb::DagRequest_LinksEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::pb::DagRequest_LinksEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::DagRequest_LinksEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::pb::DagRequest_LinksEntry_DoNotUse, value_), + 0, + 1, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::DagRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::DagRequest, requesttype_), + PROTOBUF_FIELD_OFFSET(::pb::DagRequest, data_), + PROTOBUF_FIELD_OFFSET(::pb::DagRequest, objectencoding_), + PROTOBUF_FIELD_OFFSET(::pb::DagRequest, serializationformat_), + PROTOBUF_FIELD_OFFSET(::pb::DagRequest, hashfunc_), + PROTOBUF_FIELD_OFFSET(::pb::DagRequest, cidversion_), + PROTOBUF_FIELD_OFFSET(::pb::DagRequest, hash_), + PROTOBUF_FIELD_OFFSET(::pb::DagRequest, links_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::DagResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::DagResponse, requesttype_), + PROTOBUF_FIELD_OFFSET(::pb::DagResponse, hashes_), + PROTOBUF_FIELD_OFFSET(::pb::DagResponse, rawdata_), + PROTOBUF_FIELD_OFFSET(::pb::DagResponse, links_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::IPLDLink, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::IPLDLink, hash_), + PROTOBUF_FIELD_OFFSET(::pb::IPLDLink, name_), + PROTOBUF_FIELD_OFFSET(::pb::IPLDLink, size_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::IPLDNode, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::IPLDNode, links_), + PROTOBUF_FIELD_OFFSET(::pb::IPLDNode, data_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::KeystoreRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::KeystoreRequest, requesttype_), + PROTOBUF_FIELD_OFFSET(::pb::KeystoreRequest, name_), + PROTOBUF_FIELD_OFFSET(::pb::KeystoreRequest, privatekey_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::KeystoreResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::KeystoreResponse, requesttype_), + PROTOBUF_FIELD_OFFSET(::pb::KeystoreResponse, privatekey_), + PROTOBUF_FIELD_OFFSET(::pb::KeystoreResponse, keynames_), + PROTOBUF_FIELD_OFFSET(::pb::KeystoreResponse, has_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::PersistRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::PersistRequest, cids_), + PROTOBUF_FIELD_OFFSET(::pb::PersistResponse_StatusEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::pb::PersistResponse_StatusEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::PersistResponse_StatusEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::pb::PersistResponse_StatusEntry_DoNotUse, value_), + 0, + 1, + PROTOBUF_FIELD_OFFSET(::pb::PersistResponse_ErrorsEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::pb::PersistResponse_ErrorsEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::PersistResponse_ErrorsEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::pb::PersistResponse_ErrorsEntry_DoNotUse, value_), + 0, + 1, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::PersistResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::PersistResponse, status_), + PROTOBUF_FIELD_OFFSET(::pb::PersistResponse, errors_), +}; +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(::pb::P2PRequest)}, + { 14, -1, sizeof(::pb::P2PResponse)}, + { 23, -1, sizeof(::pb::P2PLsInfo)}, + { 32, -1, sizeof(::pb::GetPeersResponse)}, + { 38, -1, sizeof(::pb::ConnMgmtRequest)}, + { 46, 53, sizeof(::pb::ConnMgmtResponse_ConnectedEntry_DoNotUse)}, + { 55, 62, sizeof(::pb::ConnMgmtResponse_StatusEntry_DoNotUse)}, + { 64, -1, sizeof(::pb::ConnMgmtResponse)}, + { 73, -1, sizeof(::pb::ConnMgmtStatus)}, + { 80, -1, sizeof(::pb::ExtrasRequest)}, + { 87, -1, sizeof(::pb::BlockstoreRequest)}, + { 98, -1, sizeof(::pb::BlockstoreResponse)}, + { 105, -1, sizeof(::pb::Block)}, + { 112, 119, sizeof(::pb::DagRequest_LinksEntry_DoNotUse)}, + { 121, -1, sizeof(::pb::DagRequest)}, + { 134, -1, sizeof(::pb::DagResponse)}, + { 143, -1, sizeof(::pb::IPLDLink)}, + { 151, -1, sizeof(::pb::IPLDNode)}, + { 158, -1, sizeof(::pb::KeystoreRequest)}, + { 166, -1, sizeof(::pb::KeystoreResponse)}, + { 175, -1, sizeof(::pb::PersistRequest)}, + { 181, 188, sizeof(::pb::PersistResponse_StatusEntry_DoNotUse)}, + { 190, 197, sizeof(::pb::PersistResponse_ErrorsEntry_DoNotUse)}, + { 199, -1, sizeof(::pb::PersistResponse)}, +}; + +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&::pb::_P2PRequest_default_instance_), + reinterpret_cast(&::pb::_P2PResponse_default_instance_), + reinterpret_cast(&::pb::_P2PLsInfo_default_instance_), + reinterpret_cast(&::pb::_GetPeersResponse_default_instance_), + reinterpret_cast(&::pb::_ConnMgmtRequest_default_instance_), + reinterpret_cast(&::pb::_ConnMgmtResponse_ConnectedEntry_DoNotUse_default_instance_), + reinterpret_cast(&::pb::_ConnMgmtResponse_StatusEntry_DoNotUse_default_instance_), + reinterpret_cast(&::pb::_ConnMgmtResponse_default_instance_), + reinterpret_cast(&::pb::_ConnMgmtStatus_default_instance_), + reinterpret_cast(&::pb::_ExtrasRequest_default_instance_), + reinterpret_cast(&::pb::_BlockstoreRequest_default_instance_), + reinterpret_cast(&::pb::_BlockstoreResponse_default_instance_), + reinterpret_cast(&::pb::_Block_default_instance_), + reinterpret_cast(&::pb::_DagRequest_LinksEntry_DoNotUse_default_instance_), + reinterpret_cast(&::pb::_DagRequest_default_instance_), + reinterpret_cast(&::pb::_DagResponse_default_instance_), + reinterpret_cast(&::pb::_IPLDLink_default_instance_), + reinterpret_cast(&::pb::_IPLDNode_default_instance_), + reinterpret_cast(&::pb::_KeystoreRequest_default_instance_), + reinterpret_cast(&::pb::_KeystoreResponse_default_instance_), + reinterpret_cast(&::pb::_PersistRequest_default_instance_), + reinterpret_cast(&::pb::_PersistResponse_StatusEntry_DoNotUse_default_instance_), + reinterpret_cast(&::pb::_PersistResponse_ErrorsEntry_DoNotUse_default_instance_), + reinterpret_cast(&::pb::_PersistResponse_default_instance_), +}; + +const char descriptor_table_protodef_node_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\nnode.proto\022\002pb\032\nutil.proto\"\336\001\n\nP2PRequ" + "est\022#\n\013requestType\030\001 \001(\0162\016.pb.P2PREQTYPE" + "\022\013\n\003all\030\002 \001(\010\022\017\n\007verbose\030\003 \001(\010\022\024\n\014protoc" + "olName\030\004 \001(\t\022\025\n\rlistenAddress\030\005 \001(\t\022\025\n\rt" + "argetAddress\030\006 \001(\t\022\025\n\rremoteAddress\030\007 \001(" + "\t\022\034\n\024allowCustomProtocols\030\010 \001(\010\022\024\n\014repor" + "tPeerID\030\t \001(\010\"z\n\013P2PResponse\022#\n\013requestT" + "ype\030\001 \001(\0162\016.pb.P2PREQTYPE\022\r\n\005names\030\002 \003(\t" + "\022\023\n\013connsClosed\030\003 \001(\005\022\"\n\013streamInfos\030\004 \003" + "(\0132\r.pb.P2PLsInfo\"^\n\tP2PLsInfo\022\024\n\014protoc" + "olName\030\001 \001(\t\022\025\n\rlistenAddress\030\002 \001(\t\022\025\n\rt" + "argetAddress\030\003 \001(\t\022\r\n\005local\030\004 \001(\010\"#\n\020Get" + "PeersResponse\022\017\n\007peerIDs\030\001 \003(\t\"`\n\017ConnMg" + "mtRequest\022(\n\013requestType\030\001 \001(\0162\023.pb.CONN" + "MGMTREQTYPE\022\022\n\nmultiAddrs\030\002 \003(\t\022\017\n\007peerI" + "Ds\030\003 \003(\t\"\254\002\n\020ConnMgmtResponse\022(\n\013request" + "Type\030\001 \001(\0162\023.pb.CONNMGMTREQTYPE\0226\n\tconne" + "cted\030\002 \003(\0132#.pb.ConnMgmtResponse.Connect" + "edEntry\0220\n\006status\030\003 \003(\0132 .pb.ConnMgmtRes" + "ponse.StatusEntry\022\017\n\007peerIDs\030\004 \003(\t\0320\n\016Co" + "nnectedEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\010" + ":\0028\001\032A\n\013StatusEntry\022\013\n\003key\030\001 \001(\t\022!\n\005valu" + "e\030\002 \001(\0132\022.pb.ConnMgmtStatus:\0028\001\"6\n\016ConnM" + "gmtStatus\022\024\n\014disconnected\030\001 \001(\010\022\016\n\006reaso" + "n\030\002 \001(\t\"^\n\rExtrasRequest\022&\n\013requestType\030" + "\001 \001(\0162\021.pb.EXTRASREQTYPE\022%\n\rextrasFeatur" + "e\030\002 \001(\0162\016.pb.EXTRASTYPE\"\231\001\n\021BlockstoreRe" + "quest\022\"\n\013requestType\030\001 \001(\0162\r.pb.BSREQTYP" + "E\022\036\n\007reqOpts\030\002 \003(\0162\r.pb.BSREQOPTS\022\014\n\004cid" + "s\030\003 \003(\t\022\014\n\004data\030\004 \003(\014\022\022\n\ncidVersion\030\005 \001(" + "\t\022\020\n\010hashFunc\030\007 \001(\t\"S\n\022BlockstoreRespons" + "e\022\"\n\013requestType\030\001 \001(\0162\r.pb.BSREQTYPE\022\031\n" + "\006blocks\030\002 \003(\0132\t.pb.Block\"\"\n\005Block\022\013\n\003cid" + "\030\001 \001(\t\022\014\n\004data\030\002 \001(\014\"\200\002\n\nDagRequest\022#\n\013r" + "equestType\030\001 \001(\0162\016.pb.DAGREQTYPE\022\014\n\004data" + "\030\002 \001(\014\022\026\n\016objectEncoding\030\003 \001(\t\022\033\n\023serial" + "izationFormat\030\004 \001(\t\022\020\n\010hashFunc\030\005 \001(\t\022\022\n" + "\ncidVersion\030\006 \001(\003\022\014\n\004hash\030\007 \001(\t\022(\n\005links" + "\030\010 \003(\0132\031.pb.DagRequest.LinksEntry\032,\n\nLin" + "ksEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"" + "p\n\013DagResponse\022#\n\013requestType\030\001 \001(\0162\016.pb" + ".DAGREQTYPE\022\016\n\006hashes\030\002 \003(\t\022\017\n\007rawData\030\003" + " \001(\014\022\033\n\005links\030\004 \003(\0132\014.pb.IPLDLink\"4\n\010IPL" + "DLink\022\014\n\004hash\030\001 \001(\014\022\014\n\004name\030\002 \001(\t\022\014\n\004siz" + "e\030\003 \001(\004\"5\n\010IPLDNode\022\033\n\005links\030\002 \003(\0132\014.pb." + "IPLDLink\022\014\n\004data\030\001 \001(\014\"W\n\017KeystoreReques" + "t\022\"\n\013requestType\030\001 \001(\0162\r.pb.KSREQTYPE\022\014\n" + "\004name\030\002 \001(\t\022\022\n\nprivateKey\030\003 \001(\014\"i\n\020Keyst" + "oreResponse\022\"\n\013requestType\030\001 \001(\0162\r.pb.KS" + "REQTYPE\022\022\n\nprivateKey\030\002 \001(\014\022\020\n\010keyNames\030" + "\003 \003(\t\022\013\n\003has\030\004 \001(\010\"\036\n\016PersistRequest\022\014\n\004" + "cids\030\001 \003(\t\"\321\001\n\017PersistResponse\022/\n\006status" + "\030\001 \003(\0132\037.pb.PersistResponse.StatusEntry\022" + "/\n\006errors\030\002 \003(\0132\037.pb.PersistResponse.Err" + "orsEntry\032-\n\013StatusEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" + "value\030\002 \001(\010:\0028\001\032-\n\013ErrorsEntry\022\013\n\003key\030\001 " + "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001*8\n\nP2PREQTYPE\022\t\n\005" + "CLOSE\020\000\022\013\n\007FORWARD\020\001\022\n\n\006LISTEN\020\002\022\006\n\002LS\020\003" + "*U\n\017CONNMGMTREQTYPE\022\016\n\nCM_CONNECT\020\000\022\021\n\rC" + "M_DISCONNECT\020\001\022\r\n\tCM_STATUS\020\002\022\020\n\014CM_GET_" + "PEERS\020\003*.\n\rEXTRASREQTYPE\022\r\n\tEX_ENABLE\020\000\022" + "\016\n\nEX_DISABLE\020\001*\?\n\nEXTRASTYPE\022\014\n\010IDENTIF" + "Y\020\000\022\n\n\006PUBSUB\020\001\022\r\n\tDISCOVERY\020\002\022\010\n\004MDNS\020\003" + "*T\n\tBSREQTYPE\022\r\n\tBS_DELETE\020\000\022\n\n\006BS_PUT\020\001" + "\022\017\n\013BS_PUT_MANY\020\002\022\n\n\006BS_GET\020\003\022\017\n\013BS_GET_" + "MANY\020\004*&\n\tBSREQOPTS\022\013\n\007DEFAULT\020\000\022\014\n\010BS_F" + "ORCE\020\001*^\n\nDAGREQTYPE\022\013\n\007DAG_PUT\020\000\022\013\n\007DAG" + "_GET\020\001\022\020\n\014DAG_NEW_NODE\020\002\022\021\n\rDAG_ADD_LINK" + "S\020\003\022\021\n\rDAG_GET_LINKS\020\004*K\n\tKSREQTYPE\022\n\n\006K" + "S_HAS\020\000\022\n\n\006KS_GET\020\001\022\n\n\006KS_PUT\020\002\022\r\n\tKS_DE" + "LETE\020\003\022\013\n\007KS_LIST\020\0042\356\002\n\007NodeAPI\0227\n\010ConnM" + "gmt\022\023.pb.ConnMgmtRequest\032\024.pb.ConnMgmtRe" + "sponse\"\000\022(\n\006Extras\022\021.pb.ExtrasRequest\032\t." + "pb.Empty\"\000\022(\n\003P2P\022\016.pb.P2PRequest\032\017.pb.P" + "2PResponse\"\000\022=\n\nBlockstore\022\025.pb.Blocksto" + "reRequest\032\026.pb.BlockstoreResponse\"\000\022(\n\003D" + "ag\022\016.pb.DagRequest\032\017.pb.DagResponse\"\000\0227\n" + "\010Keystore\022\023.pb.KeystoreRequest\032\024.pb.Keys" + "toreResponse\"\000\0224\n\007Persist\022\022.pb.PersistRe" + "quest\032\023.pb.PersistResponse\"\000b\006proto3" + ; +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_node_2eproto_deps[1] = { + &::descriptor_table_util_2eproto, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_node_2eproto_sccs[24] = { + &scc_info_Block_node_2eproto.base, + &scc_info_BlockstoreRequest_node_2eproto.base, + &scc_info_BlockstoreResponse_node_2eproto.base, + &scc_info_ConnMgmtRequest_node_2eproto.base, + &scc_info_ConnMgmtResponse_node_2eproto.base, + &scc_info_ConnMgmtResponse_ConnectedEntry_DoNotUse_node_2eproto.base, + &scc_info_ConnMgmtResponse_StatusEntry_DoNotUse_node_2eproto.base, + &scc_info_ConnMgmtStatus_node_2eproto.base, + &scc_info_DagRequest_node_2eproto.base, + &scc_info_DagRequest_LinksEntry_DoNotUse_node_2eproto.base, + &scc_info_DagResponse_node_2eproto.base, + &scc_info_ExtrasRequest_node_2eproto.base, + &scc_info_GetPeersResponse_node_2eproto.base, + &scc_info_IPLDLink_node_2eproto.base, + &scc_info_IPLDNode_node_2eproto.base, + &scc_info_KeystoreRequest_node_2eproto.base, + &scc_info_KeystoreResponse_node_2eproto.base, + &scc_info_P2PLsInfo_node_2eproto.base, + &scc_info_P2PRequest_node_2eproto.base, + &scc_info_P2PResponse_node_2eproto.base, + &scc_info_PersistRequest_node_2eproto.base, + &scc_info_PersistResponse_node_2eproto.base, + &scc_info_PersistResponse_ErrorsEntry_DoNotUse_node_2eproto.base, + &scc_info_PersistResponse_StatusEntry_DoNotUse_node_2eproto.base, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_node_2eproto_once; +static bool descriptor_table_node_2eproto_initialized = false; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_node_2eproto = { + &descriptor_table_node_2eproto_initialized, descriptor_table_protodef_node_2eproto, "node.proto", 3196, + &descriptor_table_node_2eproto_once, descriptor_table_node_2eproto_sccs, descriptor_table_node_2eproto_deps, 24, 1, + schemas, file_default_instances, TableStruct_node_2eproto::offsets, + file_level_metadata_node_2eproto, 24, file_level_enum_descriptors_node_2eproto, file_level_service_descriptors_node_2eproto, +}; + +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_node_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_node_2eproto), true); +namespace pb { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* P2PREQTYPE_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_node_2eproto); + return file_level_enum_descriptors_node_2eproto[0]; +} +bool P2PREQTYPE_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* CONNMGMTREQTYPE_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_node_2eproto); + return file_level_enum_descriptors_node_2eproto[1]; +} +bool CONNMGMTREQTYPE_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EXTRASREQTYPE_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_node_2eproto); + return file_level_enum_descriptors_node_2eproto[2]; +} +bool EXTRASREQTYPE_IsValid(int value) { + switch (value) { + case 0: + case 1: + return true; + default: + return false; + } +} + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EXTRASTYPE_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_node_2eproto); + return file_level_enum_descriptors_node_2eproto[3]; +} +bool EXTRASTYPE_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* BSREQTYPE_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_node_2eproto); + return file_level_enum_descriptors_node_2eproto[4]; +} +bool BSREQTYPE_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + return true; + default: + return false; + } +} + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* BSREQOPTS_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_node_2eproto); + return file_level_enum_descriptors_node_2eproto[5]; +} +bool BSREQOPTS_IsValid(int value) { + switch (value) { + case 0: + case 1: + return true; + default: + return false; + } +} + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* DAGREQTYPE_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_node_2eproto); + return file_level_enum_descriptors_node_2eproto[6]; +} +bool DAGREQTYPE_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + return true; + default: + return false; + } +} + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* KSREQTYPE_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_node_2eproto); + return file_level_enum_descriptors_node_2eproto[7]; +} +bool KSREQTYPE_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + return true; + default: + return false; + } +} + + +// =================================================================== + +void P2PRequest::InitAsDefaultInstance() { +} +class P2PRequest::_Internal { + public: +}; + +P2PRequest::P2PRequest() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.P2PRequest) +} +P2PRequest::P2PRequest(const P2PRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + protocolname_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_protocolname().empty()) { + protocolname_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.protocolname_); + } + listenaddress_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_listenaddress().empty()) { + listenaddress_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.listenaddress_); + } + targetaddress_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_targetaddress().empty()) { + targetaddress_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.targetaddress_); + } + remoteaddress_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_remoteaddress().empty()) { + remoteaddress_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.remoteaddress_); + } + ::memcpy(&requesttype_, &from.requesttype_, + static_cast(reinterpret_cast(&reportpeerid_) - + reinterpret_cast(&requesttype_)) + sizeof(reportpeerid_)); + // @@protoc_insertion_point(copy_constructor:pb.P2PRequest) +} + +void P2PRequest::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_P2PRequest_node_2eproto.base); + protocolname_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + listenaddress_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + targetaddress_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + remoteaddress_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&requesttype_, 0, static_cast( + reinterpret_cast(&reportpeerid_) - + reinterpret_cast(&requesttype_)) + sizeof(reportpeerid_)); +} + +P2PRequest::~P2PRequest() { + // @@protoc_insertion_point(destructor:pb.P2PRequest) + SharedDtor(); +} + +void P2PRequest::SharedDtor() { + protocolname_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + listenaddress_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + targetaddress_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + remoteaddress_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void P2PRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const P2PRequest& P2PRequest::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_P2PRequest_node_2eproto.base); + return *internal_default_instance(); +} + + +void P2PRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.P2PRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + protocolname_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + listenaddress_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + targetaddress_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + remoteaddress_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&requesttype_, 0, static_cast( + reinterpret_cast(&reportpeerid_) - + reinterpret_cast(&requesttype_)) + sizeof(reportpeerid_)); + _internal_metadata_.Clear(); +} + +const char* P2PRequest::_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) { + // .pb.P2PREQTYPE requestType = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + _internal_set_requesttype(static_cast<::pb::P2PREQTYPE>(val)); + } else goto handle_unusual; + continue; + // bool all = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + all_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool verbose = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + verbose_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string protocolName = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + auto str = _internal_mutable_protocolname(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.P2PRequest.protocolName")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string listenAddress = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + auto str = _internal_mutable_listenaddress(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.P2PRequest.listenAddress")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string targetAddress = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { + auto str = _internal_mutable_targetaddress(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.P2PRequest.targetAddress")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string remoteAddress = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { + auto str = _internal_mutable_remoteaddress(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.P2PRequest.remoteAddress")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool allowCustomProtocols = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { + allowcustomprotocols_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool reportPeerID = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { + reportpeerid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* P2PRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.P2PRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .pb.P2PREQTYPE requestType = 1; + if (this->requesttype() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_requesttype(), target); + } + + // bool all = 2; + if (this->all() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_all(), target); + } + + // bool verbose = 3; + if (this->verbose() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_verbose(), target); + } + + // string protocolName = 4; + if (this->protocolname().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_protocolname().data(), static_cast(this->_internal_protocolname().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.P2PRequest.protocolName"); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_protocolname(), target); + } + + // string listenAddress = 5; + if (this->listenaddress().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_listenaddress().data(), static_cast(this->_internal_listenaddress().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.P2PRequest.listenAddress"); + target = stream->WriteStringMaybeAliased( + 5, this->_internal_listenaddress(), target); + } + + // string targetAddress = 6; + if (this->targetaddress().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_targetaddress().data(), static_cast(this->_internal_targetaddress().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.P2PRequest.targetAddress"); + target = stream->WriteStringMaybeAliased( + 6, this->_internal_targetaddress(), target); + } + + // string remoteAddress = 7; + if (this->remoteaddress().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_remoteaddress().data(), static_cast(this->_internal_remoteaddress().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.P2PRequest.remoteAddress"); + target = stream->WriteStringMaybeAliased( + 7, this->_internal_remoteaddress(), target); + } + + // bool allowCustomProtocols = 8; + if (this->allowcustomprotocols() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_allowcustomprotocols(), target); + } + + // bool reportPeerID = 9; + if (this->reportpeerid() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_reportpeerid(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.P2PRequest) + return target; +} + +size_t P2PRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.P2PRequest) + 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 protocolName = 4; + if (this->protocolname().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_protocolname()); + } + + // string listenAddress = 5; + if (this->listenaddress().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_listenaddress()); + } + + // string targetAddress = 6; + if (this->targetaddress().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_targetaddress()); + } + + // string remoteAddress = 7; + if (this->remoteaddress().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_remoteaddress()); + } + + // .pb.P2PREQTYPE requestType = 1; + if (this->requesttype() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_requesttype()); + } + + // bool all = 2; + if (this->all() != 0) { + total_size += 1 + 1; + } + + // bool verbose = 3; + if (this->verbose() != 0) { + total_size += 1 + 1; + } + + // bool allowCustomProtocols = 8; + if (this->allowcustomprotocols() != 0) { + total_size += 1 + 1; + } + + // bool reportPeerID = 9; + if (this->reportpeerid() != 0) { + total_size += 1 + 1; + } + + 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 P2PRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.P2PRequest) + GOOGLE_DCHECK_NE(&from, this); + const P2PRequest* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.P2PRequest) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.P2PRequest) + MergeFrom(*source); + } +} + +void P2PRequest::MergeFrom(const P2PRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.P2PRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.protocolname().size() > 0) { + + protocolname_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.protocolname_); + } + if (from.listenaddress().size() > 0) { + + listenaddress_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.listenaddress_); + } + if (from.targetaddress().size() > 0) { + + targetaddress_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.targetaddress_); + } + if (from.remoteaddress().size() > 0) { + + remoteaddress_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.remoteaddress_); + } + if (from.requesttype() != 0) { + _internal_set_requesttype(from._internal_requesttype()); + } + if (from.all() != 0) { + _internal_set_all(from._internal_all()); + } + if (from.verbose() != 0) { + _internal_set_verbose(from._internal_verbose()); + } + if (from.allowcustomprotocols() != 0) { + _internal_set_allowcustomprotocols(from._internal_allowcustomprotocols()); + } + if (from.reportpeerid() != 0) { + _internal_set_reportpeerid(from._internal_reportpeerid()); + } +} + +void P2PRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.P2PRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void P2PRequest::CopyFrom(const P2PRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.P2PRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool P2PRequest::IsInitialized() const { + return true; +} + +void P2PRequest::InternalSwap(P2PRequest* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + protocolname_.Swap(&other->protocolname_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + listenaddress_.Swap(&other->listenaddress_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + targetaddress_.Swap(&other->targetaddress_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + remoteaddress_.Swap(&other->remoteaddress_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(requesttype_, other->requesttype_); + swap(all_, other->all_); + swap(verbose_, other->verbose_); + swap(allowcustomprotocols_, other->allowcustomprotocols_); + swap(reportpeerid_, other->reportpeerid_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata P2PRequest::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void P2PResponse::InitAsDefaultInstance() { +} +class P2PResponse::_Internal { + public: +}; + +P2PResponse::P2PResponse() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.P2PResponse) +} +P2PResponse::P2PResponse(const P2PResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr), + names_(from.names_), + streaminfos_(from.streaminfos_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&requesttype_, &from.requesttype_, + static_cast(reinterpret_cast(&connsclosed_) - + reinterpret_cast(&requesttype_)) + sizeof(connsclosed_)); + // @@protoc_insertion_point(copy_constructor:pb.P2PResponse) +} + +void P2PResponse::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_P2PResponse_node_2eproto.base); + ::memset(&requesttype_, 0, static_cast( + reinterpret_cast(&connsclosed_) - + reinterpret_cast(&requesttype_)) + sizeof(connsclosed_)); +} + +P2PResponse::~P2PResponse() { + // @@protoc_insertion_point(destructor:pb.P2PResponse) + SharedDtor(); +} + +void P2PResponse::SharedDtor() { +} + +void P2PResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const P2PResponse& P2PResponse::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_P2PResponse_node_2eproto.base); + return *internal_default_instance(); +} + + +void P2PResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.P2PResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + names_.Clear(); + streaminfos_.Clear(); + ::memset(&requesttype_, 0, static_cast( + reinterpret_cast(&connsclosed_) - + reinterpret_cast(&requesttype_)) + sizeof(connsclosed_)); + _internal_metadata_.Clear(); +} + +const char* P2PResponse::_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) { + // .pb.P2PREQTYPE requestType = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + _internal_set_requesttype(static_cast<::pb::P2PREQTYPE>(val)); + } else goto handle_unusual; + continue; + // repeated string names = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_names(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.P2PResponse.names")); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else goto handle_unusual; + continue; + // int32 connsClosed = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + connsclosed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // repeated .pb.P2PLsInfo streamInfos = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_streaminfos(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* P2PResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.P2PResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .pb.P2PREQTYPE requestType = 1; + if (this->requesttype() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_requesttype(), target); + } + + // repeated string names = 2; + for (int i = 0, n = this->_internal_names_size(); i < n; i++) { + const auto& s = this->_internal_names(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.P2PResponse.names"); + target = stream->WriteString(2, s, target); + } + + // int32 connsClosed = 3; + if (this->connsclosed() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_connsclosed(), target); + } + + // repeated .pb.P2PLsInfo streamInfos = 4; + for (unsigned int i = 0, + n = static_cast(this->_internal_streaminfos_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(4, this->_internal_streaminfos(i), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.P2PResponse) + return target; +} + +size_t P2PResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.P2PResponse) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string names = 2; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(names_.size()); + for (int i = 0, n = names_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + names_.Get(i)); + } + + // repeated .pb.P2PLsInfo streamInfos = 4; + total_size += 1UL * this->_internal_streaminfos_size(); + for (const auto& msg : this->streaminfos_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // .pb.P2PREQTYPE requestType = 1; + if (this->requesttype() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_requesttype()); + } + + // int32 connsClosed = 3; + if (this->connsclosed() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_connsclosed()); + } + + 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 P2PResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.P2PResponse) + GOOGLE_DCHECK_NE(&from, this); + const P2PResponse* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.P2PResponse) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.P2PResponse) + MergeFrom(*source); + } +} + +void P2PResponse::MergeFrom(const P2PResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.P2PResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + names_.MergeFrom(from.names_); + streaminfos_.MergeFrom(from.streaminfos_); + if (from.requesttype() != 0) { + _internal_set_requesttype(from._internal_requesttype()); + } + if (from.connsclosed() != 0) { + _internal_set_connsclosed(from._internal_connsclosed()); + } +} + +void P2PResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.P2PResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void P2PResponse::CopyFrom(const P2PResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.P2PResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool P2PResponse::IsInitialized() const { + return true; +} + +void P2PResponse::InternalSwap(P2PResponse* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + names_.InternalSwap(&other->names_); + streaminfos_.InternalSwap(&other->streaminfos_); + swap(requesttype_, other->requesttype_); + swap(connsclosed_, other->connsclosed_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata P2PResponse::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void P2PLsInfo::InitAsDefaultInstance() { +} +class P2PLsInfo::_Internal { + public: +}; + +P2PLsInfo::P2PLsInfo() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.P2PLsInfo) +} +P2PLsInfo::P2PLsInfo(const P2PLsInfo& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + protocolname_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_protocolname().empty()) { + protocolname_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.protocolname_); + } + listenaddress_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_listenaddress().empty()) { + listenaddress_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.listenaddress_); + } + targetaddress_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_targetaddress().empty()) { + targetaddress_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.targetaddress_); + } + local_ = from.local_; + // @@protoc_insertion_point(copy_constructor:pb.P2PLsInfo) +} + +void P2PLsInfo::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_P2PLsInfo_node_2eproto.base); + protocolname_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + listenaddress_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + targetaddress_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + local_ = false; +} + +P2PLsInfo::~P2PLsInfo() { + // @@protoc_insertion_point(destructor:pb.P2PLsInfo) + SharedDtor(); +} + +void P2PLsInfo::SharedDtor() { + protocolname_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + listenaddress_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + targetaddress_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void P2PLsInfo::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const P2PLsInfo& P2PLsInfo::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_P2PLsInfo_node_2eproto.base); + return *internal_default_instance(); +} + + +void P2PLsInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.P2PLsInfo) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + protocolname_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + listenaddress_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + targetaddress_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + local_ = false; + _internal_metadata_.Clear(); +} + +const char* P2PLsInfo::_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 protocolName = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_protocolname(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.P2PLsInfo.protocolName")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string listenAddress = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_listenaddress(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.P2PLsInfo.listenAddress")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string targetAddress = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + auto str = _internal_mutable_targetaddress(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.P2PLsInfo.targetAddress")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool local = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + local_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* P2PLsInfo::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.P2PLsInfo) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string protocolName = 1; + if (this->protocolname().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_protocolname().data(), static_cast(this->_internal_protocolname().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.P2PLsInfo.protocolName"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_protocolname(), target); + } + + // string listenAddress = 2; + if (this->listenaddress().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_listenaddress().data(), static_cast(this->_internal_listenaddress().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.P2PLsInfo.listenAddress"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_listenaddress(), target); + } + + // string targetAddress = 3; + if (this->targetaddress().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_targetaddress().data(), static_cast(this->_internal_targetaddress().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.P2PLsInfo.targetAddress"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_targetaddress(), target); + } + + // bool local = 4; + if (this->local() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_local(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.P2PLsInfo) + return target; +} + +size_t P2PLsInfo::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.P2PLsInfo) + 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 protocolName = 1; + if (this->protocolname().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_protocolname()); + } + + // string listenAddress = 2; + if (this->listenaddress().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_listenaddress()); + } + + // string targetAddress = 3; + if (this->targetaddress().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_targetaddress()); + } + + // bool local = 4; + if (this->local() != 0) { + total_size += 1 + 1; + } + + 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 P2PLsInfo::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.P2PLsInfo) + GOOGLE_DCHECK_NE(&from, this); + const P2PLsInfo* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.P2PLsInfo) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.P2PLsInfo) + MergeFrom(*source); + } +} + +void P2PLsInfo::MergeFrom(const P2PLsInfo& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.P2PLsInfo) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.protocolname().size() > 0) { + + protocolname_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.protocolname_); + } + if (from.listenaddress().size() > 0) { + + listenaddress_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.listenaddress_); + } + if (from.targetaddress().size() > 0) { + + targetaddress_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.targetaddress_); + } + if (from.local() != 0) { + _internal_set_local(from._internal_local()); + } +} + +void P2PLsInfo::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.P2PLsInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void P2PLsInfo::CopyFrom(const P2PLsInfo& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.P2PLsInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool P2PLsInfo::IsInitialized() const { + return true; +} + +void P2PLsInfo::InternalSwap(P2PLsInfo* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + protocolname_.Swap(&other->protocolname_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + listenaddress_.Swap(&other->listenaddress_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + targetaddress_.Swap(&other->targetaddress_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(local_, other->local_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata P2PLsInfo::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void GetPeersResponse::InitAsDefaultInstance() { +} +class GetPeersResponse::_Internal { + public: +}; + +GetPeersResponse::GetPeersResponse() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.GetPeersResponse) +} +GetPeersResponse::GetPeersResponse(const GetPeersResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr), + peerids_(from.peerids_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:pb.GetPeersResponse) +} + +void GetPeersResponse::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_GetPeersResponse_node_2eproto.base); +} + +GetPeersResponse::~GetPeersResponse() { + // @@protoc_insertion_point(destructor:pb.GetPeersResponse) + SharedDtor(); +} + +void GetPeersResponse::SharedDtor() { +} + +void GetPeersResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const GetPeersResponse& GetPeersResponse::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_GetPeersResponse_node_2eproto.base); + return *internal_default_instance(); +} + + +void GetPeersResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.GetPeersResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + peerids_.Clear(); + _internal_metadata_.Clear(); +} + +const char* GetPeersResponse::_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) { + // repeated string peerIDs = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_peerids(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.GetPeersResponse.peerIDs")); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* GetPeersResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.GetPeersResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // repeated string peerIDs = 1; + for (int i = 0, n = this->_internal_peerids_size(); i < n; i++) { + const auto& s = this->_internal_peerids(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.GetPeersResponse.peerIDs"); + target = stream->WriteString(1, s, target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.GetPeersResponse) + return target; +} + +size_t GetPeersResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.GetPeersResponse) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string peerIDs = 1; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(peerids_.size()); + for (int i = 0, n = peerids_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + peerids_.Get(i)); + } + + 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 GetPeersResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.GetPeersResponse) + GOOGLE_DCHECK_NE(&from, this); + const GetPeersResponse* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.GetPeersResponse) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.GetPeersResponse) + MergeFrom(*source); + } +} + +void GetPeersResponse::MergeFrom(const GetPeersResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.GetPeersResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + peerids_.MergeFrom(from.peerids_); +} + +void GetPeersResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.GetPeersResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void GetPeersResponse::CopyFrom(const GetPeersResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.GetPeersResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GetPeersResponse::IsInitialized() const { + return true; +} + +void GetPeersResponse::InternalSwap(GetPeersResponse* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + peerids_.InternalSwap(&other->peerids_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GetPeersResponse::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void ConnMgmtRequest::InitAsDefaultInstance() { +} +class ConnMgmtRequest::_Internal { + public: +}; + +ConnMgmtRequest::ConnMgmtRequest() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.ConnMgmtRequest) +} +ConnMgmtRequest::ConnMgmtRequest(const ConnMgmtRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr), + multiaddrs_(from.multiaddrs_), + peerids_(from.peerids_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + requesttype_ = from.requesttype_; + // @@protoc_insertion_point(copy_constructor:pb.ConnMgmtRequest) +} + +void ConnMgmtRequest::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ConnMgmtRequest_node_2eproto.base); + requesttype_ = 0; +} + +ConnMgmtRequest::~ConnMgmtRequest() { + // @@protoc_insertion_point(destructor:pb.ConnMgmtRequest) + SharedDtor(); +} + +void ConnMgmtRequest::SharedDtor() { +} + +void ConnMgmtRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ConnMgmtRequest& ConnMgmtRequest::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ConnMgmtRequest_node_2eproto.base); + return *internal_default_instance(); +} + + +void ConnMgmtRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.ConnMgmtRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + multiaddrs_.Clear(); + peerids_.Clear(); + requesttype_ = 0; + _internal_metadata_.Clear(); +} + +const char* ConnMgmtRequest::_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) { + // .pb.CONNMGMTREQTYPE requestType = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + _internal_set_requesttype(static_cast<::pb::CONNMGMTREQTYPE>(val)); + } else goto handle_unusual; + continue; + // repeated string multiAddrs = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_multiaddrs(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.ConnMgmtRequest.multiAddrs")); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else goto handle_unusual; + continue; + // repeated string peerIDs = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_peerids(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.ConnMgmtRequest.peerIDs")); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* ConnMgmtRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.ConnMgmtRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .pb.CONNMGMTREQTYPE requestType = 1; + if (this->requesttype() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_requesttype(), target); + } + + // repeated string multiAddrs = 2; + for (int i = 0, n = this->_internal_multiaddrs_size(); i < n; i++) { + const auto& s = this->_internal_multiaddrs(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.ConnMgmtRequest.multiAddrs"); + target = stream->WriteString(2, s, target); + } + + // repeated string peerIDs = 3; + for (int i = 0, n = this->_internal_peerids_size(); i < n; i++) { + const auto& s = this->_internal_peerids(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.ConnMgmtRequest.peerIDs"); + target = stream->WriteString(3, s, target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.ConnMgmtRequest) + return target; +} + +size_t ConnMgmtRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.ConnMgmtRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string multiAddrs = 2; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(multiaddrs_.size()); + for (int i = 0, n = multiaddrs_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + multiaddrs_.Get(i)); + } + + // repeated string peerIDs = 3; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(peerids_.size()); + for (int i = 0, n = peerids_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + peerids_.Get(i)); + } + + // .pb.CONNMGMTREQTYPE requestType = 1; + if (this->requesttype() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_requesttype()); + } + + 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 ConnMgmtRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.ConnMgmtRequest) + GOOGLE_DCHECK_NE(&from, this); + const ConnMgmtRequest* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.ConnMgmtRequest) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.ConnMgmtRequest) + MergeFrom(*source); + } +} + +void ConnMgmtRequest::MergeFrom(const ConnMgmtRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.ConnMgmtRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + multiaddrs_.MergeFrom(from.multiaddrs_); + peerids_.MergeFrom(from.peerids_); + if (from.requesttype() != 0) { + _internal_set_requesttype(from._internal_requesttype()); + } +} + +void ConnMgmtRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.ConnMgmtRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ConnMgmtRequest::CopyFrom(const ConnMgmtRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.ConnMgmtRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ConnMgmtRequest::IsInitialized() const { + return true; +} + +void ConnMgmtRequest::InternalSwap(ConnMgmtRequest* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + multiaddrs_.InternalSwap(&other->multiaddrs_); + peerids_.InternalSwap(&other->peerids_); + swap(requesttype_, other->requesttype_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ConnMgmtRequest::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +ConnMgmtResponse_ConnectedEntry_DoNotUse::ConnMgmtResponse_ConnectedEntry_DoNotUse() {} +ConnMgmtResponse_ConnectedEntry_DoNotUse::ConnMgmtResponse_ConnectedEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void ConnMgmtResponse_ConnectedEntry_DoNotUse::MergeFrom(const ConnMgmtResponse_ConnectedEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata ConnMgmtResponse_ConnectedEntry_DoNotUse::GetMetadata() const { + return GetMetadataStatic(); +} +void ConnMgmtResponse_ConnectedEntry_DoNotUse::MergeFrom( + const ::PROTOBUF_NAMESPACE_ID::Message& other) { + ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); +} + + +// =================================================================== + +ConnMgmtResponse_StatusEntry_DoNotUse::ConnMgmtResponse_StatusEntry_DoNotUse() {} +ConnMgmtResponse_StatusEntry_DoNotUse::ConnMgmtResponse_StatusEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void ConnMgmtResponse_StatusEntry_DoNotUse::MergeFrom(const ConnMgmtResponse_StatusEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata ConnMgmtResponse_StatusEntry_DoNotUse::GetMetadata() const { + return GetMetadataStatic(); +} +void ConnMgmtResponse_StatusEntry_DoNotUse::MergeFrom( + const ::PROTOBUF_NAMESPACE_ID::Message& other) { + ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); +} + + +// =================================================================== + +void ConnMgmtResponse::InitAsDefaultInstance() { +} +class ConnMgmtResponse::_Internal { + public: +}; + +ConnMgmtResponse::ConnMgmtResponse() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.ConnMgmtResponse) +} +ConnMgmtResponse::ConnMgmtResponse(const ConnMgmtResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr), + peerids_(from.peerids_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + connected_.MergeFrom(from.connected_); + status_.MergeFrom(from.status_); + requesttype_ = from.requesttype_; + // @@protoc_insertion_point(copy_constructor:pb.ConnMgmtResponse) +} + +void ConnMgmtResponse::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ConnMgmtResponse_node_2eproto.base); + requesttype_ = 0; +} + +ConnMgmtResponse::~ConnMgmtResponse() { + // @@protoc_insertion_point(destructor:pb.ConnMgmtResponse) + SharedDtor(); +} + +void ConnMgmtResponse::SharedDtor() { +} + +void ConnMgmtResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ConnMgmtResponse& ConnMgmtResponse::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ConnMgmtResponse_node_2eproto.base); + return *internal_default_instance(); +} + + +void ConnMgmtResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.ConnMgmtResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + connected_.Clear(); + status_.Clear(); + peerids_.Clear(); + requesttype_ = 0; + _internal_metadata_.Clear(); +} + +const char* ConnMgmtResponse::_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) { + // .pb.CONNMGMTREQTYPE requestType = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + _internal_set_requesttype(static_cast<::pb::CONNMGMTREQTYPE>(val)); + } else goto handle_unusual; + continue; + // map connected = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&connected_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else goto handle_unusual; + continue; + // map status = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&status_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else goto handle_unusual; + continue; + // repeated string peerIDs = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_peerids(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.ConnMgmtResponse.peerIDs")); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* ConnMgmtResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.ConnMgmtResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .pb.CONNMGMTREQTYPE requestType = 1; + if (this->requesttype() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_requesttype(), target); + } + + // map connected = 2; + if (!this->_internal_connected().empty()) { + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), static_cast(p->first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.ConnMgmtResponse.ConnectedEntry.key"); + } + }; + + if (stream->IsSerializationDeterministic() && + this->_internal_connected().size() > 1) { + ::std::unique_ptr items( + new SortItem[this->_internal_connected().size()]); + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >::size_type size_type; + size_type n = 0; + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >::const_iterator + it = this->_internal_connected().begin(); + it != this->_internal_connected().end(); ++it, ++n) { + items[static_cast(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast(n)], Less()); + for (size_type i = 0; i < n; i++) { + target = ConnMgmtResponse_ConnectedEntry_DoNotUse::Funcs::InternalSerialize(2, items[static_cast(i)]->first, items[static_cast(i)]->second, target, stream); + Utf8Check::Check(&(*items[static_cast(i)])); + } + } else { + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >::const_iterator + it = this->_internal_connected().begin(); + it != this->_internal_connected().end(); ++it) { + target = ConnMgmtResponse_ConnectedEntry_DoNotUse::Funcs::InternalSerialize(2, it->first, it->second, target, stream); + Utf8Check::Check(&(*it)); + } + } + } + + // map status = 3; + if (!this->_internal_status().empty()) { + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::pb::ConnMgmtStatus >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), static_cast(p->first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.ConnMgmtResponse.StatusEntry.key"); + } + }; + + if (stream->IsSerializationDeterministic() && + this->_internal_status().size() > 1) { + ::std::unique_ptr items( + new SortItem[this->_internal_status().size()]); + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::pb::ConnMgmtStatus >::size_type size_type; + size_type n = 0; + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::pb::ConnMgmtStatus >::const_iterator + it = this->_internal_status().begin(); + it != this->_internal_status().end(); ++it, ++n) { + items[static_cast(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast(n)], Less()); + for (size_type i = 0; i < n; i++) { + target = ConnMgmtResponse_StatusEntry_DoNotUse::Funcs::InternalSerialize(3, items[static_cast(i)]->first, items[static_cast(i)]->second, target, stream); + Utf8Check::Check(&(*items[static_cast(i)])); + } + } else { + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::pb::ConnMgmtStatus >::const_iterator + it = this->_internal_status().begin(); + it != this->_internal_status().end(); ++it) { + target = ConnMgmtResponse_StatusEntry_DoNotUse::Funcs::InternalSerialize(3, it->first, it->second, target, stream); + Utf8Check::Check(&(*it)); + } + } + } + + // repeated string peerIDs = 4; + for (int i = 0, n = this->_internal_peerids_size(); i < n; i++) { + const auto& s = this->_internal_peerids(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.ConnMgmtResponse.peerIDs"); + target = stream->WriteString(4, s, target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.ConnMgmtResponse) + return target; +} + +size_t ConnMgmtResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.ConnMgmtResponse) + 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; + + // map connected = 2; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_connected_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >::const_iterator + it = this->_internal_connected().begin(); + it != this->_internal_connected().end(); ++it) { + total_size += ConnMgmtResponse_ConnectedEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + // map status = 3; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_status_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::pb::ConnMgmtStatus >::const_iterator + it = this->_internal_status().begin(); + it != this->_internal_status().end(); ++it) { + total_size += ConnMgmtResponse_StatusEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + // repeated string peerIDs = 4; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(peerids_.size()); + for (int i = 0, n = peerids_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + peerids_.Get(i)); + } + + // .pb.CONNMGMTREQTYPE requestType = 1; + if (this->requesttype() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_requesttype()); + } + + 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 ConnMgmtResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.ConnMgmtResponse) + GOOGLE_DCHECK_NE(&from, this); + const ConnMgmtResponse* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.ConnMgmtResponse) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.ConnMgmtResponse) + MergeFrom(*source); + } +} + +void ConnMgmtResponse::MergeFrom(const ConnMgmtResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.ConnMgmtResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + connected_.MergeFrom(from.connected_); + status_.MergeFrom(from.status_); + peerids_.MergeFrom(from.peerids_); + if (from.requesttype() != 0) { + _internal_set_requesttype(from._internal_requesttype()); + } +} + +void ConnMgmtResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.ConnMgmtResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ConnMgmtResponse::CopyFrom(const ConnMgmtResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.ConnMgmtResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ConnMgmtResponse::IsInitialized() const { + return true; +} + +void ConnMgmtResponse::InternalSwap(ConnMgmtResponse* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + connected_.Swap(&other->connected_); + status_.Swap(&other->status_); + peerids_.InternalSwap(&other->peerids_); + swap(requesttype_, other->requesttype_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ConnMgmtResponse::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void ConnMgmtStatus::InitAsDefaultInstance() { +} +class ConnMgmtStatus::_Internal { + public: +}; + +ConnMgmtStatus::ConnMgmtStatus() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.ConnMgmtStatus) +} +ConnMgmtStatus::ConnMgmtStatus(const ConnMgmtStatus& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + reason_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_reason().empty()) { + reason_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.reason_); + } + disconnected_ = from.disconnected_; + // @@protoc_insertion_point(copy_constructor:pb.ConnMgmtStatus) +} + +void ConnMgmtStatus::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ConnMgmtStatus_node_2eproto.base); + reason_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + disconnected_ = false; +} + +ConnMgmtStatus::~ConnMgmtStatus() { + // @@protoc_insertion_point(destructor:pb.ConnMgmtStatus) + SharedDtor(); +} + +void ConnMgmtStatus::SharedDtor() { + reason_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void ConnMgmtStatus::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ConnMgmtStatus& ConnMgmtStatus::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ConnMgmtStatus_node_2eproto.base); + return *internal_default_instance(); +} + + +void ConnMgmtStatus::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.ConnMgmtStatus) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + reason_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + disconnected_ = false; + _internal_metadata_.Clear(); +} + +const char* ConnMgmtStatus::_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) { + // bool disconnected = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + disconnected_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string reason = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_reason(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.ConnMgmtStatus.reason")); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* ConnMgmtStatus::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.ConnMgmtStatus) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bool disconnected = 1; + if (this->disconnected() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_disconnected(), target); + } + + // string reason = 2; + if (this->reason().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_reason().data(), static_cast(this->_internal_reason().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.ConnMgmtStatus.reason"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_reason(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.ConnMgmtStatus) + return target; +} + +size_t ConnMgmtStatus::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.ConnMgmtStatus) + 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 reason = 2; + if (this->reason().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_reason()); + } + + // bool disconnected = 1; + if (this->disconnected() != 0) { + total_size += 1 + 1; + } + + 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 ConnMgmtStatus::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.ConnMgmtStatus) + GOOGLE_DCHECK_NE(&from, this); + const ConnMgmtStatus* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.ConnMgmtStatus) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.ConnMgmtStatus) + MergeFrom(*source); + } +} + +void ConnMgmtStatus::MergeFrom(const ConnMgmtStatus& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.ConnMgmtStatus) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.reason().size() > 0) { + + reason_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.reason_); + } + if (from.disconnected() != 0) { + _internal_set_disconnected(from._internal_disconnected()); + } +} + +void ConnMgmtStatus::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.ConnMgmtStatus) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ConnMgmtStatus::CopyFrom(const ConnMgmtStatus& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.ConnMgmtStatus) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ConnMgmtStatus::IsInitialized() const { + return true; +} + +void ConnMgmtStatus::InternalSwap(ConnMgmtStatus* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + reason_.Swap(&other->reason_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(disconnected_, other->disconnected_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ConnMgmtStatus::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void ExtrasRequest::InitAsDefaultInstance() { +} +class ExtrasRequest::_Internal { + public: +}; + +ExtrasRequest::ExtrasRequest() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.ExtrasRequest) +} +ExtrasRequest::ExtrasRequest(const ExtrasRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&requesttype_, &from.requesttype_, + static_cast(reinterpret_cast(&extrasfeature_) - + reinterpret_cast(&requesttype_)) + sizeof(extrasfeature_)); + // @@protoc_insertion_point(copy_constructor:pb.ExtrasRequest) +} + +void ExtrasRequest::SharedCtor() { + ::memset(&requesttype_, 0, static_cast( + reinterpret_cast(&extrasfeature_) - + reinterpret_cast(&requesttype_)) + sizeof(extrasfeature_)); +} + +ExtrasRequest::~ExtrasRequest() { + // @@protoc_insertion_point(destructor:pb.ExtrasRequest) + SharedDtor(); +} + +void ExtrasRequest::SharedDtor() { +} + +void ExtrasRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ExtrasRequest& ExtrasRequest::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ExtrasRequest_node_2eproto.base); + return *internal_default_instance(); +} + + +void ExtrasRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.ExtrasRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&requesttype_, 0, static_cast( + reinterpret_cast(&extrasfeature_) - + reinterpret_cast(&requesttype_)) + sizeof(extrasfeature_)); + _internal_metadata_.Clear(); +} + +const char* ExtrasRequest::_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) { + // .pb.EXTRASREQTYPE requestType = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + _internal_set_requesttype(static_cast<::pb::EXTRASREQTYPE>(val)); + } else goto handle_unusual; + continue; + // .pb.EXTRASTYPE extrasFeature = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + _internal_set_extrasfeature(static_cast<::pb::EXTRASTYPE>(val)); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* ExtrasRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.ExtrasRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .pb.EXTRASREQTYPE requestType = 1; + if (this->requesttype() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_requesttype(), target); + } + + // .pb.EXTRASTYPE extrasFeature = 2; + if (this->extrasfeature() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 2, this->_internal_extrasfeature(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.ExtrasRequest) + return target; +} + +size_t ExtrasRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.ExtrasRequest) + 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; + + // .pb.EXTRASREQTYPE requestType = 1; + if (this->requesttype() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_requesttype()); + } + + // .pb.EXTRASTYPE extrasFeature = 2; + if (this->extrasfeature() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_extrasfeature()); + } + + 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 ExtrasRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.ExtrasRequest) + GOOGLE_DCHECK_NE(&from, this); + const ExtrasRequest* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.ExtrasRequest) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.ExtrasRequest) + MergeFrom(*source); + } +} + +void ExtrasRequest::MergeFrom(const ExtrasRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.ExtrasRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.requesttype() != 0) { + _internal_set_requesttype(from._internal_requesttype()); + } + if (from.extrasfeature() != 0) { + _internal_set_extrasfeature(from._internal_extrasfeature()); + } +} + +void ExtrasRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.ExtrasRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ExtrasRequest::CopyFrom(const ExtrasRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.ExtrasRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ExtrasRequest::IsInitialized() const { + return true; +} + +void ExtrasRequest::InternalSwap(ExtrasRequest* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(requesttype_, other->requesttype_); + swap(extrasfeature_, other->extrasfeature_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ExtrasRequest::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void BlockstoreRequest::InitAsDefaultInstance() { +} +class BlockstoreRequest::_Internal { + public: +}; + +BlockstoreRequest::BlockstoreRequest() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.BlockstoreRequest) +} +BlockstoreRequest::BlockstoreRequest(const BlockstoreRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr), + reqopts_(from.reqopts_), + cids_(from.cids_), + data_(from.data_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + cidversion_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_cidversion().empty()) { + cidversion_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.cidversion_); + } + hashfunc_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_hashfunc().empty()) { + hashfunc_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.hashfunc_); + } + requesttype_ = from.requesttype_; + // @@protoc_insertion_point(copy_constructor:pb.BlockstoreRequest) +} + +void BlockstoreRequest::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_BlockstoreRequest_node_2eproto.base); + cidversion_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + hashfunc_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + requesttype_ = 0; +} + +BlockstoreRequest::~BlockstoreRequest() { + // @@protoc_insertion_point(destructor:pb.BlockstoreRequest) + SharedDtor(); +} + +void BlockstoreRequest::SharedDtor() { + cidversion_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + hashfunc_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void BlockstoreRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const BlockstoreRequest& BlockstoreRequest::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_BlockstoreRequest_node_2eproto.base); + return *internal_default_instance(); +} + + +void BlockstoreRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.BlockstoreRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + reqopts_.Clear(); + cids_.Clear(); + data_.Clear(); + cidversion_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + hashfunc_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + requesttype_ = 0; + _internal_metadata_.Clear(); +} + +const char* BlockstoreRequest::_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) { + // .pb.BSREQTYPE requestType = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + _internal_set_requesttype(static_cast<::pb::BSREQTYPE>(val)); + } else goto handle_unusual; + continue; + // repeated .pb.BSREQOPTS reqOpts = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_reqopts(), ptr, ctx); + CHK_(ptr); + } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + _internal_add_reqopts(static_cast<::pb::BSREQOPTS>(val)); + } else goto handle_unusual; + continue; + // repeated string cids = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_cids(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.BlockstoreRequest.cids")); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else goto handle_unusual; + continue; + // repeated bytes data = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_data(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); + } else goto handle_unusual; + continue; + // string cidVersion = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + auto str = _internal_mutable_cidversion(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.BlockstoreRequest.cidVersion")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string hashFunc = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { + auto str = _internal_mutable_hashfunc(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.BlockstoreRequest.hashFunc")); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* BlockstoreRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.BlockstoreRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .pb.BSREQTYPE requestType = 1; + if (this->requesttype() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_requesttype(), target); + } + + // repeated .pb.BSREQOPTS reqOpts = 2; + { + int byte_size = _reqopts_cached_byte_size_.load(std::memory_order_relaxed); + if (byte_size > 0) { + target = stream->WriteEnumPacked( + 2, reqopts_, byte_size, target); + } + } + + // repeated string cids = 3; + for (int i = 0, n = this->_internal_cids_size(); i < n; i++) { + const auto& s = this->_internal_cids(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.BlockstoreRequest.cids"); + target = stream->WriteString(3, s, target); + } + + // repeated bytes data = 4; + for (int i = 0, n = this->_internal_data_size(); i < n; i++) { + const auto& s = this->_internal_data(i); + target = stream->WriteBytes(4, s, target); + } + + // string cidVersion = 5; + if (this->cidversion().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_cidversion().data(), static_cast(this->_internal_cidversion().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.BlockstoreRequest.cidVersion"); + target = stream->WriteStringMaybeAliased( + 5, this->_internal_cidversion(), target); + } + + // string hashFunc = 7; + if (this->hashfunc().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_hashfunc().data(), static_cast(this->_internal_hashfunc().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.BlockstoreRequest.hashFunc"); + target = stream->WriteStringMaybeAliased( + 7, this->_internal_hashfunc(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.BlockstoreRequest) + return target; +} + +size_t BlockstoreRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.BlockstoreRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .pb.BSREQOPTS reqOpts = 2; + { + size_t data_size = 0; + unsigned int count = static_cast(this->_internal_reqopts_size());for (unsigned int i = 0; i < count; i++) { + data_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize( + this->_internal_reqopts(static_cast(i))); + } + if (data_size > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); + _reqopts_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + // repeated string cids = 3; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(cids_.size()); + for (int i = 0, n = cids_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + cids_.Get(i)); + } + + // repeated bytes data = 4; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(data_.size()); + for (int i = 0, n = data_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + data_.Get(i)); + } + + // string cidVersion = 5; + if (this->cidversion().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_cidversion()); + } + + // string hashFunc = 7; + if (this->hashfunc().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_hashfunc()); + } + + // .pb.BSREQTYPE requestType = 1; + if (this->requesttype() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_requesttype()); + } + + 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 BlockstoreRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.BlockstoreRequest) + GOOGLE_DCHECK_NE(&from, this); + const BlockstoreRequest* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.BlockstoreRequest) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.BlockstoreRequest) + MergeFrom(*source); + } +} + +void BlockstoreRequest::MergeFrom(const BlockstoreRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.BlockstoreRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + reqopts_.MergeFrom(from.reqopts_); + cids_.MergeFrom(from.cids_); + data_.MergeFrom(from.data_); + if (from.cidversion().size() > 0) { + + cidversion_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.cidversion_); + } + if (from.hashfunc().size() > 0) { + + hashfunc_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.hashfunc_); + } + if (from.requesttype() != 0) { + _internal_set_requesttype(from._internal_requesttype()); + } +} + +void BlockstoreRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.BlockstoreRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void BlockstoreRequest::CopyFrom(const BlockstoreRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.BlockstoreRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BlockstoreRequest::IsInitialized() const { + return true; +} + +void BlockstoreRequest::InternalSwap(BlockstoreRequest* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + reqopts_.InternalSwap(&other->reqopts_); + cids_.InternalSwap(&other->cids_); + data_.InternalSwap(&other->data_); + cidversion_.Swap(&other->cidversion_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + hashfunc_.Swap(&other->hashfunc_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(requesttype_, other->requesttype_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata BlockstoreRequest::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void BlockstoreResponse::InitAsDefaultInstance() { +} +class BlockstoreResponse::_Internal { + public: +}; + +BlockstoreResponse::BlockstoreResponse() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.BlockstoreResponse) +} +BlockstoreResponse::BlockstoreResponse(const BlockstoreResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr), + blocks_(from.blocks_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + requesttype_ = from.requesttype_; + // @@protoc_insertion_point(copy_constructor:pb.BlockstoreResponse) +} + +void BlockstoreResponse::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_BlockstoreResponse_node_2eproto.base); + requesttype_ = 0; +} + +BlockstoreResponse::~BlockstoreResponse() { + // @@protoc_insertion_point(destructor:pb.BlockstoreResponse) + SharedDtor(); +} + +void BlockstoreResponse::SharedDtor() { +} + +void BlockstoreResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const BlockstoreResponse& BlockstoreResponse::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_BlockstoreResponse_node_2eproto.base); + return *internal_default_instance(); +} + + +void BlockstoreResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.BlockstoreResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + blocks_.Clear(); + requesttype_ = 0; + _internal_metadata_.Clear(); +} + +const char* BlockstoreResponse::_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) { + // .pb.BSREQTYPE requestType = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + _internal_set_requesttype(static_cast<::pb::BSREQTYPE>(val)); + } else goto handle_unusual; + continue; + // repeated .pb.Block blocks = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_blocks(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* BlockstoreResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.BlockstoreResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .pb.BSREQTYPE requestType = 1; + if (this->requesttype() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_requesttype(), target); + } + + // repeated .pb.Block blocks = 2; + for (unsigned int i = 0, + n = static_cast(this->_internal_blocks_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, this->_internal_blocks(i), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.BlockstoreResponse) + return target; +} + +size_t BlockstoreResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.BlockstoreResponse) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .pb.Block blocks = 2; + total_size += 1UL * this->_internal_blocks_size(); + for (const auto& msg : this->blocks_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // .pb.BSREQTYPE requestType = 1; + if (this->requesttype() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_requesttype()); + } + + 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 BlockstoreResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.BlockstoreResponse) + GOOGLE_DCHECK_NE(&from, this); + const BlockstoreResponse* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.BlockstoreResponse) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.BlockstoreResponse) + MergeFrom(*source); + } +} + +void BlockstoreResponse::MergeFrom(const BlockstoreResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.BlockstoreResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + blocks_.MergeFrom(from.blocks_); + if (from.requesttype() != 0) { + _internal_set_requesttype(from._internal_requesttype()); + } +} + +void BlockstoreResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.BlockstoreResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void BlockstoreResponse::CopyFrom(const BlockstoreResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.BlockstoreResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BlockstoreResponse::IsInitialized() const { + return true; +} + +void BlockstoreResponse::InternalSwap(BlockstoreResponse* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + blocks_.InternalSwap(&other->blocks_); + swap(requesttype_, other->requesttype_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata BlockstoreResponse::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void Block::InitAsDefaultInstance() { +} +class Block::_Internal { + public: +}; + +Block::Block() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.Block) +} +Block::Block(const Block& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + cid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_cid().empty()) { + cid_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.cid_); + } + data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_data().empty()) { + data_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.data_); + } + // @@protoc_insertion_point(copy_constructor:pb.Block) +} + +void Block::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Block_node_2eproto.base); + cid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +Block::~Block() { + // @@protoc_insertion_point(destructor:pb.Block) + SharedDtor(); +} + +void Block::SharedDtor() { + cid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void Block::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Block& Block::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Block_node_2eproto.base); + return *internal_default_instance(); +} + + +void Block::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.Block) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cid_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + data_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + _internal_metadata_.Clear(); +} + +const char* Block::_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 cid = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_cid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.Block.cid")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bytes data = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_data(); + 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_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Block::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.Block) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string cid = 1; + if (this->cid().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_cid().data(), static_cast(this->_internal_cid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.Block.cid"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_cid(), target); + } + + // bytes data = 2; + if (this->data().size() > 0) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_data(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.Block) + return target; +} + +size_t Block::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.Block) + 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 cid = 1; + if (this->cid().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_cid()); + } + + // bytes data = 2; + if (this->data().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_data()); + } + + 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 Block::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.Block) + GOOGLE_DCHECK_NE(&from, this); + const Block* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.Block) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.Block) + MergeFrom(*source); + } +} + +void Block::MergeFrom(const Block& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.Block) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.cid().size() > 0) { + + cid_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.cid_); + } + if (from.data().size() > 0) { + + data_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.data_); + } +} + +void Block::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.Block) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Block::CopyFrom(const Block& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.Block) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Block::IsInitialized() const { + return true; +} + +void Block::InternalSwap(Block* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + cid_.Swap(&other->cid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + data_.Swap(&other->data_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Block::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +DagRequest_LinksEntry_DoNotUse::DagRequest_LinksEntry_DoNotUse() {} +DagRequest_LinksEntry_DoNotUse::DagRequest_LinksEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void DagRequest_LinksEntry_DoNotUse::MergeFrom(const DagRequest_LinksEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata DagRequest_LinksEntry_DoNotUse::GetMetadata() const { + return GetMetadataStatic(); +} +void DagRequest_LinksEntry_DoNotUse::MergeFrom( + const ::PROTOBUF_NAMESPACE_ID::Message& other) { + ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); +} + + +// =================================================================== + +void DagRequest::InitAsDefaultInstance() { +} +class DagRequest::_Internal { + public: +}; + +DagRequest::DagRequest() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.DagRequest) +} +DagRequest::DagRequest(const DagRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + links_.MergeFrom(from.links_); + data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_data().empty()) { + data_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.data_); + } + objectencoding_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_objectencoding().empty()) { + objectencoding_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.objectencoding_); + } + serializationformat_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_serializationformat().empty()) { + serializationformat_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.serializationformat_); + } + hashfunc_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_hashfunc().empty()) { + hashfunc_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.hashfunc_); + } + hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_hash().empty()) { + hash_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.hash_); + } + ::memcpy(&cidversion_, &from.cidversion_, + static_cast(reinterpret_cast(&requesttype_) - + reinterpret_cast(&cidversion_)) + sizeof(requesttype_)); + // @@protoc_insertion_point(copy_constructor:pb.DagRequest) +} + +void DagRequest::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DagRequest_node_2eproto.base); + data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + objectencoding_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + serializationformat_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + hashfunc_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&cidversion_, 0, static_cast( + reinterpret_cast(&requesttype_) - + reinterpret_cast(&cidversion_)) + sizeof(requesttype_)); +} + +DagRequest::~DagRequest() { + // @@protoc_insertion_point(destructor:pb.DagRequest) + SharedDtor(); +} + +void DagRequest::SharedDtor() { + data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + objectencoding_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + serializationformat_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + hashfunc_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + hash_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void DagRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const DagRequest& DagRequest::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DagRequest_node_2eproto.base); + return *internal_default_instance(); +} + + +void DagRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.DagRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + links_.Clear(); + data_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + objectencoding_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + serializationformat_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + hashfunc_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + hash_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&cidversion_, 0, static_cast( + reinterpret_cast(&requesttype_) - + reinterpret_cast(&cidversion_)) + sizeof(requesttype_)); + _internal_metadata_.Clear(); +} + +const char* DagRequest::_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) { + // .pb.DAGREQTYPE requestType = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + _internal_set_requesttype(static_cast<::pb::DAGREQTYPE>(val)); + } else goto handle_unusual; + continue; + // bytes data = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_data(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string objectEncoding = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + auto str = _internal_mutable_objectencoding(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.DagRequest.objectEncoding")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string serializationFormat = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + auto str = _internal_mutable_serializationformat(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.DagRequest.serializationFormat")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string hashFunc = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + auto str = _internal_mutable_hashfunc(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.DagRequest.hashFunc")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // int64 cidVersion = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { + cidversion_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string hash = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { + auto str = _internal_mutable_hash(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.DagRequest.hash")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // map links = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&links_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr)); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* DagRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.DagRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .pb.DAGREQTYPE requestType = 1; + if (this->requesttype() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_requesttype(), target); + } + + // bytes data = 2; + if (this->data().size() > 0) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_data(), target); + } + + // string objectEncoding = 3; + if (this->objectencoding().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_objectencoding().data(), static_cast(this->_internal_objectencoding().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.DagRequest.objectEncoding"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_objectencoding(), target); + } + + // string serializationFormat = 4; + if (this->serializationformat().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_serializationformat().data(), static_cast(this->_internal_serializationformat().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.DagRequest.serializationFormat"); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_serializationformat(), target); + } + + // string hashFunc = 5; + if (this->hashfunc().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_hashfunc().data(), static_cast(this->_internal_hashfunc().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.DagRequest.hashFunc"); + target = stream->WriteStringMaybeAliased( + 5, this->_internal_hashfunc(), target); + } + + // int64 cidVersion = 6; + if (this->cidversion() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(6, this->_internal_cidversion(), target); + } + + // string hash = 7; + if (this->hash().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_hash().data(), static_cast(this->_internal_hash().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.DagRequest.hash"); + target = stream->WriteStringMaybeAliased( + 7, this->_internal_hash(), target); + } + + // map links = 8; + if (!this->_internal_links().empty()) { + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), static_cast(p->first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.DagRequest.LinksEntry.key"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->second.data(), static_cast(p->second.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.DagRequest.LinksEntry.value"); + } + }; + + if (stream->IsSerializationDeterministic() && + this->_internal_links().size() > 1) { + ::std::unique_ptr items( + new SortItem[this->_internal_links().size()]); + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::size_type size_type; + size_type n = 0; + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->_internal_links().begin(); + it != this->_internal_links().end(); ++it, ++n) { + items[static_cast(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast(n)], Less()); + for (size_type i = 0; i < n; i++) { + target = DagRequest_LinksEntry_DoNotUse::Funcs::InternalSerialize(8, items[static_cast(i)]->first, items[static_cast(i)]->second, target, stream); + Utf8Check::Check(&(*items[static_cast(i)])); + } + } else { + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->_internal_links().begin(); + it != this->_internal_links().end(); ++it) { + target = DagRequest_LinksEntry_DoNotUse::Funcs::InternalSerialize(8, it->first, it->second, target, stream); + Utf8Check::Check(&(*it)); + } + } + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.DagRequest) + return target; +} + +size_t DagRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.DagRequest) + 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; + + // map links = 8; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_links_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->_internal_links().begin(); + it != this->_internal_links().end(); ++it) { + total_size += DagRequest_LinksEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + // bytes data = 2; + if (this->data().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_data()); + } + + // string objectEncoding = 3; + if (this->objectencoding().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_objectencoding()); + } + + // string serializationFormat = 4; + if (this->serializationformat().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_serializationformat()); + } + + // string hashFunc = 5; + if (this->hashfunc().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_hashfunc()); + } + + // string hash = 7; + if (this->hash().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_hash()); + } + + // int64 cidVersion = 6; + if (this->cidversion() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( + this->_internal_cidversion()); + } + + // .pb.DAGREQTYPE requestType = 1; + if (this->requesttype() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_requesttype()); + } + + 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 DagRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.DagRequest) + GOOGLE_DCHECK_NE(&from, this); + const DagRequest* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.DagRequest) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.DagRequest) + MergeFrom(*source); + } +} + +void DagRequest::MergeFrom(const DagRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.DagRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + links_.MergeFrom(from.links_); + if (from.data().size() > 0) { + + data_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.data_); + } + if (from.objectencoding().size() > 0) { + + objectencoding_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.objectencoding_); + } + if (from.serializationformat().size() > 0) { + + serializationformat_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.serializationformat_); + } + if (from.hashfunc().size() > 0) { + + hashfunc_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.hashfunc_); + } + if (from.hash().size() > 0) { + + hash_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.hash_); + } + if (from.cidversion() != 0) { + _internal_set_cidversion(from._internal_cidversion()); + } + if (from.requesttype() != 0) { + _internal_set_requesttype(from._internal_requesttype()); + } +} + +void DagRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.DagRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void DagRequest::CopyFrom(const DagRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.DagRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool DagRequest::IsInitialized() const { + return true; +} + +void DagRequest::InternalSwap(DagRequest* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + links_.Swap(&other->links_); + data_.Swap(&other->data_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + objectencoding_.Swap(&other->objectencoding_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + serializationformat_.Swap(&other->serializationformat_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + hashfunc_.Swap(&other->hashfunc_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + hash_.Swap(&other->hash_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(cidversion_, other->cidversion_); + swap(requesttype_, other->requesttype_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata DagRequest::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void DagResponse::InitAsDefaultInstance() { +} +class DagResponse::_Internal { + public: +}; + +DagResponse::DagResponse() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.DagResponse) +} +DagResponse::DagResponse(const DagResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr), + hashes_(from.hashes_), + links_(from.links_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + rawdata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_rawdata().empty()) { + rawdata_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.rawdata_); + } + requesttype_ = from.requesttype_; + // @@protoc_insertion_point(copy_constructor:pb.DagResponse) +} + +void DagResponse::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DagResponse_node_2eproto.base); + rawdata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + requesttype_ = 0; +} + +DagResponse::~DagResponse() { + // @@protoc_insertion_point(destructor:pb.DagResponse) + SharedDtor(); +} + +void DagResponse::SharedDtor() { + rawdata_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void DagResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const DagResponse& DagResponse::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DagResponse_node_2eproto.base); + return *internal_default_instance(); +} + + +void DagResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.DagResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + hashes_.Clear(); + links_.Clear(); + rawdata_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + requesttype_ = 0; + _internal_metadata_.Clear(); +} + +const char* DagResponse::_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) { + // .pb.DAGREQTYPE requestType = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + _internal_set_requesttype(static_cast<::pb::DAGREQTYPE>(val)); + } else goto handle_unusual; + continue; + // repeated string hashes = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_hashes(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.DagResponse.hashes")); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else goto handle_unusual; + continue; + // bytes rawData = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + auto str = _internal_mutable_rawdata(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else goto handle_unusual; + continue; + // repeated .pb.IPLDLink links = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_links(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* DagResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.DagResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .pb.DAGREQTYPE requestType = 1; + if (this->requesttype() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_requesttype(), target); + } + + // repeated string hashes = 2; + for (int i = 0, n = this->_internal_hashes_size(); i < n; i++) { + const auto& s = this->_internal_hashes(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.DagResponse.hashes"); + target = stream->WriteString(2, s, target); + } + + // bytes rawData = 3; + if (this->rawdata().size() > 0) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_rawdata(), target); + } + + // repeated .pb.IPLDLink links = 4; + for (unsigned int i = 0, + n = static_cast(this->_internal_links_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(4, this->_internal_links(i), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.DagResponse) + return target; +} + +size_t DagResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.DagResponse) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string hashes = 2; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(hashes_.size()); + for (int i = 0, n = hashes_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + hashes_.Get(i)); + } + + // repeated .pb.IPLDLink links = 4; + total_size += 1UL * this->_internal_links_size(); + for (const auto& msg : this->links_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // bytes rawData = 3; + if (this->rawdata().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_rawdata()); + } + + // .pb.DAGREQTYPE requestType = 1; + if (this->requesttype() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_requesttype()); + } + + 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 DagResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.DagResponse) + GOOGLE_DCHECK_NE(&from, this); + const DagResponse* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.DagResponse) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.DagResponse) + MergeFrom(*source); + } +} + +void DagResponse::MergeFrom(const DagResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.DagResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + hashes_.MergeFrom(from.hashes_); + links_.MergeFrom(from.links_); + if (from.rawdata().size() > 0) { + + rawdata_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.rawdata_); + } + if (from.requesttype() != 0) { + _internal_set_requesttype(from._internal_requesttype()); + } +} + +void DagResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.DagResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void DagResponse::CopyFrom(const DagResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.DagResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool DagResponse::IsInitialized() const { + return true; +} + +void DagResponse::InternalSwap(DagResponse* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + hashes_.InternalSwap(&other->hashes_); + links_.InternalSwap(&other->links_); + rawdata_.Swap(&other->rawdata_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(requesttype_, other->requesttype_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata DagResponse::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void IPLDLink::InitAsDefaultInstance() { +} +class IPLDLink::_Internal { + public: +}; + +IPLDLink::IPLDLink() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.IPLDLink) +} +IPLDLink::IPLDLink(const IPLDLink& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_hash().empty()) { + hash_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.hash_); + } + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_name().empty()) { + name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); + } + size_ = from.size_; + // @@protoc_insertion_point(copy_constructor:pb.IPLDLink) +} + +void IPLDLink::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_IPLDLink_node_2eproto.base); + hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + size_ = PROTOBUF_ULONGLONG(0); +} + +IPLDLink::~IPLDLink() { + // @@protoc_insertion_point(destructor:pb.IPLDLink) + SharedDtor(); +} + +void IPLDLink::SharedDtor() { + hash_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void IPLDLink::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const IPLDLink& IPLDLink::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_IPLDLink_node_2eproto.base); + return *internal_default_instance(); +} + + +void IPLDLink::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.IPLDLink) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + hash_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + size_ = PROTOBUF_ULONGLONG(0); + _internal_metadata_.Clear(); +} + +const char* IPLDLink::_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) { + // bytes hash = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_hash(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string name = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.IPLDLink.name")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // uint64 size = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* IPLDLink::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.IPLDLink) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bytes hash = 1; + if (this->hash().size() > 0) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_hash(), target); + } + + // string name = 2; + if (this->name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.IPLDLink.name"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_name(), target); + } + + // uint64 size = 3; + if (this->size() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(3, this->_internal_size(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.IPLDLink) + return target; +} + +size_t IPLDLink::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.IPLDLink) + 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; + + // bytes hash = 1; + if (this->hash().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_hash()); + } + + // string name = 2; + if (this->name().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // uint64 size = 3; + if (this->size() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( + this->_internal_size()); + } + + 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 IPLDLink::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.IPLDLink) + GOOGLE_DCHECK_NE(&from, this); + const IPLDLink* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.IPLDLink) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.IPLDLink) + MergeFrom(*source); + } +} + +void IPLDLink::MergeFrom(const IPLDLink& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.IPLDLink) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.hash().size() > 0) { + + hash_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.hash_); + } + if (from.name().size() > 0) { + + name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); + } + if (from.size() != 0) { + _internal_set_size(from._internal_size()); + } +} + +void IPLDLink::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.IPLDLink) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void IPLDLink::CopyFrom(const IPLDLink& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.IPLDLink) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool IPLDLink::IsInitialized() const { + return true; +} + +void IPLDLink::InternalSwap(IPLDLink* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + hash_.Swap(&other->hash_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(size_, other->size_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata IPLDLink::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void IPLDNode::InitAsDefaultInstance() { +} +class IPLDNode::_Internal { + public: +}; + +IPLDNode::IPLDNode() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.IPLDNode) +} +IPLDNode::IPLDNode(const IPLDNode& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr), + links_(from.links_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_data().empty()) { + data_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.data_); + } + // @@protoc_insertion_point(copy_constructor:pb.IPLDNode) +} + +void IPLDNode::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_IPLDNode_node_2eproto.base); + data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +IPLDNode::~IPLDNode() { + // @@protoc_insertion_point(destructor:pb.IPLDNode) + SharedDtor(); +} + +void IPLDNode::SharedDtor() { + data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void IPLDNode::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const IPLDNode& IPLDNode::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_IPLDNode_node_2eproto.base); + return *internal_default_instance(); +} + + +void IPLDNode::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.IPLDNode) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + links_.Clear(); + data_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + _internal_metadata_.Clear(); +} + +const char* IPLDNode::_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) { + // bytes data = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_data(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else goto handle_unusual; + continue; + // repeated .pb.IPLDLink links = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_links(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* IPLDNode::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.IPLDNode) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bytes data = 1; + if (this->data().size() > 0) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_data(), target); + } + + // repeated .pb.IPLDLink links = 2; + for (unsigned int i = 0, + n = static_cast(this->_internal_links_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, this->_internal_links(i), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.IPLDNode) + return target; +} + +size_t IPLDNode::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.IPLDNode) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .pb.IPLDLink links = 2; + total_size += 1UL * this->_internal_links_size(); + for (const auto& msg : this->links_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // bytes data = 1; + if (this->data().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_data()); + } + + 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 IPLDNode::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.IPLDNode) + GOOGLE_DCHECK_NE(&from, this); + const IPLDNode* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.IPLDNode) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.IPLDNode) + MergeFrom(*source); + } +} + +void IPLDNode::MergeFrom(const IPLDNode& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.IPLDNode) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + links_.MergeFrom(from.links_); + if (from.data().size() > 0) { + + data_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.data_); + } +} + +void IPLDNode::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.IPLDNode) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void IPLDNode::CopyFrom(const IPLDNode& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.IPLDNode) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool IPLDNode::IsInitialized() const { + return true; +} + +void IPLDNode::InternalSwap(IPLDNode* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + links_.InternalSwap(&other->links_); + data_.Swap(&other->data_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} + +::PROTOBUF_NAMESPACE_ID::Metadata IPLDNode::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void KeystoreRequest::InitAsDefaultInstance() { +} +class KeystoreRequest::_Internal { + public: +}; + +KeystoreRequest::KeystoreRequest() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.KeystoreRequest) +} +KeystoreRequest::KeystoreRequest(const KeystoreRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_name().empty()) { + name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); + } + privatekey_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_privatekey().empty()) { + privatekey_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.privatekey_); + } + requesttype_ = from.requesttype_; + // @@protoc_insertion_point(copy_constructor:pb.KeystoreRequest) +} + +void KeystoreRequest::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_KeystoreRequest_node_2eproto.base); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + privatekey_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + requesttype_ = 0; +} + +KeystoreRequest::~KeystoreRequest() { + // @@protoc_insertion_point(destructor:pb.KeystoreRequest) + SharedDtor(); +} + +void KeystoreRequest::SharedDtor() { + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + privatekey_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void KeystoreRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const KeystoreRequest& KeystoreRequest::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_KeystoreRequest_node_2eproto.base); + return *internal_default_instance(); +} + + +void KeystoreRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.KeystoreRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + privatekey_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + requesttype_ = 0; + _internal_metadata_.Clear(); +} + +const char* KeystoreRequest::_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) { + // .pb.KSREQTYPE requestType = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + _internal_set_requesttype(static_cast<::pb::KSREQTYPE>(val)); + } else goto handle_unusual; + continue; + // string name = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.KeystoreRequest.name")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bytes privateKey = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + auto str = _internal_mutable_privatekey(); + 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_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* KeystoreRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.KeystoreRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .pb.KSREQTYPE requestType = 1; + if (this->requesttype() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_requesttype(), target); + } + + // string name = 2; + if (this->name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.KeystoreRequest.name"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_name(), target); + } + + // bytes privateKey = 3; + if (this->privatekey().size() > 0) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_privatekey(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.KeystoreRequest) + return target; +} + +size_t KeystoreRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.KeystoreRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string name = 2; + if (this->name().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // bytes privateKey = 3; + if (this->privatekey().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_privatekey()); + } + + // .pb.KSREQTYPE requestType = 1; + if (this->requesttype() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_requesttype()); + } + + 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 KeystoreRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.KeystoreRequest) + GOOGLE_DCHECK_NE(&from, this); + const KeystoreRequest* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.KeystoreRequest) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.KeystoreRequest) + MergeFrom(*source); + } +} + +void KeystoreRequest::MergeFrom(const KeystoreRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.KeystoreRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.name().size() > 0) { + + name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); + } + if (from.privatekey().size() > 0) { + + privatekey_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.privatekey_); + } + if (from.requesttype() != 0) { + _internal_set_requesttype(from._internal_requesttype()); + } +} + +void KeystoreRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.KeystoreRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void KeystoreRequest::CopyFrom(const KeystoreRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.KeystoreRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool KeystoreRequest::IsInitialized() const { + return true; +} + +void KeystoreRequest::InternalSwap(KeystoreRequest* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + privatekey_.Swap(&other->privatekey_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(requesttype_, other->requesttype_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata KeystoreRequest::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void KeystoreResponse::InitAsDefaultInstance() { +} +class KeystoreResponse::_Internal { + public: +}; + +KeystoreResponse::KeystoreResponse() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.KeystoreResponse) +} +KeystoreResponse::KeystoreResponse(const KeystoreResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr), + keynames_(from.keynames_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + privatekey_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_privatekey().empty()) { + privatekey_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.privatekey_); + } + ::memcpy(&requesttype_, &from.requesttype_, + static_cast(reinterpret_cast(&has_) - + reinterpret_cast(&requesttype_)) + sizeof(has_)); + // @@protoc_insertion_point(copy_constructor:pb.KeystoreResponse) +} + +void KeystoreResponse::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_KeystoreResponse_node_2eproto.base); + privatekey_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&requesttype_, 0, static_cast( + reinterpret_cast(&has_) - + reinterpret_cast(&requesttype_)) + sizeof(has_)); +} + +KeystoreResponse::~KeystoreResponse() { + // @@protoc_insertion_point(destructor:pb.KeystoreResponse) + SharedDtor(); +} + +void KeystoreResponse::SharedDtor() { + privatekey_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void KeystoreResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const KeystoreResponse& KeystoreResponse::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_KeystoreResponse_node_2eproto.base); + return *internal_default_instance(); +} + + +void KeystoreResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.KeystoreResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + keynames_.Clear(); + privatekey_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&requesttype_, 0, static_cast( + reinterpret_cast(&has_) - + reinterpret_cast(&requesttype_)) + sizeof(has_)); + _internal_metadata_.Clear(); +} + +const char* KeystoreResponse::_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) { + // .pb.KSREQTYPE requestType = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + _internal_set_requesttype(static_cast<::pb::KSREQTYPE>(val)); + } else goto handle_unusual; + continue; + // bytes privateKey = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_privatekey(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else goto handle_unusual; + continue; + // repeated string keyNames = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_keynames(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.KeystoreResponse.keyNames")); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else goto handle_unusual; + continue; + // bool has = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + has_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* KeystoreResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.KeystoreResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .pb.KSREQTYPE requestType = 1; + if (this->requesttype() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_requesttype(), target); + } + + // bytes privateKey = 2; + if (this->privatekey().size() > 0) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_privatekey(), target); + } + + // repeated string keyNames = 3; + for (int i = 0, n = this->_internal_keynames_size(); i < n; i++) { + const auto& s = this->_internal_keynames(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.KeystoreResponse.keyNames"); + target = stream->WriteString(3, s, target); + } + + // bool has = 4; + if (this->has() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_has(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.KeystoreResponse) + return target; +} + +size_t KeystoreResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.KeystoreResponse) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string keyNames = 3; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(keynames_.size()); + for (int i = 0, n = keynames_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + keynames_.Get(i)); + } + + // bytes privateKey = 2; + if (this->privatekey().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_privatekey()); + } + + // .pb.KSREQTYPE requestType = 1; + if (this->requesttype() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_requesttype()); + } + + // bool has = 4; + if (this->has() != 0) { + total_size += 1 + 1; + } + + 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 KeystoreResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.KeystoreResponse) + GOOGLE_DCHECK_NE(&from, this); + const KeystoreResponse* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.KeystoreResponse) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.KeystoreResponse) + MergeFrom(*source); + } +} + +void KeystoreResponse::MergeFrom(const KeystoreResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.KeystoreResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + keynames_.MergeFrom(from.keynames_); + if (from.privatekey().size() > 0) { + + privatekey_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.privatekey_); + } + if (from.requesttype() != 0) { + _internal_set_requesttype(from._internal_requesttype()); + } + if (from.has() != 0) { + _internal_set_has(from._internal_has()); + } +} + +void KeystoreResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.KeystoreResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void KeystoreResponse::CopyFrom(const KeystoreResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.KeystoreResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool KeystoreResponse::IsInitialized() const { + return true; +} + +void KeystoreResponse::InternalSwap(KeystoreResponse* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + keynames_.InternalSwap(&other->keynames_); + privatekey_.Swap(&other->privatekey_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(requesttype_, other->requesttype_); + swap(has_, other->has_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata KeystoreResponse::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void PersistRequest::InitAsDefaultInstance() { +} +class PersistRequest::_Internal { + public: +}; + +PersistRequest::PersistRequest() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.PersistRequest) +} +PersistRequest::PersistRequest(const PersistRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr), + cids_(from.cids_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:pb.PersistRequest) +} + +void PersistRequest::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_PersistRequest_node_2eproto.base); +} + +PersistRequest::~PersistRequest() { + // @@protoc_insertion_point(destructor:pb.PersistRequest) + SharedDtor(); +} + +void PersistRequest::SharedDtor() { +} + +void PersistRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const PersistRequest& PersistRequest::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_PersistRequest_node_2eproto.base); + return *internal_default_instance(); +} + + +void PersistRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.PersistRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cids_.Clear(); + _internal_metadata_.Clear(); +} + +const char* PersistRequest::_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) { + // repeated string cids = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_cids(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.PersistRequest.cids")); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* PersistRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.PersistRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // repeated string cids = 1; + for (int i = 0, n = this->_internal_cids_size(); i < n; i++) { + const auto& s = this->_internal_cids(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.PersistRequest.cids"); + target = stream->WriteString(1, s, target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.PersistRequest) + return target; +} + +size_t PersistRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.PersistRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string cids = 1; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(cids_.size()); + for (int i = 0, n = cids_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + cids_.Get(i)); + } + + 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 PersistRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.PersistRequest) + GOOGLE_DCHECK_NE(&from, this); + const PersistRequest* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.PersistRequest) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.PersistRequest) + MergeFrom(*source); + } +} + +void PersistRequest::MergeFrom(const PersistRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.PersistRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + cids_.MergeFrom(from.cids_); +} + +void PersistRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.PersistRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void PersistRequest::CopyFrom(const PersistRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.PersistRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool PersistRequest::IsInitialized() const { + return true; +} + +void PersistRequest::InternalSwap(PersistRequest* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + cids_.InternalSwap(&other->cids_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata PersistRequest::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +PersistResponse_StatusEntry_DoNotUse::PersistResponse_StatusEntry_DoNotUse() {} +PersistResponse_StatusEntry_DoNotUse::PersistResponse_StatusEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void PersistResponse_StatusEntry_DoNotUse::MergeFrom(const PersistResponse_StatusEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata PersistResponse_StatusEntry_DoNotUse::GetMetadata() const { + return GetMetadataStatic(); +} +void PersistResponse_StatusEntry_DoNotUse::MergeFrom( + const ::PROTOBUF_NAMESPACE_ID::Message& other) { + ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); +} + + +// =================================================================== + +PersistResponse_ErrorsEntry_DoNotUse::PersistResponse_ErrorsEntry_DoNotUse() {} +PersistResponse_ErrorsEntry_DoNotUse::PersistResponse_ErrorsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void PersistResponse_ErrorsEntry_DoNotUse::MergeFrom(const PersistResponse_ErrorsEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata PersistResponse_ErrorsEntry_DoNotUse::GetMetadata() const { + return GetMetadataStatic(); +} +void PersistResponse_ErrorsEntry_DoNotUse::MergeFrom( + const ::PROTOBUF_NAMESPACE_ID::Message& other) { + ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); +} + + +// =================================================================== + +void PersistResponse::InitAsDefaultInstance() { +} +class PersistResponse::_Internal { + public: +}; + +PersistResponse::PersistResponse() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.PersistResponse) +} +PersistResponse::PersistResponse(const PersistResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + status_.MergeFrom(from.status_); + errors_.MergeFrom(from.errors_); + // @@protoc_insertion_point(copy_constructor:pb.PersistResponse) +} + +void PersistResponse::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_PersistResponse_node_2eproto.base); +} + +PersistResponse::~PersistResponse() { + // @@protoc_insertion_point(destructor:pb.PersistResponse) + SharedDtor(); +} + +void PersistResponse::SharedDtor() { +} + +void PersistResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const PersistResponse& PersistResponse::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_PersistResponse_node_2eproto.base); + return *internal_default_instance(); +} + + +void PersistResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.PersistResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + status_.Clear(); + errors_.Clear(); + _internal_metadata_.Clear(); +} + +const char* PersistResponse::_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) { + // map status = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&status_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else goto handle_unusual; + continue; + // map errors = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&errors_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* PersistResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.PersistResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // map status = 1; + if (!this->_internal_status().empty()) { + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), static_cast(p->first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.PersistResponse.StatusEntry.key"); + } + }; + + if (stream->IsSerializationDeterministic() && + this->_internal_status().size() > 1) { + ::std::unique_ptr items( + new SortItem[this->_internal_status().size()]); + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >::size_type size_type; + size_type n = 0; + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >::const_iterator + it = this->_internal_status().begin(); + it != this->_internal_status().end(); ++it, ++n) { + items[static_cast(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast(n)], Less()); + for (size_type i = 0; i < n; i++) { + target = PersistResponse_StatusEntry_DoNotUse::Funcs::InternalSerialize(1, items[static_cast(i)]->first, items[static_cast(i)]->second, target, stream); + Utf8Check::Check(&(*items[static_cast(i)])); + } + } else { + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >::const_iterator + it = this->_internal_status().begin(); + it != this->_internal_status().end(); ++it) { + target = PersistResponse_StatusEntry_DoNotUse::Funcs::InternalSerialize(1, it->first, it->second, target, stream); + Utf8Check::Check(&(*it)); + } + } + } + + // map errors = 2; + if (!this->_internal_errors().empty()) { + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), static_cast(p->first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.PersistResponse.ErrorsEntry.key"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->second.data(), static_cast(p->second.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.PersistResponse.ErrorsEntry.value"); + } + }; + + if (stream->IsSerializationDeterministic() && + this->_internal_errors().size() > 1) { + ::std::unique_ptr items( + new SortItem[this->_internal_errors().size()]); + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::size_type size_type; + size_type n = 0; + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->_internal_errors().begin(); + it != this->_internal_errors().end(); ++it, ++n) { + items[static_cast(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast(n)], Less()); + for (size_type i = 0; i < n; i++) { + target = PersistResponse_ErrorsEntry_DoNotUse::Funcs::InternalSerialize(2, items[static_cast(i)]->first, items[static_cast(i)]->second, target, stream); + Utf8Check::Check(&(*items[static_cast(i)])); + } + } else { + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->_internal_errors().begin(); + it != this->_internal_errors().end(); ++it) { + target = PersistResponse_ErrorsEntry_DoNotUse::Funcs::InternalSerialize(2, it->first, it->second, target, stream); + Utf8Check::Check(&(*it)); + } + } + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.PersistResponse) + return target; +} + +size_t PersistResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.PersistResponse) + 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; + + // map status = 1; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_status_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >::const_iterator + it = this->_internal_status().begin(); + it != this->_internal_status().end(); ++it) { + total_size += PersistResponse_StatusEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + // map errors = 2; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_errors_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->_internal_errors().begin(); + it != this->_internal_errors().end(); ++it) { + total_size += PersistResponse_ErrorsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + 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 PersistResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.PersistResponse) + GOOGLE_DCHECK_NE(&from, this); + const PersistResponse* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.PersistResponse) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.PersistResponse) + MergeFrom(*source); + } +} + +void PersistResponse::MergeFrom(const PersistResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.PersistResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + status_.MergeFrom(from.status_); + errors_.MergeFrom(from.errors_); +} + +void PersistResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.PersistResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void PersistResponse::CopyFrom(const PersistResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.PersistResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool PersistResponse::IsInitialized() const { + return true; +} + +void PersistResponse::InternalSwap(PersistResponse* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + status_.Swap(&other->status_); + errors_.Swap(&other->errors_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata PersistResponse::GetMetadata() const { + return GetMetadataStatic(); +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace pb +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::pb::P2PRequest* Arena::CreateMaybeMessage< ::pb::P2PRequest >(Arena* arena) { + return Arena::CreateInternal< ::pb::P2PRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::P2PResponse* Arena::CreateMaybeMessage< ::pb::P2PResponse >(Arena* arena) { + return Arena::CreateInternal< ::pb::P2PResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::P2PLsInfo* Arena::CreateMaybeMessage< ::pb::P2PLsInfo >(Arena* arena) { + return Arena::CreateInternal< ::pb::P2PLsInfo >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::GetPeersResponse* Arena::CreateMaybeMessage< ::pb::GetPeersResponse >(Arena* arena) { + return Arena::CreateInternal< ::pb::GetPeersResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::ConnMgmtRequest* Arena::CreateMaybeMessage< ::pb::ConnMgmtRequest >(Arena* arena) { + return Arena::CreateInternal< ::pb::ConnMgmtRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::ConnMgmtResponse_ConnectedEntry_DoNotUse* Arena::CreateMaybeMessage< ::pb::ConnMgmtResponse_ConnectedEntry_DoNotUse >(Arena* arena) { + return Arena::CreateInternal< ::pb::ConnMgmtResponse_ConnectedEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::ConnMgmtResponse_StatusEntry_DoNotUse* Arena::CreateMaybeMessage< ::pb::ConnMgmtResponse_StatusEntry_DoNotUse >(Arena* arena) { + return Arena::CreateInternal< ::pb::ConnMgmtResponse_StatusEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::ConnMgmtResponse* Arena::CreateMaybeMessage< ::pb::ConnMgmtResponse >(Arena* arena) { + return Arena::CreateInternal< ::pb::ConnMgmtResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::ConnMgmtStatus* Arena::CreateMaybeMessage< ::pb::ConnMgmtStatus >(Arena* arena) { + return Arena::CreateInternal< ::pb::ConnMgmtStatus >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::ExtrasRequest* Arena::CreateMaybeMessage< ::pb::ExtrasRequest >(Arena* arena) { + return Arena::CreateInternal< ::pb::ExtrasRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::BlockstoreRequest* Arena::CreateMaybeMessage< ::pb::BlockstoreRequest >(Arena* arena) { + return Arena::CreateInternal< ::pb::BlockstoreRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::BlockstoreResponse* Arena::CreateMaybeMessage< ::pb::BlockstoreResponse >(Arena* arena) { + return Arena::CreateInternal< ::pb::BlockstoreResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::Block* Arena::CreateMaybeMessage< ::pb::Block >(Arena* arena) { + return Arena::CreateInternal< ::pb::Block >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::DagRequest_LinksEntry_DoNotUse* Arena::CreateMaybeMessage< ::pb::DagRequest_LinksEntry_DoNotUse >(Arena* arena) { + return Arena::CreateInternal< ::pb::DagRequest_LinksEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::DagRequest* Arena::CreateMaybeMessage< ::pb::DagRequest >(Arena* arena) { + return Arena::CreateInternal< ::pb::DagRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::DagResponse* Arena::CreateMaybeMessage< ::pb::DagResponse >(Arena* arena) { + return Arena::CreateInternal< ::pb::DagResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::IPLDLink* Arena::CreateMaybeMessage< ::pb::IPLDLink >(Arena* arena) { + return Arena::CreateInternal< ::pb::IPLDLink >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::IPLDNode* Arena::CreateMaybeMessage< ::pb::IPLDNode >(Arena* arena) { + return Arena::CreateInternal< ::pb::IPLDNode >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::KeystoreRequest* Arena::CreateMaybeMessage< ::pb::KeystoreRequest >(Arena* arena) { + return Arena::CreateInternal< ::pb::KeystoreRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::KeystoreResponse* Arena::CreateMaybeMessage< ::pb::KeystoreResponse >(Arena* arena) { + return Arena::CreateInternal< ::pb::KeystoreResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::PersistRequest* Arena::CreateMaybeMessage< ::pb::PersistRequest >(Arena* arena) { + return Arena::CreateInternal< ::pb::PersistRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::PersistResponse_StatusEntry_DoNotUse* Arena::CreateMaybeMessage< ::pb::PersistResponse_StatusEntry_DoNotUse >(Arena* arena) { + return Arena::CreateInternal< ::pb::PersistResponse_StatusEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::PersistResponse_ErrorsEntry_DoNotUse* Arena::CreateMaybeMessage< ::pb::PersistResponse_ErrorsEntry_DoNotUse >(Arena* arena) { + return Arena::CreateInternal< ::pb::PersistResponse_ErrorsEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::PersistResponse* Arena::CreateMaybeMessage< ::pb::PersistResponse >(Arena* arena) { + return Arena::CreateInternal< ::pb::PersistResponse >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/cpp/node.pb.h b/cpp/node.pb.h new file mode 100644 index 0000000..1489546 --- /dev/null +++ b/cpp/node.pb.h @@ -0,0 +1,7082 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: node.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_node_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_node_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3011000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3011002 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include +#include +#include "util.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_node_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_node_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[24] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_node_2eproto; +namespace pb { +class Block; +class BlockDefaultTypeInternal; +extern BlockDefaultTypeInternal _Block_default_instance_; +class BlockstoreRequest; +class BlockstoreRequestDefaultTypeInternal; +extern BlockstoreRequestDefaultTypeInternal _BlockstoreRequest_default_instance_; +class BlockstoreResponse; +class BlockstoreResponseDefaultTypeInternal; +extern BlockstoreResponseDefaultTypeInternal _BlockstoreResponse_default_instance_; +class ConnMgmtRequest; +class ConnMgmtRequestDefaultTypeInternal; +extern ConnMgmtRequestDefaultTypeInternal _ConnMgmtRequest_default_instance_; +class ConnMgmtResponse; +class ConnMgmtResponseDefaultTypeInternal; +extern ConnMgmtResponseDefaultTypeInternal _ConnMgmtResponse_default_instance_; +class ConnMgmtResponse_ConnectedEntry_DoNotUse; +class ConnMgmtResponse_ConnectedEntry_DoNotUseDefaultTypeInternal; +extern ConnMgmtResponse_ConnectedEntry_DoNotUseDefaultTypeInternal _ConnMgmtResponse_ConnectedEntry_DoNotUse_default_instance_; +class ConnMgmtResponse_StatusEntry_DoNotUse; +class ConnMgmtResponse_StatusEntry_DoNotUseDefaultTypeInternal; +extern ConnMgmtResponse_StatusEntry_DoNotUseDefaultTypeInternal _ConnMgmtResponse_StatusEntry_DoNotUse_default_instance_; +class ConnMgmtStatus; +class ConnMgmtStatusDefaultTypeInternal; +extern ConnMgmtStatusDefaultTypeInternal _ConnMgmtStatus_default_instance_; +class DagRequest; +class DagRequestDefaultTypeInternal; +extern DagRequestDefaultTypeInternal _DagRequest_default_instance_; +class DagRequest_LinksEntry_DoNotUse; +class DagRequest_LinksEntry_DoNotUseDefaultTypeInternal; +extern DagRequest_LinksEntry_DoNotUseDefaultTypeInternal _DagRequest_LinksEntry_DoNotUse_default_instance_; +class DagResponse; +class DagResponseDefaultTypeInternal; +extern DagResponseDefaultTypeInternal _DagResponse_default_instance_; +class ExtrasRequest; +class ExtrasRequestDefaultTypeInternal; +extern ExtrasRequestDefaultTypeInternal _ExtrasRequest_default_instance_; +class GetPeersResponse; +class GetPeersResponseDefaultTypeInternal; +extern GetPeersResponseDefaultTypeInternal _GetPeersResponse_default_instance_; +class IPLDLink; +class IPLDLinkDefaultTypeInternal; +extern IPLDLinkDefaultTypeInternal _IPLDLink_default_instance_; +class IPLDNode; +class IPLDNodeDefaultTypeInternal; +extern IPLDNodeDefaultTypeInternal _IPLDNode_default_instance_; +class KeystoreRequest; +class KeystoreRequestDefaultTypeInternal; +extern KeystoreRequestDefaultTypeInternal _KeystoreRequest_default_instance_; +class KeystoreResponse; +class KeystoreResponseDefaultTypeInternal; +extern KeystoreResponseDefaultTypeInternal _KeystoreResponse_default_instance_; +class P2PLsInfo; +class P2PLsInfoDefaultTypeInternal; +extern P2PLsInfoDefaultTypeInternal _P2PLsInfo_default_instance_; +class P2PRequest; +class P2PRequestDefaultTypeInternal; +extern P2PRequestDefaultTypeInternal _P2PRequest_default_instance_; +class P2PResponse; +class P2PResponseDefaultTypeInternal; +extern P2PResponseDefaultTypeInternal _P2PResponse_default_instance_; +class PersistRequest; +class PersistRequestDefaultTypeInternal; +extern PersistRequestDefaultTypeInternal _PersistRequest_default_instance_; +class PersistResponse; +class PersistResponseDefaultTypeInternal; +extern PersistResponseDefaultTypeInternal _PersistResponse_default_instance_; +class PersistResponse_ErrorsEntry_DoNotUse; +class PersistResponse_ErrorsEntry_DoNotUseDefaultTypeInternal; +extern PersistResponse_ErrorsEntry_DoNotUseDefaultTypeInternal _PersistResponse_ErrorsEntry_DoNotUse_default_instance_; +class PersistResponse_StatusEntry_DoNotUse; +class PersistResponse_StatusEntry_DoNotUseDefaultTypeInternal; +extern PersistResponse_StatusEntry_DoNotUseDefaultTypeInternal _PersistResponse_StatusEntry_DoNotUse_default_instance_; +} // namespace pb +PROTOBUF_NAMESPACE_OPEN +template<> ::pb::Block* Arena::CreateMaybeMessage<::pb::Block>(Arena*); +template<> ::pb::BlockstoreRequest* Arena::CreateMaybeMessage<::pb::BlockstoreRequest>(Arena*); +template<> ::pb::BlockstoreResponse* Arena::CreateMaybeMessage<::pb::BlockstoreResponse>(Arena*); +template<> ::pb::ConnMgmtRequest* Arena::CreateMaybeMessage<::pb::ConnMgmtRequest>(Arena*); +template<> ::pb::ConnMgmtResponse* Arena::CreateMaybeMessage<::pb::ConnMgmtResponse>(Arena*); +template<> ::pb::ConnMgmtResponse_ConnectedEntry_DoNotUse* Arena::CreateMaybeMessage<::pb::ConnMgmtResponse_ConnectedEntry_DoNotUse>(Arena*); +template<> ::pb::ConnMgmtResponse_StatusEntry_DoNotUse* Arena::CreateMaybeMessage<::pb::ConnMgmtResponse_StatusEntry_DoNotUse>(Arena*); +template<> ::pb::ConnMgmtStatus* Arena::CreateMaybeMessage<::pb::ConnMgmtStatus>(Arena*); +template<> ::pb::DagRequest* Arena::CreateMaybeMessage<::pb::DagRequest>(Arena*); +template<> ::pb::DagRequest_LinksEntry_DoNotUse* Arena::CreateMaybeMessage<::pb::DagRequest_LinksEntry_DoNotUse>(Arena*); +template<> ::pb::DagResponse* Arena::CreateMaybeMessage<::pb::DagResponse>(Arena*); +template<> ::pb::ExtrasRequest* Arena::CreateMaybeMessage<::pb::ExtrasRequest>(Arena*); +template<> ::pb::GetPeersResponse* Arena::CreateMaybeMessage<::pb::GetPeersResponse>(Arena*); +template<> ::pb::IPLDLink* Arena::CreateMaybeMessage<::pb::IPLDLink>(Arena*); +template<> ::pb::IPLDNode* Arena::CreateMaybeMessage<::pb::IPLDNode>(Arena*); +template<> ::pb::KeystoreRequest* Arena::CreateMaybeMessage<::pb::KeystoreRequest>(Arena*); +template<> ::pb::KeystoreResponse* Arena::CreateMaybeMessage<::pb::KeystoreResponse>(Arena*); +template<> ::pb::P2PLsInfo* Arena::CreateMaybeMessage<::pb::P2PLsInfo>(Arena*); +template<> ::pb::P2PRequest* Arena::CreateMaybeMessage<::pb::P2PRequest>(Arena*); +template<> ::pb::P2PResponse* Arena::CreateMaybeMessage<::pb::P2PResponse>(Arena*); +template<> ::pb::PersistRequest* Arena::CreateMaybeMessage<::pb::PersistRequest>(Arena*); +template<> ::pb::PersistResponse* Arena::CreateMaybeMessage<::pb::PersistResponse>(Arena*); +template<> ::pb::PersistResponse_ErrorsEntry_DoNotUse* Arena::CreateMaybeMessage<::pb::PersistResponse_ErrorsEntry_DoNotUse>(Arena*); +template<> ::pb::PersistResponse_StatusEntry_DoNotUse* Arena::CreateMaybeMessage<::pb::PersistResponse_StatusEntry_DoNotUse>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace pb { + +enum P2PREQTYPE : int { + CLOSE = 0, + FORWARD = 1, + LISTEN = 2, + LS = 3, + P2PREQTYPE_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + P2PREQTYPE_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() +}; +bool P2PREQTYPE_IsValid(int value); +constexpr P2PREQTYPE P2PREQTYPE_MIN = CLOSE; +constexpr P2PREQTYPE P2PREQTYPE_MAX = LS; +constexpr int P2PREQTYPE_ARRAYSIZE = P2PREQTYPE_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* P2PREQTYPE_descriptor(); +template +inline const std::string& P2PREQTYPE_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function P2PREQTYPE_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + P2PREQTYPE_descriptor(), enum_t_value); +} +inline bool P2PREQTYPE_Parse( + const std::string& name, P2PREQTYPE* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + P2PREQTYPE_descriptor(), name, value); +} +enum CONNMGMTREQTYPE : int { + CM_CONNECT = 0, + CM_DISCONNECT = 1, + CM_STATUS = 2, + CM_GET_PEERS = 3, + CONNMGMTREQTYPE_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + CONNMGMTREQTYPE_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() +}; +bool CONNMGMTREQTYPE_IsValid(int value); +constexpr CONNMGMTREQTYPE CONNMGMTREQTYPE_MIN = CM_CONNECT; +constexpr CONNMGMTREQTYPE CONNMGMTREQTYPE_MAX = CM_GET_PEERS; +constexpr int CONNMGMTREQTYPE_ARRAYSIZE = CONNMGMTREQTYPE_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* CONNMGMTREQTYPE_descriptor(); +template +inline const std::string& CONNMGMTREQTYPE_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function CONNMGMTREQTYPE_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + CONNMGMTREQTYPE_descriptor(), enum_t_value); +} +inline bool CONNMGMTREQTYPE_Parse( + const std::string& name, CONNMGMTREQTYPE* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + CONNMGMTREQTYPE_descriptor(), name, value); +} +enum EXTRASREQTYPE : int { + EX_ENABLE = 0, + EX_DISABLE = 1, + EXTRASREQTYPE_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + EXTRASREQTYPE_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() +}; +bool EXTRASREQTYPE_IsValid(int value); +constexpr EXTRASREQTYPE EXTRASREQTYPE_MIN = EX_ENABLE; +constexpr EXTRASREQTYPE EXTRASREQTYPE_MAX = EX_DISABLE; +constexpr int EXTRASREQTYPE_ARRAYSIZE = EXTRASREQTYPE_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EXTRASREQTYPE_descriptor(); +template +inline const std::string& EXTRASREQTYPE_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EXTRASREQTYPE_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + EXTRASREQTYPE_descriptor(), enum_t_value); +} +inline bool EXTRASREQTYPE_Parse( + const std::string& name, EXTRASREQTYPE* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + EXTRASREQTYPE_descriptor(), name, value); +} +enum EXTRASTYPE : int { + IDENTIFY = 0, + PUBSUB = 1, + DISCOVERY = 2, + MDNS = 3, + EXTRASTYPE_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + EXTRASTYPE_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() +}; +bool EXTRASTYPE_IsValid(int value); +constexpr EXTRASTYPE EXTRASTYPE_MIN = IDENTIFY; +constexpr EXTRASTYPE EXTRASTYPE_MAX = MDNS; +constexpr int EXTRASTYPE_ARRAYSIZE = EXTRASTYPE_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EXTRASTYPE_descriptor(); +template +inline const std::string& EXTRASTYPE_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EXTRASTYPE_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + EXTRASTYPE_descriptor(), enum_t_value); +} +inline bool EXTRASTYPE_Parse( + const std::string& name, EXTRASTYPE* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + EXTRASTYPE_descriptor(), name, value); +} +enum BSREQTYPE : int { + BS_DELETE = 0, + BS_PUT = 1, + BS_PUT_MANY = 2, + BS_GET = 3, + BS_GET_MANY = 4, + BSREQTYPE_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + BSREQTYPE_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() +}; +bool BSREQTYPE_IsValid(int value); +constexpr BSREQTYPE BSREQTYPE_MIN = BS_DELETE; +constexpr BSREQTYPE BSREQTYPE_MAX = BS_GET_MANY; +constexpr int BSREQTYPE_ARRAYSIZE = BSREQTYPE_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* BSREQTYPE_descriptor(); +template +inline const std::string& BSREQTYPE_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function BSREQTYPE_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + BSREQTYPE_descriptor(), enum_t_value); +} +inline bool BSREQTYPE_Parse( + const std::string& name, BSREQTYPE* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + BSREQTYPE_descriptor(), name, value); +} +enum BSREQOPTS : int { + DEFAULT = 0, + BS_FORCE = 1, + BSREQOPTS_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + BSREQOPTS_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() +}; +bool BSREQOPTS_IsValid(int value); +constexpr BSREQOPTS BSREQOPTS_MIN = DEFAULT; +constexpr BSREQOPTS BSREQOPTS_MAX = BS_FORCE; +constexpr int BSREQOPTS_ARRAYSIZE = BSREQOPTS_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* BSREQOPTS_descriptor(); +template +inline const std::string& BSREQOPTS_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function BSREQOPTS_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + BSREQOPTS_descriptor(), enum_t_value); +} +inline bool BSREQOPTS_Parse( + const std::string& name, BSREQOPTS* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + BSREQOPTS_descriptor(), name, value); +} +enum DAGREQTYPE : int { + DAG_PUT = 0, + DAG_GET = 1, + DAG_NEW_NODE = 2, + DAG_ADD_LINKS = 3, + DAG_GET_LINKS = 4, + DAGREQTYPE_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + DAGREQTYPE_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() +}; +bool DAGREQTYPE_IsValid(int value); +constexpr DAGREQTYPE DAGREQTYPE_MIN = DAG_PUT; +constexpr DAGREQTYPE DAGREQTYPE_MAX = DAG_GET_LINKS; +constexpr int DAGREQTYPE_ARRAYSIZE = DAGREQTYPE_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* DAGREQTYPE_descriptor(); +template +inline const std::string& DAGREQTYPE_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function DAGREQTYPE_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + DAGREQTYPE_descriptor(), enum_t_value); +} +inline bool DAGREQTYPE_Parse( + const std::string& name, DAGREQTYPE* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + DAGREQTYPE_descriptor(), name, value); +} +enum KSREQTYPE : int { + KS_HAS = 0, + KS_GET = 1, + KS_PUT = 2, + KS_DELETE = 3, + KS_LIST = 4, + KSREQTYPE_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + KSREQTYPE_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() +}; +bool KSREQTYPE_IsValid(int value); +constexpr KSREQTYPE KSREQTYPE_MIN = KS_HAS; +constexpr KSREQTYPE KSREQTYPE_MAX = KS_LIST; +constexpr int KSREQTYPE_ARRAYSIZE = KSREQTYPE_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* KSREQTYPE_descriptor(); +template +inline const std::string& KSREQTYPE_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function KSREQTYPE_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + KSREQTYPE_descriptor(), enum_t_value); +} +inline bool KSREQTYPE_Parse( + const std::string& name, KSREQTYPE* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + KSREQTYPE_descriptor(), name, value); +} +// =================================================================== + +class P2PRequest : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.P2PRequest) */ { + public: + P2PRequest(); + virtual ~P2PRequest(); + + P2PRequest(const P2PRequest& from); + P2PRequest(P2PRequest&& from) noexcept + : P2PRequest() { + *this = ::std::move(from); + } + + inline P2PRequest& operator=(const P2PRequest& from) { + CopyFrom(from); + return *this; + } + inline P2PRequest& operator=(P2PRequest&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 P2PRequest& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const P2PRequest* internal_default_instance() { + return reinterpret_cast( + &_P2PRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(P2PRequest& a, P2PRequest& b) { + a.Swap(&b); + } + inline void Swap(P2PRequest* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline P2PRequest* New() const final { + return CreateMaybeMessage(nullptr); + } + + P2PRequest* 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 P2PRequest& from); + void MergeFrom(const P2PRequest& 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(P2PRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.P2PRequest"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kProtocolNameFieldNumber = 4, + kListenAddressFieldNumber = 5, + kTargetAddressFieldNumber = 6, + kRemoteAddressFieldNumber = 7, + kRequestTypeFieldNumber = 1, + kAllFieldNumber = 2, + kVerboseFieldNumber = 3, + kAllowCustomProtocolsFieldNumber = 8, + kReportPeerIDFieldNumber = 9, + }; + // string protocolName = 4; + void clear_protocolname(); + const std::string& protocolname() const; + void set_protocolname(const std::string& value); + void set_protocolname(std::string&& value); + void set_protocolname(const char* value); + void set_protocolname(const char* value, size_t size); + std::string* mutable_protocolname(); + std::string* release_protocolname(); + void set_allocated_protocolname(std::string* protocolname); + private: + const std::string& _internal_protocolname() const; + void _internal_set_protocolname(const std::string& value); + std::string* _internal_mutable_protocolname(); + public: + + // string listenAddress = 5; + void clear_listenaddress(); + const std::string& listenaddress() const; + void set_listenaddress(const std::string& value); + void set_listenaddress(std::string&& value); + void set_listenaddress(const char* value); + void set_listenaddress(const char* value, size_t size); + std::string* mutable_listenaddress(); + std::string* release_listenaddress(); + void set_allocated_listenaddress(std::string* listenaddress); + private: + const std::string& _internal_listenaddress() const; + void _internal_set_listenaddress(const std::string& value); + std::string* _internal_mutable_listenaddress(); + public: + + // string targetAddress = 6; + void clear_targetaddress(); + const std::string& targetaddress() const; + void set_targetaddress(const std::string& value); + void set_targetaddress(std::string&& value); + void set_targetaddress(const char* value); + void set_targetaddress(const char* value, size_t size); + std::string* mutable_targetaddress(); + std::string* release_targetaddress(); + void set_allocated_targetaddress(std::string* targetaddress); + private: + const std::string& _internal_targetaddress() const; + void _internal_set_targetaddress(const std::string& value); + std::string* _internal_mutable_targetaddress(); + public: + + // string remoteAddress = 7; + void clear_remoteaddress(); + const std::string& remoteaddress() const; + void set_remoteaddress(const std::string& value); + void set_remoteaddress(std::string&& value); + void set_remoteaddress(const char* value); + void set_remoteaddress(const char* value, size_t size); + std::string* mutable_remoteaddress(); + std::string* release_remoteaddress(); + void set_allocated_remoteaddress(std::string* remoteaddress); + private: + const std::string& _internal_remoteaddress() const; + void _internal_set_remoteaddress(const std::string& value); + std::string* _internal_mutable_remoteaddress(); + public: + + // .pb.P2PREQTYPE requestType = 1; + void clear_requesttype(); + ::pb::P2PREQTYPE requesttype() const; + void set_requesttype(::pb::P2PREQTYPE value); + private: + ::pb::P2PREQTYPE _internal_requesttype() const; + void _internal_set_requesttype(::pb::P2PREQTYPE value); + public: + + // bool all = 2; + void clear_all(); + bool all() const; + void set_all(bool value); + private: + bool _internal_all() const; + void _internal_set_all(bool value); + public: + + // bool verbose = 3; + void clear_verbose(); + bool verbose() const; + void set_verbose(bool value); + private: + bool _internal_verbose() const; + void _internal_set_verbose(bool value); + public: + + // bool allowCustomProtocols = 8; + void clear_allowcustomprotocols(); + bool allowcustomprotocols() const; + void set_allowcustomprotocols(bool value); + private: + bool _internal_allowcustomprotocols() const; + void _internal_set_allowcustomprotocols(bool value); + public: + + // bool reportPeerID = 9; + void clear_reportpeerid(); + bool reportpeerid() const; + void set_reportpeerid(bool value); + private: + bool _internal_reportpeerid() const; + void _internal_set_reportpeerid(bool value); + public: + + // @@protoc_insertion_point(class_scope:pb.P2PRequest) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr protocolname_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr listenaddress_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr targetaddress_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr remoteaddress_; + int requesttype_; + bool all_; + bool verbose_; + bool allowcustomprotocols_; + bool reportpeerid_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class P2PResponse : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.P2PResponse) */ { + public: + P2PResponse(); + virtual ~P2PResponse(); + + P2PResponse(const P2PResponse& from); + P2PResponse(P2PResponse&& from) noexcept + : P2PResponse() { + *this = ::std::move(from); + } + + inline P2PResponse& operator=(const P2PResponse& from) { + CopyFrom(from); + return *this; + } + inline P2PResponse& operator=(P2PResponse&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 P2PResponse& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const P2PResponse* internal_default_instance() { + return reinterpret_cast( + &_P2PResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(P2PResponse& a, P2PResponse& b) { + a.Swap(&b); + } + inline void Swap(P2PResponse* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline P2PResponse* New() const final { + return CreateMaybeMessage(nullptr); + } + + P2PResponse* 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 P2PResponse& from); + void MergeFrom(const P2PResponse& 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(P2PResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.P2PResponse"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNamesFieldNumber = 2, + kStreamInfosFieldNumber = 4, + kRequestTypeFieldNumber = 1, + kConnsClosedFieldNumber = 3, + }; + // repeated string names = 2; + int names_size() const; + private: + int _internal_names_size() const; + public: + void clear_names(); + const std::string& names(int index) const; + std::string* mutable_names(int index); + void set_names(int index, const std::string& value); + void set_names(int index, std::string&& value); + void set_names(int index, const char* value); + void set_names(int index, const char* value, size_t size); + std::string* add_names(); + void add_names(const std::string& value); + void add_names(std::string&& value); + void add_names(const char* value); + void add_names(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& names() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_names(); + private: + const std::string& _internal_names(int index) const; + std::string* _internal_add_names(); + public: + + // repeated .pb.P2PLsInfo streamInfos = 4; + int streaminfos_size() const; + private: + int _internal_streaminfos_size() const; + public: + void clear_streaminfos(); + ::pb::P2PLsInfo* mutable_streaminfos(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::P2PLsInfo >* + mutable_streaminfos(); + private: + const ::pb::P2PLsInfo& _internal_streaminfos(int index) const; + ::pb::P2PLsInfo* _internal_add_streaminfos(); + public: + const ::pb::P2PLsInfo& streaminfos(int index) const; + ::pb::P2PLsInfo* add_streaminfos(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::P2PLsInfo >& + streaminfos() const; + + // .pb.P2PREQTYPE requestType = 1; + void clear_requesttype(); + ::pb::P2PREQTYPE requesttype() const; + void set_requesttype(::pb::P2PREQTYPE value); + private: + ::pb::P2PREQTYPE _internal_requesttype() const; + void _internal_set_requesttype(::pb::P2PREQTYPE value); + public: + + // int32 connsClosed = 3; + void clear_connsclosed(); + ::PROTOBUF_NAMESPACE_ID::int32 connsclosed() const; + void set_connsclosed(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_connsclosed() const; + void _internal_set_connsclosed(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // @@protoc_insertion_point(class_scope:pb.P2PResponse) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField names_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::P2PLsInfo > streaminfos_; + int requesttype_; + ::PROTOBUF_NAMESPACE_ID::int32 connsclosed_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class P2PLsInfo : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.P2PLsInfo) */ { + public: + P2PLsInfo(); + virtual ~P2PLsInfo(); + + P2PLsInfo(const P2PLsInfo& from); + P2PLsInfo(P2PLsInfo&& from) noexcept + : P2PLsInfo() { + *this = ::std::move(from); + } + + inline P2PLsInfo& operator=(const P2PLsInfo& from) { + CopyFrom(from); + return *this; + } + inline P2PLsInfo& operator=(P2PLsInfo&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 P2PLsInfo& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const P2PLsInfo* internal_default_instance() { + return reinterpret_cast( + &_P2PLsInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(P2PLsInfo& a, P2PLsInfo& b) { + a.Swap(&b); + } + inline void Swap(P2PLsInfo* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline P2PLsInfo* New() const final { + return CreateMaybeMessage(nullptr); + } + + P2PLsInfo* 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 P2PLsInfo& from); + void MergeFrom(const P2PLsInfo& 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(P2PLsInfo* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.P2PLsInfo"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kProtocolNameFieldNumber = 1, + kListenAddressFieldNumber = 2, + kTargetAddressFieldNumber = 3, + kLocalFieldNumber = 4, + }; + // string protocolName = 1; + void clear_protocolname(); + const std::string& protocolname() const; + void set_protocolname(const std::string& value); + void set_protocolname(std::string&& value); + void set_protocolname(const char* value); + void set_protocolname(const char* value, size_t size); + std::string* mutable_protocolname(); + std::string* release_protocolname(); + void set_allocated_protocolname(std::string* protocolname); + private: + const std::string& _internal_protocolname() const; + void _internal_set_protocolname(const std::string& value); + std::string* _internal_mutable_protocolname(); + public: + + // string listenAddress = 2; + void clear_listenaddress(); + const std::string& listenaddress() const; + void set_listenaddress(const std::string& value); + void set_listenaddress(std::string&& value); + void set_listenaddress(const char* value); + void set_listenaddress(const char* value, size_t size); + std::string* mutable_listenaddress(); + std::string* release_listenaddress(); + void set_allocated_listenaddress(std::string* listenaddress); + private: + const std::string& _internal_listenaddress() const; + void _internal_set_listenaddress(const std::string& value); + std::string* _internal_mutable_listenaddress(); + public: + + // string targetAddress = 3; + void clear_targetaddress(); + const std::string& targetaddress() const; + void set_targetaddress(const std::string& value); + void set_targetaddress(std::string&& value); + void set_targetaddress(const char* value); + void set_targetaddress(const char* value, size_t size); + std::string* mutable_targetaddress(); + std::string* release_targetaddress(); + void set_allocated_targetaddress(std::string* targetaddress); + private: + const std::string& _internal_targetaddress() const; + void _internal_set_targetaddress(const std::string& value); + std::string* _internal_mutable_targetaddress(); + public: + + // bool local = 4; + void clear_local(); + bool local() const; + void set_local(bool value); + private: + bool _internal_local() const; + void _internal_set_local(bool value); + public: + + // @@protoc_insertion_point(class_scope:pb.P2PLsInfo) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr protocolname_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr listenaddress_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr targetaddress_; + bool local_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class GetPeersResponse : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.GetPeersResponse) */ { + public: + GetPeersResponse(); + virtual ~GetPeersResponse(); + + GetPeersResponse(const GetPeersResponse& from); + GetPeersResponse(GetPeersResponse&& from) noexcept + : GetPeersResponse() { + *this = ::std::move(from); + } + + inline GetPeersResponse& operator=(const GetPeersResponse& from) { + CopyFrom(from); + return *this; + } + inline GetPeersResponse& operator=(GetPeersResponse&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 GetPeersResponse& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const GetPeersResponse* internal_default_instance() { + return reinterpret_cast( + &_GetPeersResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(GetPeersResponse& a, GetPeersResponse& b) { + a.Swap(&b); + } + inline void Swap(GetPeersResponse* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline GetPeersResponse* New() const final { + return CreateMaybeMessage(nullptr); + } + + GetPeersResponse* 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 GetPeersResponse& from); + void MergeFrom(const GetPeersResponse& 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(GetPeersResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.GetPeersResponse"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kPeerIDsFieldNumber = 1, + }; + // repeated string peerIDs = 1; + int peerids_size() const; + private: + int _internal_peerids_size() const; + public: + void clear_peerids(); + const std::string& peerids(int index) const; + std::string* mutable_peerids(int index); + void set_peerids(int index, const std::string& value); + void set_peerids(int index, std::string&& value); + void set_peerids(int index, const char* value); + void set_peerids(int index, const char* value, size_t size); + std::string* add_peerids(); + void add_peerids(const std::string& value); + void add_peerids(std::string&& value); + void add_peerids(const char* value); + void add_peerids(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& peerids() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_peerids(); + private: + const std::string& _internal_peerids(int index) const; + std::string* _internal_add_peerids(); + public: + + // @@protoc_insertion_point(class_scope:pb.GetPeersResponse) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField peerids_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class ConnMgmtRequest : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.ConnMgmtRequest) */ { + public: + ConnMgmtRequest(); + virtual ~ConnMgmtRequest(); + + ConnMgmtRequest(const ConnMgmtRequest& from); + ConnMgmtRequest(ConnMgmtRequest&& from) noexcept + : ConnMgmtRequest() { + *this = ::std::move(from); + } + + inline ConnMgmtRequest& operator=(const ConnMgmtRequest& from) { + CopyFrom(from); + return *this; + } + inline ConnMgmtRequest& operator=(ConnMgmtRequest&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 ConnMgmtRequest& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const ConnMgmtRequest* internal_default_instance() { + return reinterpret_cast( + &_ConnMgmtRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(ConnMgmtRequest& a, ConnMgmtRequest& b) { + a.Swap(&b); + } + inline void Swap(ConnMgmtRequest* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline ConnMgmtRequest* New() const final { + return CreateMaybeMessage(nullptr); + } + + ConnMgmtRequest* 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 ConnMgmtRequest& from); + void MergeFrom(const ConnMgmtRequest& 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(ConnMgmtRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.ConnMgmtRequest"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kMultiAddrsFieldNumber = 2, + kPeerIDsFieldNumber = 3, + kRequestTypeFieldNumber = 1, + }; + // repeated string multiAddrs = 2; + int multiaddrs_size() const; + private: + int _internal_multiaddrs_size() const; + public: + void clear_multiaddrs(); + const std::string& multiaddrs(int index) const; + std::string* mutable_multiaddrs(int index); + void set_multiaddrs(int index, const std::string& value); + void set_multiaddrs(int index, std::string&& value); + void set_multiaddrs(int index, const char* value); + void set_multiaddrs(int index, const char* value, size_t size); + std::string* add_multiaddrs(); + void add_multiaddrs(const std::string& value); + void add_multiaddrs(std::string&& value); + void add_multiaddrs(const char* value); + void add_multiaddrs(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& multiaddrs() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_multiaddrs(); + private: + const std::string& _internal_multiaddrs(int index) const; + std::string* _internal_add_multiaddrs(); + public: + + // repeated string peerIDs = 3; + int peerids_size() const; + private: + int _internal_peerids_size() const; + public: + void clear_peerids(); + const std::string& peerids(int index) const; + std::string* mutable_peerids(int index); + void set_peerids(int index, const std::string& value); + void set_peerids(int index, std::string&& value); + void set_peerids(int index, const char* value); + void set_peerids(int index, const char* value, size_t size); + std::string* add_peerids(); + void add_peerids(const std::string& value); + void add_peerids(std::string&& value); + void add_peerids(const char* value); + void add_peerids(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& peerids() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_peerids(); + private: + const std::string& _internal_peerids(int index) const; + std::string* _internal_add_peerids(); + public: + + // .pb.CONNMGMTREQTYPE requestType = 1; + void clear_requesttype(); + ::pb::CONNMGMTREQTYPE requesttype() const; + void set_requesttype(::pb::CONNMGMTREQTYPE value); + private: + ::pb::CONNMGMTREQTYPE _internal_requesttype() const; + void _internal_set_requesttype(::pb::CONNMGMTREQTYPE value); + public: + + // @@protoc_insertion_point(class_scope:pb.ConnMgmtRequest) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField multiaddrs_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField peerids_; + int requesttype_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class ConnMgmtResponse_ConnectedEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + ConnMgmtResponse_ConnectedEntry_DoNotUse(); + ConnMgmtResponse_ConnectedEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const ConnMgmtResponse_ConnectedEntry_DoNotUse& other); + static const ConnMgmtResponse_ConnectedEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_ConnMgmtResponse_ConnectedEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "pb.ConnMgmtResponse.ConnectedEntry.key"); + } + static bool ValidateValue(void*) { return true; } + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& other) final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[5]; + } + + public: +}; + +// ------------------------------------------------------------------- + +class ConnMgmtResponse_StatusEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + ConnMgmtResponse_StatusEntry_DoNotUse(); + ConnMgmtResponse_StatusEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const ConnMgmtResponse_StatusEntry_DoNotUse& other); + static const ConnMgmtResponse_StatusEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_ConnMgmtResponse_StatusEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "pb.ConnMgmtResponse.StatusEntry.key"); + } + static bool ValidateValue(void*) { return true; } + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& other) final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[6]; + } + + public: +}; + +// ------------------------------------------------------------------- + +class ConnMgmtResponse : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.ConnMgmtResponse) */ { + public: + ConnMgmtResponse(); + virtual ~ConnMgmtResponse(); + + ConnMgmtResponse(const ConnMgmtResponse& from); + ConnMgmtResponse(ConnMgmtResponse&& from) noexcept + : ConnMgmtResponse() { + *this = ::std::move(from); + } + + inline ConnMgmtResponse& operator=(const ConnMgmtResponse& from) { + CopyFrom(from); + return *this; + } + inline ConnMgmtResponse& operator=(ConnMgmtResponse&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 ConnMgmtResponse& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const ConnMgmtResponse* internal_default_instance() { + return reinterpret_cast( + &_ConnMgmtResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(ConnMgmtResponse& a, ConnMgmtResponse& b) { + a.Swap(&b); + } + inline void Swap(ConnMgmtResponse* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline ConnMgmtResponse* New() const final { + return CreateMaybeMessage(nullptr); + } + + ConnMgmtResponse* 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 ConnMgmtResponse& from); + void MergeFrom(const ConnMgmtResponse& 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(ConnMgmtResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.ConnMgmtResponse"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kConnectedFieldNumber = 2, + kStatusFieldNumber = 3, + kPeerIDsFieldNumber = 4, + kRequestTypeFieldNumber = 1, + }; + // map connected = 2; + int connected_size() const; + private: + int _internal_connected_size() const; + public: + void clear_connected(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >& + _internal_connected() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >* + _internal_mutable_connected(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >& + connected() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >* + mutable_connected(); + + // map status = 3; + int status_size() const; + private: + int _internal_status_size() const; + public: + void clear_status(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::pb::ConnMgmtStatus >& + _internal_status() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::pb::ConnMgmtStatus >* + _internal_mutable_status(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::pb::ConnMgmtStatus >& + status() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::pb::ConnMgmtStatus >* + mutable_status(); + + // repeated string peerIDs = 4; + int peerids_size() const; + private: + int _internal_peerids_size() const; + public: + void clear_peerids(); + const std::string& peerids(int index) const; + std::string* mutable_peerids(int index); + void set_peerids(int index, const std::string& value); + void set_peerids(int index, std::string&& value); + void set_peerids(int index, const char* value); + void set_peerids(int index, const char* value, size_t size); + std::string* add_peerids(); + void add_peerids(const std::string& value); + void add_peerids(std::string&& value); + void add_peerids(const char* value); + void add_peerids(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& peerids() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_peerids(); + private: + const std::string& _internal_peerids(int index) const; + std::string* _internal_add_peerids(); + public: + + // .pb.CONNMGMTREQTYPE requestType = 1; + void clear_requesttype(); + ::pb::CONNMGMTREQTYPE requesttype() const; + void set_requesttype(::pb::CONNMGMTREQTYPE value); + private: + ::pb::CONNMGMTREQTYPE _internal_requesttype() const; + void _internal_set_requesttype(::pb::CONNMGMTREQTYPE value); + public: + + // @@protoc_insertion_point(class_scope:pb.ConnMgmtResponse) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + ConnMgmtResponse_ConnectedEntry_DoNotUse, + std::string, bool, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL, + 0 > connected_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + ConnMgmtResponse_StatusEntry_DoNotUse, + std::string, ::pb::ConnMgmtStatus, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, + 0 > status_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField peerids_; + int requesttype_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class ConnMgmtStatus : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.ConnMgmtStatus) */ { + public: + ConnMgmtStatus(); + virtual ~ConnMgmtStatus(); + + ConnMgmtStatus(const ConnMgmtStatus& from); + ConnMgmtStatus(ConnMgmtStatus&& from) noexcept + : ConnMgmtStatus() { + *this = ::std::move(from); + } + + inline ConnMgmtStatus& operator=(const ConnMgmtStatus& from) { + CopyFrom(from); + return *this; + } + inline ConnMgmtStatus& operator=(ConnMgmtStatus&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 ConnMgmtStatus& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const ConnMgmtStatus* internal_default_instance() { + return reinterpret_cast( + &_ConnMgmtStatus_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(ConnMgmtStatus& a, ConnMgmtStatus& b) { + a.Swap(&b); + } + inline void Swap(ConnMgmtStatus* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline ConnMgmtStatus* New() const final { + return CreateMaybeMessage(nullptr); + } + + ConnMgmtStatus* 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 ConnMgmtStatus& from); + void MergeFrom(const ConnMgmtStatus& 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(ConnMgmtStatus* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.ConnMgmtStatus"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kReasonFieldNumber = 2, + kDisconnectedFieldNumber = 1, + }; + // string reason = 2; + void clear_reason(); + const std::string& reason() const; + void set_reason(const std::string& value); + void set_reason(std::string&& value); + void set_reason(const char* value); + void set_reason(const char* value, size_t size); + std::string* mutable_reason(); + std::string* release_reason(); + void set_allocated_reason(std::string* reason); + private: + const std::string& _internal_reason() const; + void _internal_set_reason(const std::string& value); + std::string* _internal_mutable_reason(); + public: + + // bool disconnected = 1; + void clear_disconnected(); + bool disconnected() const; + void set_disconnected(bool value); + private: + bool _internal_disconnected() const; + void _internal_set_disconnected(bool value); + public: + + // @@protoc_insertion_point(class_scope:pb.ConnMgmtStatus) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr reason_; + bool disconnected_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class ExtrasRequest : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.ExtrasRequest) */ { + public: + ExtrasRequest(); + virtual ~ExtrasRequest(); + + ExtrasRequest(const ExtrasRequest& from); + ExtrasRequest(ExtrasRequest&& from) noexcept + : ExtrasRequest() { + *this = ::std::move(from); + } + + inline ExtrasRequest& operator=(const ExtrasRequest& from) { + CopyFrom(from); + return *this; + } + inline ExtrasRequest& operator=(ExtrasRequest&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 ExtrasRequest& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const ExtrasRequest* internal_default_instance() { + return reinterpret_cast( + &_ExtrasRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + friend void swap(ExtrasRequest& a, ExtrasRequest& b) { + a.Swap(&b); + } + inline void Swap(ExtrasRequest* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline ExtrasRequest* New() const final { + return CreateMaybeMessage(nullptr); + } + + ExtrasRequest* 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 ExtrasRequest& from); + void MergeFrom(const ExtrasRequest& 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(ExtrasRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.ExtrasRequest"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kRequestTypeFieldNumber = 1, + kExtrasFeatureFieldNumber = 2, + }; + // .pb.EXTRASREQTYPE requestType = 1; + void clear_requesttype(); + ::pb::EXTRASREQTYPE requesttype() const; + void set_requesttype(::pb::EXTRASREQTYPE value); + private: + ::pb::EXTRASREQTYPE _internal_requesttype() const; + void _internal_set_requesttype(::pb::EXTRASREQTYPE value); + public: + + // .pb.EXTRASTYPE extrasFeature = 2; + void clear_extrasfeature(); + ::pb::EXTRASTYPE extrasfeature() const; + void set_extrasfeature(::pb::EXTRASTYPE value); + private: + ::pb::EXTRASTYPE _internal_extrasfeature() const; + void _internal_set_extrasfeature(::pb::EXTRASTYPE value); + public: + + // @@protoc_insertion_point(class_scope:pb.ExtrasRequest) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + int requesttype_; + int extrasfeature_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class BlockstoreRequest : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.BlockstoreRequest) */ { + public: + BlockstoreRequest(); + virtual ~BlockstoreRequest(); + + BlockstoreRequest(const BlockstoreRequest& from); + BlockstoreRequest(BlockstoreRequest&& from) noexcept + : BlockstoreRequest() { + *this = ::std::move(from); + } + + inline BlockstoreRequest& operator=(const BlockstoreRequest& from) { + CopyFrom(from); + return *this; + } + inline BlockstoreRequest& operator=(BlockstoreRequest&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 BlockstoreRequest& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const BlockstoreRequest* internal_default_instance() { + return reinterpret_cast( + &_BlockstoreRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 10; + + friend void swap(BlockstoreRequest& a, BlockstoreRequest& b) { + a.Swap(&b); + } + inline void Swap(BlockstoreRequest* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline BlockstoreRequest* New() const final { + return CreateMaybeMessage(nullptr); + } + + BlockstoreRequest* 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 BlockstoreRequest& from); + void MergeFrom(const BlockstoreRequest& 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(BlockstoreRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.BlockstoreRequest"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kReqOptsFieldNumber = 2, + kCidsFieldNumber = 3, + kDataFieldNumber = 4, + kCidVersionFieldNumber = 5, + kHashFuncFieldNumber = 7, + kRequestTypeFieldNumber = 1, + }; + // repeated .pb.BSREQOPTS reqOpts = 2; + int reqopts_size() const; + private: + int _internal_reqopts_size() const; + public: + void clear_reqopts(); + private: + ::pb::BSREQOPTS _internal_reqopts(int index) const; + void _internal_add_reqopts(::pb::BSREQOPTS value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField* _internal_mutable_reqopts(); + public: + ::pb::BSREQOPTS reqopts(int index) const; + void set_reqopts(int index, ::pb::BSREQOPTS value); + void add_reqopts(::pb::BSREQOPTS value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField& reqopts() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField* mutable_reqopts(); + + // repeated string cids = 3; + int cids_size() const; + private: + int _internal_cids_size() const; + public: + void clear_cids(); + const std::string& cids(int index) const; + std::string* mutable_cids(int index); + void set_cids(int index, const std::string& value); + void set_cids(int index, std::string&& value); + void set_cids(int index, const char* value); + void set_cids(int index, const char* value, size_t size); + std::string* add_cids(); + void add_cids(const std::string& value); + void add_cids(std::string&& value); + void add_cids(const char* value); + void add_cids(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& cids() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_cids(); + private: + const std::string& _internal_cids(int index) const; + std::string* _internal_add_cids(); + public: + + // repeated bytes data = 4; + int data_size() const; + private: + int _internal_data_size() const; + public: + void clear_data(); + const std::string& data(int index) const; + std::string* mutable_data(int index); + void set_data(int index, const std::string& value); + void set_data(int index, std::string&& value); + void set_data(int index, const char* value); + void set_data(int index, const void* value, size_t size); + std::string* add_data(); + void add_data(const std::string& value); + void add_data(std::string&& value); + void add_data(const char* value); + void add_data(const void* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& data() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_data(); + private: + const std::string& _internal_data(int index) const; + std::string* _internal_add_data(); + public: + + // string cidVersion = 5; + void clear_cidversion(); + const std::string& cidversion() const; + void set_cidversion(const std::string& value); + void set_cidversion(std::string&& value); + void set_cidversion(const char* value); + void set_cidversion(const char* value, size_t size); + std::string* mutable_cidversion(); + std::string* release_cidversion(); + void set_allocated_cidversion(std::string* cidversion); + private: + const std::string& _internal_cidversion() const; + void _internal_set_cidversion(const std::string& value); + std::string* _internal_mutable_cidversion(); + public: + + // string hashFunc = 7; + void clear_hashfunc(); + const std::string& hashfunc() const; + void set_hashfunc(const std::string& value); + void set_hashfunc(std::string&& value); + void set_hashfunc(const char* value); + void set_hashfunc(const char* value, size_t size); + std::string* mutable_hashfunc(); + std::string* release_hashfunc(); + void set_allocated_hashfunc(std::string* hashfunc); + private: + const std::string& _internal_hashfunc() const; + void _internal_set_hashfunc(const std::string& value); + std::string* _internal_mutable_hashfunc(); + public: + + // .pb.BSREQTYPE requestType = 1; + void clear_requesttype(); + ::pb::BSREQTYPE requesttype() const; + void set_requesttype(::pb::BSREQTYPE value); + private: + ::pb::BSREQTYPE _internal_requesttype() const; + void _internal_set_requesttype(::pb::BSREQTYPE value); + public: + + // @@protoc_insertion_point(class_scope:pb.BlockstoreRequest) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField reqopts_; + mutable std::atomic _reqopts_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField cids_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField data_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr cidversion_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr hashfunc_; + int requesttype_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class BlockstoreResponse : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.BlockstoreResponse) */ { + public: + BlockstoreResponse(); + virtual ~BlockstoreResponse(); + + BlockstoreResponse(const BlockstoreResponse& from); + BlockstoreResponse(BlockstoreResponse&& from) noexcept + : BlockstoreResponse() { + *this = ::std::move(from); + } + + inline BlockstoreResponse& operator=(const BlockstoreResponse& from) { + CopyFrom(from); + return *this; + } + inline BlockstoreResponse& operator=(BlockstoreResponse&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 BlockstoreResponse& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const BlockstoreResponse* internal_default_instance() { + return reinterpret_cast( + &_BlockstoreResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 11; + + friend void swap(BlockstoreResponse& a, BlockstoreResponse& b) { + a.Swap(&b); + } + inline void Swap(BlockstoreResponse* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline BlockstoreResponse* New() const final { + return CreateMaybeMessage(nullptr); + } + + BlockstoreResponse* 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 BlockstoreResponse& from); + void MergeFrom(const BlockstoreResponse& 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(BlockstoreResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.BlockstoreResponse"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kBlocksFieldNumber = 2, + kRequestTypeFieldNumber = 1, + }; + // repeated .pb.Block blocks = 2; + int blocks_size() const; + private: + int _internal_blocks_size() const; + public: + void clear_blocks(); + ::pb::Block* mutable_blocks(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::Block >* + mutable_blocks(); + private: + const ::pb::Block& _internal_blocks(int index) const; + ::pb::Block* _internal_add_blocks(); + public: + const ::pb::Block& blocks(int index) const; + ::pb::Block* add_blocks(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::Block >& + blocks() const; + + // .pb.BSREQTYPE requestType = 1; + void clear_requesttype(); + ::pb::BSREQTYPE requesttype() const; + void set_requesttype(::pb::BSREQTYPE value); + private: + ::pb::BSREQTYPE _internal_requesttype() const; + void _internal_set_requesttype(::pb::BSREQTYPE value); + public: + + // @@protoc_insertion_point(class_scope:pb.BlockstoreResponse) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::Block > blocks_; + int requesttype_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class Block : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.Block) */ { + public: + Block(); + virtual ~Block(); + + Block(const Block& from); + Block(Block&& from) noexcept + : Block() { + *this = ::std::move(from); + } + + inline Block& operator=(const Block& from) { + CopyFrom(from); + return *this; + } + inline Block& operator=(Block&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 Block& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Block* internal_default_instance() { + return reinterpret_cast( + &_Block_default_instance_); + } + static constexpr int kIndexInFileMessages = + 12; + + friend void swap(Block& a, Block& b) { + a.Swap(&b); + } + inline void Swap(Block* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Block* New() const final { + return CreateMaybeMessage(nullptr); + } + + Block* 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 Block& from); + void MergeFrom(const Block& 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(Block* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.Block"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kCidFieldNumber = 1, + kDataFieldNumber = 2, + }; + // string cid = 1; + void clear_cid(); + const std::string& cid() const; + void set_cid(const std::string& value); + void set_cid(std::string&& value); + void set_cid(const char* value); + void set_cid(const char* value, size_t size); + std::string* mutable_cid(); + std::string* release_cid(); + void set_allocated_cid(std::string* cid); + private: + const std::string& _internal_cid() const; + void _internal_set_cid(const std::string& value); + std::string* _internal_mutable_cid(); + public: + + // bytes data = 2; + void clear_data(); + const std::string& data() const; + void set_data(const std::string& value); + void set_data(std::string&& value); + void set_data(const char* value); + void set_data(const void* value, size_t size); + std::string* mutable_data(); + std::string* release_data(); + void set_allocated_data(std::string* data); + private: + const std::string& _internal_data() const; + void _internal_set_data(const std::string& value); + std::string* _internal_mutable_data(); + public: + + // @@protoc_insertion_point(class_scope:pb.Block) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr cid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class DagRequest_LinksEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + DagRequest_LinksEntry_DoNotUse(); + DagRequest_LinksEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const DagRequest_LinksEntry_DoNotUse& other); + static const DagRequest_LinksEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_DagRequest_LinksEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "pb.DagRequest.LinksEntry.key"); + } + static bool ValidateValue(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "pb.DagRequest.LinksEntry.value"); + } + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& other) final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[13]; + } + + public: +}; + +// ------------------------------------------------------------------- + +class DagRequest : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.DagRequest) */ { + public: + DagRequest(); + virtual ~DagRequest(); + + DagRequest(const DagRequest& from); + DagRequest(DagRequest&& from) noexcept + : DagRequest() { + *this = ::std::move(from); + } + + inline DagRequest& operator=(const DagRequest& from) { + CopyFrom(from); + return *this; + } + inline DagRequest& operator=(DagRequest&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 DagRequest& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const DagRequest* internal_default_instance() { + return reinterpret_cast( + &_DagRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 14; + + friend void swap(DagRequest& a, DagRequest& b) { + a.Swap(&b); + } + inline void Swap(DagRequest* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline DagRequest* New() const final { + return CreateMaybeMessage(nullptr); + } + + DagRequest* 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 DagRequest& from); + void MergeFrom(const DagRequest& 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(DagRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.DagRequest"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kLinksFieldNumber = 8, + kDataFieldNumber = 2, + kObjectEncodingFieldNumber = 3, + kSerializationFormatFieldNumber = 4, + kHashFuncFieldNumber = 5, + kHashFieldNumber = 7, + kCidVersionFieldNumber = 6, + kRequestTypeFieldNumber = 1, + }; + // map links = 8; + int links_size() const; + private: + int _internal_links_size() const; + public: + void clear_links(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + _internal_links() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + _internal_mutable_links(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + links() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + mutable_links(); + + // bytes data = 2; + void clear_data(); + const std::string& data() const; + void set_data(const std::string& value); + void set_data(std::string&& value); + void set_data(const char* value); + void set_data(const void* value, size_t size); + std::string* mutable_data(); + std::string* release_data(); + void set_allocated_data(std::string* data); + private: + const std::string& _internal_data() const; + void _internal_set_data(const std::string& value); + std::string* _internal_mutable_data(); + public: + + // string objectEncoding = 3; + void clear_objectencoding(); + const std::string& objectencoding() const; + void set_objectencoding(const std::string& value); + void set_objectencoding(std::string&& value); + void set_objectencoding(const char* value); + void set_objectencoding(const char* value, size_t size); + std::string* mutable_objectencoding(); + std::string* release_objectencoding(); + void set_allocated_objectencoding(std::string* objectencoding); + private: + const std::string& _internal_objectencoding() const; + void _internal_set_objectencoding(const std::string& value); + std::string* _internal_mutable_objectencoding(); + public: + + // string serializationFormat = 4; + void clear_serializationformat(); + const std::string& serializationformat() const; + void set_serializationformat(const std::string& value); + void set_serializationformat(std::string&& value); + void set_serializationformat(const char* value); + void set_serializationformat(const char* value, size_t size); + std::string* mutable_serializationformat(); + std::string* release_serializationformat(); + void set_allocated_serializationformat(std::string* serializationformat); + private: + const std::string& _internal_serializationformat() const; + void _internal_set_serializationformat(const std::string& value); + std::string* _internal_mutable_serializationformat(); + public: + + // string hashFunc = 5; + void clear_hashfunc(); + const std::string& hashfunc() const; + void set_hashfunc(const std::string& value); + void set_hashfunc(std::string&& value); + void set_hashfunc(const char* value); + void set_hashfunc(const char* value, size_t size); + std::string* mutable_hashfunc(); + std::string* release_hashfunc(); + void set_allocated_hashfunc(std::string* hashfunc); + private: + const std::string& _internal_hashfunc() const; + void _internal_set_hashfunc(const std::string& value); + std::string* _internal_mutable_hashfunc(); + public: + + // string hash = 7; + void clear_hash(); + const std::string& hash() const; + void set_hash(const std::string& value); + void set_hash(std::string&& value); + void set_hash(const char* value); + void set_hash(const char* value, size_t size); + std::string* mutable_hash(); + std::string* release_hash(); + void set_allocated_hash(std::string* hash); + private: + const std::string& _internal_hash() const; + void _internal_set_hash(const std::string& value); + std::string* _internal_mutable_hash(); + public: + + // int64 cidVersion = 6; + void clear_cidversion(); + ::PROTOBUF_NAMESPACE_ID::int64 cidversion() const; + void set_cidversion(::PROTOBUF_NAMESPACE_ID::int64 value); + private: + ::PROTOBUF_NAMESPACE_ID::int64 _internal_cidversion() const; + void _internal_set_cidversion(::PROTOBUF_NAMESPACE_ID::int64 value); + public: + + // .pb.DAGREQTYPE requestType = 1; + void clear_requesttype(); + ::pb::DAGREQTYPE requesttype() const; + void set_requesttype(::pb::DAGREQTYPE value); + private: + ::pb::DAGREQTYPE _internal_requesttype() const; + void _internal_set_requesttype(::pb::DAGREQTYPE value); + public: + + // @@protoc_insertion_point(class_scope:pb.DagRequest) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + DagRequest_LinksEntry_DoNotUse, + std::string, std::string, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + 0 > links_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr objectencoding_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr serializationformat_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr hashfunc_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr hash_; + ::PROTOBUF_NAMESPACE_ID::int64 cidversion_; + int requesttype_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class DagResponse : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.DagResponse) */ { + public: + DagResponse(); + virtual ~DagResponse(); + + DagResponse(const DagResponse& from); + DagResponse(DagResponse&& from) noexcept + : DagResponse() { + *this = ::std::move(from); + } + + inline DagResponse& operator=(const DagResponse& from) { + CopyFrom(from); + return *this; + } + inline DagResponse& operator=(DagResponse&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 DagResponse& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const DagResponse* internal_default_instance() { + return reinterpret_cast( + &_DagResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 15; + + friend void swap(DagResponse& a, DagResponse& b) { + a.Swap(&b); + } + inline void Swap(DagResponse* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline DagResponse* New() const final { + return CreateMaybeMessage(nullptr); + } + + DagResponse* 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 DagResponse& from); + void MergeFrom(const DagResponse& 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(DagResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.DagResponse"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kHashesFieldNumber = 2, + kLinksFieldNumber = 4, + kRawDataFieldNumber = 3, + kRequestTypeFieldNumber = 1, + }; + // repeated string hashes = 2; + int hashes_size() const; + private: + int _internal_hashes_size() const; + public: + void clear_hashes(); + const std::string& hashes(int index) const; + std::string* mutable_hashes(int index); + void set_hashes(int index, const std::string& value); + void set_hashes(int index, std::string&& value); + void set_hashes(int index, const char* value); + void set_hashes(int index, const char* value, size_t size); + std::string* add_hashes(); + void add_hashes(const std::string& value); + void add_hashes(std::string&& value); + void add_hashes(const char* value); + void add_hashes(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& hashes() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_hashes(); + private: + const std::string& _internal_hashes(int index) const; + std::string* _internal_add_hashes(); + public: + + // repeated .pb.IPLDLink links = 4; + int links_size() const; + private: + int _internal_links_size() const; + public: + void clear_links(); + ::pb::IPLDLink* mutable_links(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::IPLDLink >* + mutable_links(); + private: + const ::pb::IPLDLink& _internal_links(int index) const; + ::pb::IPLDLink* _internal_add_links(); + public: + const ::pb::IPLDLink& links(int index) const; + ::pb::IPLDLink* add_links(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::IPLDLink >& + links() const; + + // bytes rawData = 3; + void clear_rawdata(); + const std::string& rawdata() const; + void set_rawdata(const std::string& value); + void set_rawdata(std::string&& value); + void set_rawdata(const char* value); + void set_rawdata(const void* value, size_t size); + std::string* mutable_rawdata(); + std::string* release_rawdata(); + void set_allocated_rawdata(std::string* rawdata); + private: + const std::string& _internal_rawdata() const; + void _internal_set_rawdata(const std::string& value); + std::string* _internal_mutable_rawdata(); + public: + + // .pb.DAGREQTYPE requestType = 1; + void clear_requesttype(); + ::pb::DAGREQTYPE requesttype() const; + void set_requesttype(::pb::DAGREQTYPE value); + private: + ::pb::DAGREQTYPE _internal_requesttype() const; + void _internal_set_requesttype(::pb::DAGREQTYPE value); + public: + + // @@protoc_insertion_point(class_scope:pb.DagResponse) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField hashes_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::IPLDLink > links_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr rawdata_; + int requesttype_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class IPLDLink : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.IPLDLink) */ { + public: + IPLDLink(); + virtual ~IPLDLink(); + + IPLDLink(const IPLDLink& from); + IPLDLink(IPLDLink&& from) noexcept + : IPLDLink() { + *this = ::std::move(from); + } + + inline IPLDLink& operator=(const IPLDLink& from) { + CopyFrom(from); + return *this; + } + inline IPLDLink& operator=(IPLDLink&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 IPLDLink& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const IPLDLink* internal_default_instance() { + return reinterpret_cast( + &_IPLDLink_default_instance_); + } + static constexpr int kIndexInFileMessages = + 16; + + friend void swap(IPLDLink& a, IPLDLink& b) { + a.Swap(&b); + } + inline void Swap(IPLDLink* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline IPLDLink* New() const final { + return CreateMaybeMessage(nullptr); + } + + IPLDLink* 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 IPLDLink& from); + void MergeFrom(const IPLDLink& 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(IPLDLink* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.IPLDLink"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kHashFieldNumber = 1, + kNameFieldNumber = 2, + kSizeFieldNumber = 3, + }; + // bytes hash = 1; + void clear_hash(); + const std::string& hash() const; + void set_hash(const std::string& value); + void set_hash(std::string&& value); + void set_hash(const char* value); + void set_hash(const void* value, size_t size); + std::string* mutable_hash(); + std::string* release_hash(); + void set_allocated_hash(std::string* hash); + private: + const std::string& _internal_hash() const; + void _internal_set_hash(const std::string& value); + std::string* _internal_mutable_hash(); + public: + + // string name = 2; + void clear_name(); + const std::string& name() const; + void set_name(const std::string& value); + void set_name(std::string&& value); + void set_name(const char* value); + void set_name(const char* value, size_t size); + std::string* mutable_name(); + std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // uint64 size = 3; + void clear_size(); + ::PROTOBUF_NAMESPACE_ID::uint64 size() const; + void set_size(::PROTOBUF_NAMESPACE_ID::uint64 value); + private: + ::PROTOBUF_NAMESPACE_ID::uint64 _internal_size() const; + void _internal_set_size(::PROTOBUF_NAMESPACE_ID::uint64 value); + public: + + // @@protoc_insertion_point(class_scope:pb.IPLDLink) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr hash_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::uint64 size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class IPLDNode : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.IPLDNode) */ { + public: + IPLDNode(); + virtual ~IPLDNode(); + + IPLDNode(const IPLDNode& from); + IPLDNode(IPLDNode&& from) noexcept + : IPLDNode() { + *this = ::std::move(from); + } + + inline IPLDNode& operator=(const IPLDNode& from) { + CopyFrom(from); + return *this; + } + inline IPLDNode& operator=(IPLDNode&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 IPLDNode& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const IPLDNode* internal_default_instance() { + return reinterpret_cast( + &_IPLDNode_default_instance_); + } + static constexpr int kIndexInFileMessages = + 17; + + friend void swap(IPLDNode& a, IPLDNode& b) { + a.Swap(&b); + } + inline void Swap(IPLDNode* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline IPLDNode* New() const final { + return CreateMaybeMessage(nullptr); + } + + IPLDNode* 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 IPLDNode& from); + void MergeFrom(const IPLDNode& 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(IPLDNode* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.IPLDNode"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kLinksFieldNumber = 2, + kDataFieldNumber = 1, + }; + // repeated .pb.IPLDLink links = 2; + int links_size() const; + private: + int _internal_links_size() const; + public: + void clear_links(); + ::pb::IPLDLink* mutable_links(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::IPLDLink >* + mutable_links(); + private: + const ::pb::IPLDLink& _internal_links(int index) const; + ::pb::IPLDLink* _internal_add_links(); + public: + const ::pb::IPLDLink& links(int index) const; + ::pb::IPLDLink* add_links(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::IPLDLink >& + links() const; + + // bytes data = 1; + void clear_data(); + const std::string& data() const; + void set_data(const std::string& value); + void set_data(std::string&& value); + void set_data(const char* value); + void set_data(const void* value, size_t size); + std::string* mutable_data(); + std::string* release_data(); + void set_allocated_data(std::string* data); + private: + const std::string& _internal_data() const; + void _internal_set_data(const std::string& value); + std::string* _internal_mutable_data(); + public: + + // @@protoc_insertion_point(class_scope:pb.IPLDNode) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::IPLDLink > links_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class KeystoreRequest : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.KeystoreRequest) */ { + public: + KeystoreRequest(); + virtual ~KeystoreRequest(); + + KeystoreRequest(const KeystoreRequest& from); + KeystoreRequest(KeystoreRequest&& from) noexcept + : KeystoreRequest() { + *this = ::std::move(from); + } + + inline KeystoreRequest& operator=(const KeystoreRequest& from) { + CopyFrom(from); + return *this; + } + inline KeystoreRequest& operator=(KeystoreRequest&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 KeystoreRequest& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const KeystoreRequest* internal_default_instance() { + return reinterpret_cast( + &_KeystoreRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 18; + + friend void swap(KeystoreRequest& a, KeystoreRequest& b) { + a.Swap(&b); + } + inline void Swap(KeystoreRequest* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline KeystoreRequest* New() const final { + return CreateMaybeMessage(nullptr); + } + + KeystoreRequest* 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 KeystoreRequest& from); + void MergeFrom(const KeystoreRequest& 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(KeystoreRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.KeystoreRequest"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 2, + kPrivateKeyFieldNumber = 3, + kRequestTypeFieldNumber = 1, + }; + // string name = 2; + void clear_name(); + const std::string& name() const; + void set_name(const std::string& value); + void set_name(std::string&& value); + void set_name(const char* value); + void set_name(const char* value, size_t size); + std::string* mutable_name(); + std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // bytes privateKey = 3; + void clear_privatekey(); + const std::string& privatekey() const; + void set_privatekey(const std::string& value); + void set_privatekey(std::string&& value); + void set_privatekey(const char* value); + void set_privatekey(const void* value, size_t size); + std::string* mutable_privatekey(); + std::string* release_privatekey(); + void set_allocated_privatekey(std::string* privatekey); + private: + const std::string& _internal_privatekey() const; + void _internal_set_privatekey(const std::string& value); + std::string* _internal_mutable_privatekey(); + public: + + // .pb.KSREQTYPE requestType = 1; + void clear_requesttype(); + ::pb::KSREQTYPE requesttype() const; + void set_requesttype(::pb::KSREQTYPE value); + private: + ::pb::KSREQTYPE _internal_requesttype() const; + void _internal_set_requesttype(::pb::KSREQTYPE value); + public: + + // @@protoc_insertion_point(class_scope:pb.KeystoreRequest) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr privatekey_; + int requesttype_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class KeystoreResponse : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.KeystoreResponse) */ { + public: + KeystoreResponse(); + virtual ~KeystoreResponse(); + + KeystoreResponse(const KeystoreResponse& from); + KeystoreResponse(KeystoreResponse&& from) noexcept + : KeystoreResponse() { + *this = ::std::move(from); + } + + inline KeystoreResponse& operator=(const KeystoreResponse& from) { + CopyFrom(from); + return *this; + } + inline KeystoreResponse& operator=(KeystoreResponse&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 KeystoreResponse& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const KeystoreResponse* internal_default_instance() { + return reinterpret_cast( + &_KeystoreResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 19; + + friend void swap(KeystoreResponse& a, KeystoreResponse& b) { + a.Swap(&b); + } + inline void Swap(KeystoreResponse* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline KeystoreResponse* New() const final { + return CreateMaybeMessage(nullptr); + } + + KeystoreResponse* 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 KeystoreResponse& from); + void MergeFrom(const KeystoreResponse& 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(KeystoreResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.KeystoreResponse"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kKeyNamesFieldNumber = 3, + kPrivateKeyFieldNumber = 2, + kRequestTypeFieldNumber = 1, + kHasFieldNumber = 4, + }; + // repeated string keyNames = 3; + int keynames_size() const; + private: + int _internal_keynames_size() const; + public: + void clear_keynames(); + const std::string& keynames(int index) const; + std::string* mutable_keynames(int index); + void set_keynames(int index, const std::string& value); + void set_keynames(int index, std::string&& value); + void set_keynames(int index, const char* value); + void set_keynames(int index, const char* value, size_t size); + std::string* add_keynames(); + void add_keynames(const std::string& value); + void add_keynames(std::string&& value); + void add_keynames(const char* value); + void add_keynames(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& keynames() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_keynames(); + private: + const std::string& _internal_keynames(int index) const; + std::string* _internal_add_keynames(); + public: + + // bytes privateKey = 2; + void clear_privatekey(); + const std::string& privatekey() const; + void set_privatekey(const std::string& value); + void set_privatekey(std::string&& value); + void set_privatekey(const char* value); + void set_privatekey(const void* value, size_t size); + std::string* mutable_privatekey(); + std::string* release_privatekey(); + void set_allocated_privatekey(std::string* privatekey); + private: + const std::string& _internal_privatekey() const; + void _internal_set_privatekey(const std::string& value); + std::string* _internal_mutable_privatekey(); + public: + + // .pb.KSREQTYPE requestType = 1; + void clear_requesttype(); + ::pb::KSREQTYPE requesttype() const; + void set_requesttype(::pb::KSREQTYPE value); + private: + ::pb::KSREQTYPE _internal_requesttype() const; + void _internal_set_requesttype(::pb::KSREQTYPE value); + public: + + // bool has = 4; + void clear_has(); + bool has() const; + void set_has(bool value); + private: + bool _internal_has() const; + void _internal_set_has(bool value); + public: + + // @@protoc_insertion_point(class_scope:pb.KeystoreResponse) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField keynames_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr privatekey_; + int requesttype_; + bool has_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class PersistRequest : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.PersistRequest) */ { + public: + PersistRequest(); + virtual ~PersistRequest(); + + PersistRequest(const PersistRequest& from); + PersistRequest(PersistRequest&& from) noexcept + : PersistRequest() { + *this = ::std::move(from); + } + + inline PersistRequest& operator=(const PersistRequest& from) { + CopyFrom(from); + return *this; + } + inline PersistRequest& operator=(PersistRequest&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 PersistRequest& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const PersistRequest* internal_default_instance() { + return reinterpret_cast( + &_PersistRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 20; + + friend void swap(PersistRequest& a, PersistRequest& b) { + a.Swap(&b); + } + inline void Swap(PersistRequest* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline PersistRequest* New() const final { + return CreateMaybeMessage(nullptr); + } + + PersistRequest* 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 PersistRequest& from); + void MergeFrom(const PersistRequest& 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(PersistRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.PersistRequest"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kCidsFieldNumber = 1, + }; + // repeated string cids = 1; + int cids_size() const; + private: + int _internal_cids_size() const; + public: + void clear_cids(); + const std::string& cids(int index) const; + std::string* mutable_cids(int index); + void set_cids(int index, const std::string& value); + void set_cids(int index, std::string&& value); + void set_cids(int index, const char* value); + void set_cids(int index, const char* value, size_t size); + std::string* add_cids(); + void add_cids(const std::string& value); + void add_cids(std::string&& value); + void add_cids(const char* value); + void add_cids(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& cids() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_cids(); + private: + const std::string& _internal_cids(int index) const; + std::string* _internal_add_cids(); + public: + + // @@protoc_insertion_point(class_scope:pb.PersistRequest) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField cids_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class PersistResponse_StatusEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + PersistResponse_StatusEntry_DoNotUse(); + PersistResponse_StatusEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const PersistResponse_StatusEntry_DoNotUse& other); + static const PersistResponse_StatusEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_PersistResponse_StatusEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "pb.PersistResponse.StatusEntry.key"); + } + static bool ValidateValue(void*) { return true; } + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& other) final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[21]; + } + + public: +}; + +// ------------------------------------------------------------------- + +class PersistResponse_ErrorsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + PersistResponse_ErrorsEntry_DoNotUse(); + PersistResponse_ErrorsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const PersistResponse_ErrorsEntry_DoNotUse& other); + static const PersistResponse_ErrorsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_PersistResponse_ErrorsEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "pb.PersistResponse.ErrorsEntry.key"); + } + static bool ValidateValue(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "pb.PersistResponse.ErrorsEntry.value"); + } + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& other) final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[22]; + } + + public: +}; + +// ------------------------------------------------------------------- + +class PersistResponse : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.PersistResponse) */ { + public: + PersistResponse(); + virtual ~PersistResponse(); + + PersistResponse(const PersistResponse& from); + PersistResponse(PersistResponse&& from) noexcept + : PersistResponse() { + *this = ::std::move(from); + } + + inline PersistResponse& operator=(const PersistResponse& from) { + CopyFrom(from); + return *this; + } + inline PersistResponse& operator=(PersistResponse&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 PersistResponse& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const PersistResponse* internal_default_instance() { + return reinterpret_cast( + &_PersistResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 23; + + friend void swap(PersistResponse& a, PersistResponse& b) { + a.Swap(&b); + } + inline void Swap(PersistResponse* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline PersistResponse* New() const final { + return CreateMaybeMessage(nullptr); + } + + PersistResponse* 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 PersistResponse& from); + void MergeFrom(const PersistResponse& 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(PersistResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.PersistResponse"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kStatusFieldNumber = 1, + kErrorsFieldNumber = 2, + }; + // map status = 1; + int status_size() const; + private: + int _internal_status_size() const; + public: + void clear_status(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >& + _internal_status() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >* + _internal_mutable_status(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >& + status() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >* + mutable_status(); + + // map errors = 2; + int errors_size() const; + private: + int _internal_errors_size() const; + public: + void clear_errors(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + _internal_errors() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + _internal_mutable_errors(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + errors() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + mutable_errors(); + + // @@protoc_insertion_point(class_scope:pb.PersistResponse) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + PersistResponse_StatusEntry_DoNotUse, + std::string, bool, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL, + 0 > status_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + PersistResponse_ErrorsEntry_DoNotUse, + std::string, std::string, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + 0 > errors_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// P2PRequest + +// .pb.P2PREQTYPE requestType = 1; +inline void P2PRequest::clear_requesttype() { + requesttype_ = 0; +} +inline ::pb::P2PREQTYPE P2PRequest::_internal_requesttype() const { + return static_cast< ::pb::P2PREQTYPE >(requesttype_); +} +inline ::pb::P2PREQTYPE P2PRequest::requesttype() const { + // @@protoc_insertion_point(field_get:pb.P2PRequest.requestType) + return _internal_requesttype(); +} +inline void P2PRequest::_internal_set_requesttype(::pb::P2PREQTYPE value) { + + requesttype_ = value; +} +inline void P2PRequest::set_requesttype(::pb::P2PREQTYPE value) { + _internal_set_requesttype(value); + // @@protoc_insertion_point(field_set:pb.P2PRequest.requestType) +} + +// bool all = 2; +inline void P2PRequest::clear_all() { + all_ = false; +} +inline bool P2PRequest::_internal_all() const { + return all_; +} +inline bool P2PRequest::all() const { + // @@protoc_insertion_point(field_get:pb.P2PRequest.all) + return _internal_all(); +} +inline void P2PRequest::_internal_set_all(bool value) { + + all_ = value; +} +inline void P2PRequest::set_all(bool value) { + _internal_set_all(value); + // @@protoc_insertion_point(field_set:pb.P2PRequest.all) +} + +// bool verbose = 3; +inline void P2PRequest::clear_verbose() { + verbose_ = false; +} +inline bool P2PRequest::_internal_verbose() const { + return verbose_; +} +inline bool P2PRequest::verbose() const { + // @@protoc_insertion_point(field_get:pb.P2PRequest.verbose) + return _internal_verbose(); +} +inline void P2PRequest::_internal_set_verbose(bool value) { + + verbose_ = value; +} +inline void P2PRequest::set_verbose(bool value) { + _internal_set_verbose(value); + // @@protoc_insertion_point(field_set:pb.P2PRequest.verbose) +} + +// string protocolName = 4; +inline void P2PRequest::clear_protocolname() { + protocolname_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& P2PRequest::protocolname() const { + // @@protoc_insertion_point(field_get:pb.P2PRequest.protocolName) + return _internal_protocolname(); +} +inline void P2PRequest::set_protocolname(const std::string& value) { + _internal_set_protocolname(value); + // @@protoc_insertion_point(field_set:pb.P2PRequest.protocolName) +} +inline std::string* P2PRequest::mutable_protocolname() { + // @@protoc_insertion_point(field_mutable:pb.P2PRequest.protocolName) + return _internal_mutable_protocolname(); +} +inline const std::string& P2PRequest::_internal_protocolname() const { + return protocolname_.GetNoArena(); +} +inline void P2PRequest::_internal_set_protocolname(const std::string& value) { + + protocolname_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void P2PRequest::set_protocolname(std::string&& value) { + + protocolname_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.P2PRequest.protocolName) +} +inline void P2PRequest::set_protocolname(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + protocolname_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.P2PRequest.protocolName) +} +inline void P2PRequest::set_protocolname(const char* value, size_t size) { + + protocolname_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.P2PRequest.protocolName) +} +inline std::string* P2PRequest::_internal_mutable_protocolname() { + + return protocolname_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* P2PRequest::release_protocolname() { + // @@protoc_insertion_point(field_release:pb.P2PRequest.protocolName) + + return protocolname_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void P2PRequest::set_allocated_protocolname(std::string* protocolname) { + if (protocolname != nullptr) { + + } else { + + } + protocolname_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), protocolname); + // @@protoc_insertion_point(field_set_allocated:pb.P2PRequest.protocolName) +} + +// string listenAddress = 5; +inline void P2PRequest::clear_listenaddress() { + listenaddress_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& P2PRequest::listenaddress() const { + // @@protoc_insertion_point(field_get:pb.P2PRequest.listenAddress) + return _internal_listenaddress(); +} +inline void P2PRequest::set_listenaddress(const std::string& value) { + _internal_set_listenaddress(value); + // @@protoc_insertion_point(field_set:pb.P2PRequest.listenAddress) +} +inline std::string* P2PRequest::mutable_listenaddress() { + // @@protoc_insertion_point(field_mutable:pb.P2PRequest.listenAddress) + return _internal_mutable_listenaddress(); +} +inline const std::string& P2PRequest::_internal_listenaddress() const { + return listenaddress_.GetNoArena(); +} +inline void P2PRequest::_internal_set_listenaddress(const std::string& value) { + + listenaddress_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void P2PRequest::set_listenaddress(std::string&& value) { + + listenaddress_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.P2PRequest.listenAddress) +} +inline void P2PRequest::set_listenaddress(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + listenaddress_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.P2PRequest.listenAddress) +} +inline void P2PRequest::set_listenaddress(const char* value, size_t size) { + + listenaddress_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.P2PRequest.listenAddress) +} +inline std::string* P2PRequest::_internal_mutable_listenaddress() { + + return listenaddress_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* P2PRequest::release_listenaddress() { + // @@protoc_insertion_point(field_release:pb.P2PRequest.listenAddress) + + return listenaddress_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void P2PRequest::set_allocated_listenaddress(std::string* listenaddress) { + if (listenaddress != nullptr) { + + } else { + + } + listenaddress_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), listenaddress); + // @@protoc_insertion_point(field_set_allocated:pb.P2PRequest.listenAddress) +} + +// string targetAddress = 6; +inline void P2PRequest::clear_targetaddress() { + targetaddress_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& P2PRequest::targetaddress() const { + // @@protoc_insertion_point(field_get:pb.P2PRequest.targetAddress) + return _internal_targetaddress(); +} +inline void P2PRequest::set_targetaddress(const std::string& value) { + _internal_set_targetaddress(value); + // @@protoc_insertion_point(field_set:pb.P2PRequest.targetAddress) +} +inline std::string* P2PRequest::mutable_targetaddress() { + // @@protoc_insertion_point(field_mutable:pb.P2PRequest.targetAddress) + return _internal_mutable_targetaddress(); +} +inline const std::string& P2PRequest::_internal_targetaddress() const { + return targetaddress_.GetNoArena(); +} +inline void P2PRequest::_internal_set_targetaddress(const std::string& value) { + + targetaddress_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void P2PRequest::set_targetaddress(std::string&& value) { + + targetaddress_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.P2PRequest.targetAddress) +} +inline void P2PRequest::set_targetaddress(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + targetaddress_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.P2PRequest.targetAddress) +} +inline void P2PRequest::set_targetaddress(const char* value, size_t size) { + + targetaddress_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.P2PRequest.targetAddress) +} +inline std::string* P2PRequest::_internal_mutable_targetaddress() { + + return targetaddress_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* P2PRequest::release_targetaddress() { + // @@protoc_insertion_point(field_release:pb.P2PRequest.targetAddress) + + return targetaddress_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void P2PRequest::set_allocated_targetaddress(std::string* targetaddress) { + if (targetaddress != nullptr) { + + } else { + + } + targetaddress_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), targetaddress); + // @@protoc_insertion_point(field_set_allocated:pb.P2PRequest.targetAddress) +} + +// string remoteAddress = 7; +inline void P2PRequest::clear_remoteaddress() { + remoteaddress_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& P2PRequest::remoteaddress() const { + // @@protoc_insertion_point(field_get:pb.P2PRequest.remoteAddress) + return _internal_remoteaddress(); +} +inline void P2PRequest::set_remoteaddress(const std::string& value) { + _internal_set_remoteaddress(value); + // @@protoc_insertion_point(field_set:pb.P2PRequest.remoteAddress) +} +inline std::string* P2PRequest::mutable_remoteaddress() { + // @@protoc_insertion_point(field_mutable:pb.P2PRequest.remoteAddress) + return _internal_mutable_remoteaddress(); +} +inline const std::string& P2PRequest::_internal_remoteaddress() const { + return remoteaddress_.GetNoArena(); +} +inline void P2PRequest::_internal_set_remoteaddress(const std::string& value) { + + remoteaddress_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void P2PRequest::set_remoteaddress(std::string&& value) { + + remoteaddress_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.P2PRequest.remoteAddress) +} +inline void P2PRequest::set_remoteaddress(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + remoteaddress_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.P2PRequest.remoteAddress) +} +inline void P2PRequest::set_remoteaddress(const char* value, size_t size) { + + remoteaddress_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.P2PRequest.remoteAddress) +} +inline std::string* P2PRequest::_internal_mutable_remoteaddress() { + + return remoteaddress_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* P2PRequest::release_remoteaddress() { + // @@protoc_insertion_point(field_release:pb.P2PRequest.remoteAddress) + + return remoteaddress_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void P2PRequest::set_allocated_remoteaddress(std::string* remoteaddress) { + if (remoteaddress != nullptr) { + + } else { + + } + remoteaddress_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), remoteaddress); + // @@protoc_insertion_point(field_set_allocated:pb.P2PRequest.remoteAddress) +} + +// bool allowCustomProtocols = 8; +inline void P2PRequest::clear_allowcustomprotocols() { + allowcustomprotocols_ = false; +} +inline bool P2PRequest::_internal_allowcustomprotocols() const { + return allowcustomprotocols_; +} +inline bool P2PRequest::allowcustomprotocols() const { + // @@protoc_insertion_point(field_get:pb.P2PRequest.allowCustomProtocols) + return _internal_allowcustomprotocols(); +} +inline void P2PRequest::_internal_set_allowcustomprotocols(bool value) { + + allowcustomprotocols_ = value; +} +inline void P2PRequest::set_allowcustomprotocols(bool value) { + _internal_set_allowcustomprotocols(value); + // @@protoc_insertion_point(field_set:pb.P2PRequest.allowCustomProtocols) +} + +// bool reportPeerID = 9; +inline void P2PRequest::clear_reportpeerid() { + reportpeerid_ = false; +} +inline bool P2PRequest::_internal_reportpeerid() const { + return reportpeerid_; +} +inline bool P2PRequest::reportpeerid() const { + // @@protoc_insertion_point(field_get:pb.P2PRequest.reportPeerID) + return _internal_reportpeerid(); +} +inline void P2PRequest::_internal_set_reportpeerid(bool value) { + + reportpeerid_ = value; +} +inline void P2PRequest::set_reportpeerid(bool value) { + _internal_set_reportpeerid(value); + // @@protoc_insertion_point(field_set:pb.P2PRequest.reportPeerID) +} + +// ------------------------------------------------------------------- + +// P2PResponse + +// .pb.P2PREQTYPE requestType = 1; +inline void P2PResponse::clear_requesttype() { + requesttype_ = 0; +} +inline ::pb::P2PREQTYPE P2PResponse::_internal_requesttype() const { + return static_cast< ::pb::P2PREQTYPE >(requesttype_); +} +inline ::pb::P2PREQTYPE P2PResponse::requesttype() const { + // @@protoc_insertion_point(field_get:pb.P2PResponse.requestType) + return _internal_requesttype(); +} +inline void P2PResponse::_internal_set_requesttype(::pb::P2PREQTYPE value) { + + requesttype_ = value; +} +inline void P2PResponse::set_requesttype(::pb::P2PREQTYPE value) { + _internal_set_requesttype(value); + // @@protoc_insertion_point(field_set:pb.P2PResponse.requestType) +} + +// repeated string names = 2; +inline int P2PResponse::_internal_names_size() const { + return names_.size(); +} +inline int P2PResponse::names_size() const { + return _internal_names_size(); +} +inline void P2PResponse::clear_names() { + names_.Clear(); +} +inline std::string* P2PResponse::add_names() { + // @@protoc_insertion_point(field_add_mutable:pb.P2PResponse.names) + return _internal_add_names(); +} +inline const std::string& P2PResponse::_internal_names(int index) const { + return names_.Get(index); +} +inline const std::string& P2PResponse::names(int index) const { + // @@protoc_insertion_point(field_get:pb.P2PResponse.names) + return _internal_names(index); +} +inline std::string* P2PResponse::mutable_names(int index) { + // @@protoc_insertion_point(field_mutable:pb.P2PResponse.names) + return names_.Mutable(index); +} +inline void P2PResponse::set_names(int index, const std::string& value) { + // @@protoc_insertion_point(field_set:pb.P2PResponse.names) + names_.Mutable(index)->assign(value); +} +inline void P2PResponse::set_names(int index, std::string&& value) { + // @@protoc_insertion_point(field_set:pb.P2PResponse.names) + names_.Mutable(index)->assign(std::move(value)); +} +inline void P2PResponse::set_names(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + names_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:pb.P2PResponse.names) +} +inline void P2PResponse::set_names(int index, const char* value, size_t size) { + names_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:pb.P2PResponse.names) +} +inline std::string* P2PResponse::_internal_add_names() { + return names_.Add(); +} +inline void P2PResponse::add_names(const std::string& value) { + names_.Add()->assign(value); + // @@protoc_insertion_point(field_add:pb.P2PResponse.names) +} +inline void P2PResponse::add_names(std::string&& value) { + names_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:pb.P2PResponse.names) +} +inline void P2PResponse::add_names(const char* value) { + GOOGLE_DCHECK(value != nullptr); + names_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:pb.P2PResponse.names) +} +inline void P2PResponse::add_names(const char* value, size_t size) { + names_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:pb.P2PResponse.names) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +P2PResponse::names() const { + // @@protoc_insertion_point(field_list:pb.P2PResponse.names) + return names_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +P2PResponse::mutable_names() { + // @@protoc_insertion_point(field_mutable_list:pb.P2PResponse.names) + return &names_; +} + +// int32 connsClosed = 3; +inline void P2PResponse::clear_connsclosed() { + connsclosed_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 P2PResponse::_internal_connsclosed() const { + return connsclosed_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 P2PResponse::connsclosed() const { + // @@protoc_insertion_point(field_get:pb.P2PResponse.connsClosed) + return _internal_connsclosed(); +} +inline void P2PResponse::_internal_set_connsclosed(::PROTOBUF_NAMESPACE_ID::int32 value) { + + connsclosed_ = value; +} +inline void P2PResponse::set_connsclosed(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_connsclosed(value); + // @@protoc_insertion_point(field_set:pb.P2PResponse.connsClosed) +} + +// repeated .pb.P2PLsInfo streamInfos = 4; +inline int P2PResponse::_internal_streaminfos_size() const { + return streaminfos_.size(); +} +inline int P2PResponse::streaminfos_size() const { + return _internal_streaminfos_size(); +} +inline void P2PResponse::clear_streaminfos() { + streaminfos_.Clear(); +} +inline ::pb::P2PLsInfo* P2PResponse::mutable_streaminfos(int index) { + // @@protoc_insertion_point(field_mutable:pb.P2PResponse.streamInfos) + return streaminfos_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::P2PLsInfo >* +P2PResponse::mutable_streaminfos() { + // @@protoc_insertion_point(field_mutable_list:pb.P2PResponse.streamInfos) + return &streaminfos_; +} +inline const ::pb::P2PLsInfo& P2PResponse::_internal_streaminfos(int index) const { + return streaminfos_.Get(index); +} +inline const ::pb::P2PLsInfo& P2PResponse::streaminfos(int index) const { + // @@protoc_insertion_point(field_get:pb.P2PResponse.streamInfos) + return _internal_streaminfos(index); +} +inline ::pb::P2PLsInfo* P2PResponse::_internal_add_streaminfos() { + return streaminfos_.Add(); +} +inline ::pb::P2PLsInfo* P2PResponse::add_streaminfos() { + // @@protoc_insertion_point(field_add:pb.P2PResponse.streamInfos) + return _internal_add_streaminfos(); +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::P2PLsInfo >& +P2PResponse::streaminfos() const { + // @@protoc_insertion_point(field_list:pb.P2PResponse.streamInfos) + return streaminfos_; +} + +// ------------------------------------------------------------------- + +// P2PLsInfo + +// string protocolName = 1; +inline void P2PLsInfo::clear_protocolname() { + protocolname_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& P2PLsInfo::protocolname() const { + // @@protoc_insertion_point(field_get:pb.P2PLsInfo.protocolName) + return _internal_protocolname(); +} +inline void P2PLsInfo::set_protocolname(const std::string& value) { + _internal_set_protocolname(value); + // @@protoc_insertion_point(field_set:pb.P2PLsInfo.protocolName) +} +inline std::string* P2PLsInfo::mutable_protocolname() { + // @@protoc_insertion_point(field_mutable:pb.P2PLsInfo.protocolName) + return _internal_mutable_protocolname(); +} +inline const std::string& P2PLsInfo::_internal_protocolname() const { + return protocolname_.GetNoArena(); +} +inline void P2PLsInfo::_internal_set_protocolname(const std::string& value) { + + protocolname_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void P2PLsInfo::set_protocolname(std::string&& value) { + + protocolname_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.P2PLsInfo.protocolName) +} +inline void P2PLsInfo::set_protocolname(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + protocolname_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.P2PLsInfo.protocolName) +} +inline void P2PLsInfo::set_protocolname(const char* value, size_t size) { + + protocolname_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.P2PLsInfo.protocolName) +} +inline std::string* P2PLsInfo::_internal_mutable_protocolname() { + + return protocolname_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* P2PLsInfo::release_protocolname() { + // @@protoc_insertion_point(field_release:pb.P2PLsInfo.protocolName) + + return protocolname_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void P2PLsInfo::set_allocated_protocolname(std::string* protocolname) { + if (protocolname != nullptr) { + + } else { + + } + protocolname_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), protocolname); + // @@protoc_insertion_point(field_set_allocated:pb.P2PLsInfo.protocolName) +} + +// string listenAddress = 2; +inline void P2PLsInfo::clear_listenaddress() { + listenaddress_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& P2PLsInfo::listenaddress() const { + // @@protoc_insertion_point(field_get:pb.P2PLsInfo.listenAddress) + return _internal_listenaddress(); +} +inline void P2PLsInfo::set_listenaddress(const std::string& value) { + _internal_set_listenaddress(value); + // @@protoc_insertion_point(field_set:pb.P2PLsInfo.listenAddress) +} +inline std::string* P2PLsInfo::mutable_listenaddress() { + // @@protoc_insertion_point(field_mutable:pb.P2PLsInfo.listenAddress) + return _internal_mutable_listenaddress(); +} +inline const std::string& P2PLsInfo::_internal_listenaddress() const { + return listenaddress_.GetNoArena(); +} +inline void P2PLsInfo::_internal_set_listenaddress(const std::string& value) { + + listenaddress_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void P2PLsInfo::set_listenaddress(std::string&& value) { + + listenaddress_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.P2PLsInfo.listenAddress) +} +inline void P2PLsInfo::set_listenaddress(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + listenaddress_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.P2PLsInfo.listenAddress) +} +inline void P2PLsInfo::set_listenaddress(const char* value, size_t size) { + + listenaddress_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.P2PLsInfo.listenAddress) +} +inline std::string* P2PLsInfo::_internal_mutable_listenaddress() { + + return listenaddress_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* P2PLsInfo::release_listenaddress() { + // @@protoc_insertion_point(field_release:pb.P2PLsInfo.listenAddress) + + return listenaddress_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void P2PLsInfo::set_allocated_listenaddress(std::string* listenaddress) { + if (listenaddress != nullptr) { + + } else { + + } + listenaddress_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), listenaddress); + // @@protoc_insertion_point(field_set_allocated:pb.P2PLsInfo.listenAddress) +} + +// string targetAddress = 3; +inline void P2PLsInfo::clear_targetaddress() { + targetaddress_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& P2PLsInfo::targetaddress() const { + // @@protoc_insertion_point(field_get:pb.P2PLsInfo.targetAddress) + return _internal_targetaddress(); +} +inline void P2PLsInfo::set_targetaddress(const std::string& value) { + _internal_set_targetaddress(value); + // @@protoc_insertion_point(field_set:pb.P2PLsInfo.targetAddress) +} +inline std::string* P2PLsInfo::mutable_targetaddress() { + // @@protoc_insertion_point(field_mutable:pb.P2PLsInfo.targetAddress) + return _internal_mutable_targetaddress(); +} +inline const std::string& P2PLsInfo::_internal_targetaddress() const { + return targetaddress_.GetNoArena(); +} +inline void P2PLsInfo::_internal_set_targetaddress(const std::string& value) { + + targetaddress_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void P2PLsInfo::set_targetaddress(std::string&& value) { + + targetaddress_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.P2PLsInfo.targetAddress) +} +inline void P2PLsInfo::set_targetaddress(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + targetaddress_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.P2PLsInfo.targetAddress) +} +inline void P2PLsInfo::set_targetaddress(const char* value, size_t size) { + + targetaddress_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.P2PLsInfo.targetAddress) +} +inline std::string* P2PLsInfo::_internal_mutable_targetaddress() { + + return targetaddress_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* P2PLsInfo::release_targetaddress() { + // @@protoc_insertion_point(field_release:pb.P2PLsInfo.targetAddress) + + return targetaddress_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void P2PLsInfo::set_allocated_targetaddress(std::string* targetaddress) { + if (targetaddress != nullptr) { + + } else { + + } + targetaddress_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), targetaddress); + // @@protoc_insertion_point(field_set_allocated:pb.P2PLsInfo.targetAddress) +} + +// bool local = 4; +inline void P2PLsInfo::clear_local() { + local_ = false; +} +inline bool P2PLsInfo::_internal_local() const { + return local_; +} +inline bool P2PLsInfo::local() const { + // @@protoc_insertion_point(field_get:pb.P2PLsInfo.local) + return _internal_local(); +} +inline void P2PLsInfo::_internal_set_local(bool value) { + + local_ = value; +} +inline void P2PLsInfo::set_local(bool value) { + _internal_set_local(value); + // @@protoc_insertion_point(field_set:pb.P2PLsInfo.local) +} + +// ------------------------------------------------------------------- + +// GetPeersResponse + +// repeated string peerIDs = 1; +inline int GetPeersResponse::_internal_peerids_size() const { + return peerids_.size(); +} +inline int GetPeersResponse::peerids_size() const { + return _internal_peerids_size(); +} +inline void GetPeersResponse::clear_peerids() { + peerids_.Clear(); +} +inline std::string* GetPeersResponse::add_peerids() { + // @@protoc_insertion_point(field_add_mutable:pb.GetPeersResponse.peerIDs) + return _internal_add_peerids(); +} +inline const std::string& GetPeersResponse::_internal_peerids(int index) const { + return peerids_.Get(index); +} +inline const std::string& GetPeersResponse::peerids(int index) const { + // @@protoc_insertion_point(field_get:pb.GetPeersResponse.peerIDs) + return _internal_peerids(index); +} +inline std::string* GetPeersResponse::mutable_peerids(int index) { + // @@protoc_insertion_point(field_mutable:pb.GetPeersResponse.peerIDs) + return peerids_.Mutable(index); +} +inline void GetPeersResponse::set_peerids(int index, const std::string& value) { + // @@protoc_insertion_point(field_set:pb.GetPeersResponse.peerIDs) + peerids_.Mutable(index)->assign(value); +} +inline void GetPeersResponse::set_peerids(int index, std::string&& value) { + // @@protoc_insertion_point(field_set:pb.GetPeersResponse.peerIDs) + peerids_.Mutable(index)->assign(std::move(value)); +} +inline void GetPeersResponse::set_peerids(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + peerids_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:pb.GetPeersResponse.peerIDs) +} +inline void GetPeersResponse::set_peerids(int index, const char* value, size_t size) { + peerids_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:pb.GetPeersResponse.peerIDs) +} +inline std::string* GetPeersResponse::_internal_add_peerids() { + return peerids_.Add(); +} +inline void GetPeersResponse::add_peerids(const std::string& value) { + peerids_.Add()->assign(value); + // @@protoc_insertion_point(field_add:pb.GetPeersResponse.peerIDs) +} +inline void GetPeersResponse::add_peerids(std::string&& value) { + peerids_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:pb.GetPeersResponse.peerIDs) +} +inline void GetPeersResponse::add_peerids(const char* value) { + GOOGLE_DCHECK(value != nullptr); + peerids_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:pb.GetPeersResponse.peerIDs) +} +inline void GetPeersResponse::add_peerids(const char* value, size_t size) { + peerids_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:pb.GetPeersResponse.peerIDs) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +GetPeersResponse::peerids() const { + // @@protoc_insertion_point(field_list:pb.GetPeersResponse.peerIDs) + return peerids_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +GetPeersResponse::mutable_peerids() { + // @@protoc_insertion_point(field_mutable_list:pb.GetPeersResponse.peerIDs) + return &peerids_; +} + +// ------------------------------------------------------------------- + +// ConnMgmtRequest + +// .pb.CONNMGMTREQTYPE requestType = 1; +inline void ConnMgmtRequest::clear_requesttype() { + requesttype_ = 0; +} +inline ::pb::CONNMGMTREQTYPE ConnMgmtRequest::_internal_requesttype() const { + return static_cast< ::pb::CONNMGMTREQTYPE >(requesttype_); +} +inline ::pb::CONNMGMTREQTYPE ConnMgmtRequest::requesttype() const { + // @@protoc_insertion_point(field_get:pb.ConnMgmtRequest.requestType) + return _internal_requesttype(); +} +inline void ConnMgmtRequest::_internal_set_requesttype(::pb::CONNMGMTREQTYPE value) { + + requesttype_ = value; +} +inline void ConnMgmtRequest::set_requesttype(::pb::CONNMGMTREQTYPE value) { + _internal_set_requesttype(value); + // @@protoc_insertion_point(field_set:pb.ConnMgmtRequest.requestType) +} + +// repeated string multiAddrs = 2; +inline int ConnMgmtRequest::_internal_multiaddrs_size() const { + return multiaddrs_.size(); +} +inline int ConnMgmtRequest::multiaddrs_size() const { + return _internal_multiaddrs_size(); +} +inline void ConnMgmtRequest::clear_multiaddrs() { + multiaddrs_.Clear(); +} +inline std::string* ConnMgmtRequest::add_multiaddrs() { + // @@protoc_insertion_point(field_add_mutable:pb.ConnMgmtRequest.multiAddrs) + return _internal_add_multiaddrs(); +} +inline const std::string& ConnMgmtRequest::_internal_multiaddrs(int index) const { + return multiaddrs_.Get(index); +} +inline const std::string& ConnMgmtRequest::multiaddrs(int index) const { + // @@protoc_insertion_point(field_get:pb.ConnMgmtRequest.multiAddrs) + return _internal_multiaddrs(index); +} +inline std::string* ConnMgmtRequest::mutable_multiaddrs(int index) { + // @@protoc_insertion_point(field_mutable:pb.ConnMgmtRequest.multiAddrs) + return multiaddrs_.Mutable(index); +} +inline void ConnMgmtRequest::set_multiaddrs(int index, const std::string& value) { + // @@protoc_insertion_point(field_set:pb.ConnMgmtRequest.multiAddrs) + multiaddrs_.Mutable(index)->assign(value); +} +inline void ConnMgmtRequest::set_multiaddrs(int index, std::string&& value) { + // @@protoc_insertion_point(field_set:pb.ConnMgmtRequest.multiAddrs) + multiaddrs_.Mutable(index)->assign(std::move(value)); +} +inline void ConnMgmtRequest::set_multiaddrs(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + multiaddrs_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:pb.ConnMgmtRequest.multiAddrs) +} +inline void ConnMgmtRequest::set_multiaddrs(int index, const char* value, size_t size) { + multiaddrs_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:pb.ConnMgmtRequest.multiAddrs) +} +inline std::string* ConnMgmtRequest::_internal_add_multiaddrs() { + return multiaddrs_.Add(); +} +inline void ConnMgmtRequest::add_multiaddrs(const std::string& value) { + multiaddrs_.Add()->assign(value); + // @@protoc_insertion_point(field_add:pb.ConnMgmtRequest.multiAddrs) +} +inline void ConnMgmtRequest::add_multiaddrs(std::string&& value) { + multiaddrs_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:pb.ConnMgmtRequest.multiAddrs) +} +inline void ConnMgmtRequest::add_multiaddrs(const char* value) { + GOOGLE_DCHECK(value != nullptr); + multiaddrs_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:pb.ConnMgmtRequest.multiAddrs) +} +inline void ConnMgmtRequest::add_multiaddrs(const char* value, size_t size) { + multiaddrs_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:pb.ConnMgmtRequest.multiAddrs) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +ConnMgmtRequest::multiaddrs() const { + // @@protoc_insertion_point(field_list:pb.ConnMgmtRequest.multiAddrs) + return multiaddrs_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +ConnMgmtRequest::mutable_multiaddrs() { + // @@protoc_insertion_point(field_mutable_list:pb.ConnMgmtRequest.multiAddrs) + return &multiaddrs_; +} + +// repeated string peerIDs = 3; +inline int ConnMgmtRequest::_internal_peerids_size() const { + return peerids_.size(); +} +inline int ConnMgmtRequest::peerids_size() const { + return _internal_peerids_size(); +} +inline void ConnMgmtRequest::clear_peerids() { + peerids_.Clear(); +} +inline std::string* ConnMgmtRequest::add_peerids() { + // @@protoc_insertion_point(field_add_mutable:pb.ConnMgmtRequest.peerIDs) + return _internal_add_peerids(); +} +inline const std::string& ConnMgmtRequest::_internal_peerids(int index) const { + return peerids_.Get(index); +} +inline const std::string& ConnMgmtRequest::peerids(int index) const { + // @@protoc_insertion_point(field_get:pb.ConnMgmtRequest.peerIDs) + return _internal_peerids(index); +} +inline std::string* ConnMgmtRequest::mutable_peerids(int index) { + // @@protoc_insertion_point(field_mutable:pb.ConnMgmtRequest.peerIDs) + return peerids_.Mutable(index); +} +inline void ConnMgmtRequest::set_peerids(int index, const std::string& value) { + // @@protoc_insertion_point(field_set:pb.ConnMgmtRequest.peerIDs) + peerids_.Mutable(index)->assign(value); +} +inline void ConnMgmtRequest::set_peerids(int index, std::string&& value) { + // @@protoc_insertion_point(field_set:pb.ConnMgmtRequest.peerIDs) + peerids_.Mutable(index)->assign(std::move(value)); +} +inline void ConnMgmtRequest::set_peerids(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + peerids_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:pb.ConnMgmtRequest.peerIDs) +} +inline void ConnMgmtRequest::set_peerids(int index, const char* value, size_t size) { + peerids_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:pb.ConnMgmtRequest.peerIDs) +} +inline std::string* ConnMgmtRequest::_internal_add_peerids() { + return peerids_.Add(); +} +inline void ConnMgmtRequest::add_peerids(const std::string& value) { + peerids_.Add()->assign(value); + // @@protoc_insertion_point(field_add:pb.ConnMgmtRequest.peerIDs) +} +inline void ConnMgmtRequest::add_peerids(std::string&& value) { + peerids_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:pb.ConnMgmtRequest.peerIDs) +} +inline void ConnMgmtRequest::add_peerids(const char* value) { + GOOGLE_DCHECK(value != nullptr); + peerids_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:pb.ConnMgmtRequest.peerIDs) +} +inline void ConnMgmtRequest::add_peerids(const char* value, size_t size) { + peerids_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:pb.ConnMgmtRequest.peerIDs) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +ConnMgmtRequest::peerids() const { + // @@protoc_insertion_point(field_list:pb.ConnMgmtRequest.peerIDs) + return peerids_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +ConnMgmtRequest::mutable_peerids() { + // @@protoc_insertion_point(field_mutable_list:pb.ConnMgmtRequest.peerIDs) + return &peerids_; +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ConnMgmtResponse + +// .pb.CONNMGMTREQTYPE requestType = 1; +inline void ConnMgmtResponse::clear_requesttype() { + requesttype_ = 0; +} +inline ::pb::CONNMGMTREQTYPE ConnMgmtResponse::_internal_requesttype() const { + return static_cast< ::pb::CONNMGMTREQTYPE >(requesttype_); +} +inline ::pb::CONNMGMTREQTYPE ConnMgmtResponse::requesttype() const { + // @@protoc_insertion_point(field_get:pb.ConnMgmtResponse.requestType) + return _internal_requesttype(); +} +inline void ConnMgmtResponse::_internal_set_requesttype(::pb::CONNMGMTREQTYPE value) { + + requesttype_ = value; +} +inline void ConnMgmtResponse::set_requesttype(::pb::CONNMGMTREQTYPE value) { + _internal_set_requesttype(value); + // @@protoc_insertion_point(field_set:pb.ConnMgmtResponse.requestType) +} + +// map connected = 2; +inline int ConnMgmtResponse::_internal_connected_size() const { + return connected_.size(); +} +inline int ConnMgmtResponse::connected_size() const { + return _internal_connected_size(); +} +inline void ConnMgmtResponse::clear_connected() { + connected_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >& +ConnMgmtResponse::_internal_connected() const { + return connected_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >& +ConnMgmtResponse::connected() const { + // @@protoc_insertion_point(field_map:pb.ConnMgmtResponse.connected) + return _internal_connected(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >* +ConnMgmtResponse::_internal_mutable_connected() { + return connected_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >* +ConnMgmtResponse::mutable_connected() { + // @@protoc_insertion_point(field_mutable_map:pb.ConnMgmtResponse.connected) + return _internal_mutable_connected(); +} + +// map status = 3; +inline int ConnMgmtResponse::_internal_status_size() const { + return status_.size(); +} +inline int ConnMgmtResponse::status_size() const { + return _internal_status_size(); +} +inline void ConnMgmtResponse::clear_status() { + status_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::pb::ConnMgmtStatus >& +ConnMgmtResponse::_internal_status() const { + return status_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::pb::ConnMgmtStatus >& +ConnMgmtResponse::status() const { + // @@protoc_insertion_point(field_map:pb.ConnMgmtResponse.status) + return _internal_status(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::pb::ConnMgmtStatus >* +ConnMgmtResponse::_internal_mutable_status() { + return status_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::pb::ConnMgmtStatus >* +ConnMgmtResponse::mutable_status() { + // @@protoc_insertion_point(field_mutable_map:pb.ConnMgmtResponse.status) + return _internal_mutable_status(); +} + +// repeated string peerIDs = 4; +inline int ConnMgmtResponse::_internal_peerids_size() const { + return peerids_.size(); +} +inline int ConnMgmtResponse::peerids_size() const { + return _internal_peerids_size(); +} +inline void ConnMgmtResponse::clear_peerids() { + peerids_.Clear(); +} +inline std::string* ConnMgmtResponse::add_peerids() { + // @@protoc_insertion_point(field_add_mutable:pb.ConnMgmtResponse.peerIDs) + return _internal_add_peerids(); +} +inline const std::string& ConnMgmtResponse::_internal_peerids(int index) const { + return peerids_.Get(index); +} +inline const std::string& ConnMgmtResponse::peerids(int index) const { + // @@protoc_insertion_point(field_get:pb.ConnMgmtResponse.peerIDs) + return _internal_peerids(index); +} +inline std::string* ConnMgmtResponse::mutable_peerids(int index) { + // @@protoc_insertion_point(field_mutable:pb.ConnMgmtResponse.peerIDs) + return peerids_.Mutable(index); +} +inline void ConnMgmtResponse::set_peerids(int index, const std::string& value) { + // @@protoc_insertion_point(field_set:pb.ConnMgmtResponse.peerIDs) + peerids_.Mutable(index)->assign(value); +} +inline void ConnMgmtResponse::set_peerids(int index, std::string&& value) { + // @@protoc_insertion_point(field_set:pb.ConnMgmtResponse.peerIDs) + peerids_.Mutable(index)->assign(std::move(value)); +} +inline void ConnMgmtResponse::set_peerids(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + peerids_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:pb.ConnMgmtResponse.peerIDs) +} +inline void ConnMgmtResponse::set_peerids(int index, const char* value, size_t size) { + peerids_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:pb.ConnMgmtResponse.peerIDs) +} +inline std::string* ConnMgmtResponse::_internal_add_peerids() { + return peerids_.Add(); +} +inline void ConnMgmtResponse::add_peerids(const std::string& value) { + peerids_.Add()->assign(value); + // @@protoc_insertion_point(field_add:pb.ConnMgmtResponse.peerIDs) +} +inline void ConnMgmtResponse::add_peerids(std::string&& value) { + peerids_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:pb.ConnMgmtResponse.peerIDs) +} +inline void ConnMgmtResponse::add_peerids(const char* value) { + GOOGLE_DCHECK(value != nullptr); + peerids_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:pb.ConnMgmtResponse.peerIDs) +} +inline void ConnMgmtResponse::add_peerids(const char* value, size_t size) { + peerids_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:pb.ConnMgmtResponse.peerIDs) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +ConnMgmtResponse::peerids() const { + // @@protoc_insertion_point(field_list:pb.ConnMgmtResponse.peerIDs) + return peerids_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +ConnMgmtResponse::mutable_peerids() { + // @@protoc_insertion_point(field_mutable_list:pb.ConnMgmtResponse.peerIDs) + return &peerids_; +} + +// ------------------------------------------------------------------- + +// ConnMgmtStatus + +// bool disconnected = 1; +inline void ConnMgmtStatus::clear_disconnected() { + disconnected_ = false; +} +inline bool ConnMgmtStatus::_internal_disconnected() const { + return disconnected_; +} +inline bool ConnMgmtStatus::disconnected() const { + // @@protoc_insertion_point(field_get:pb.ConnMgmtStatus.disconnected) + return _internal_disconnected(); +} +inline void ConnMgmtStatus::_internal_set_disconnected(bool value) { + + disconnected_ = value; +} +inline void ConnMgmtStatus::set_disconnected(bool value) { + _internal_set_disconnected(value); + // @@protoc_insertion_point(field_set:pb.ConnMgmtStatus.disconnected) +} + +// string reason = 2; +inline void ConnMgmtStatus::clear_reason() { + reason_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& ConnMgmtStatus::reason() const { + // @@protoc_insertion_point(field_get:pb.ConnMgmtStatus.reason) + return _internal_reason(); +} +inline void ConnMgmtStatus::set_reason(const std::string& value) { + _internal_set_reason(value); + // @@protoc_insertion_point(field_set:pb.ConnMgmtStatus.reason) +} +inline std::string* ConnMgmtStatus::mutable_reason() { + // @@protoc_insertion_point(field_mutable:pb.ConnMgmtStatus.reason) + return _internal_mutable_reason(); +} +inline const std::string& ConnMgmtStatus::_internal_reason() const { + return reason_.GetNoArena(); +} +inline void ConnMgmtStatus::_internal_set_reason(const std::string& value) { + + reason_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void ConnMgmtStatus::set_reason(std::string&& value) { + + reason_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.ConnMgmtStatus.reason) +} +inline void ConnMgmtStatus::set_reason(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + reason_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.ConnMgmtStatus.reason) +} +inline void ConnMgmtStatus::set_reason(const char* value, size_t size) { + + reason_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.ConnMgmtStatus.reason) +} +inline std::string* ConnMgmtStatus::_internal_mutable_reason() { + + return reason_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* ConnMgmtStatus::release_reason() { + // @@protoc_insertion_point(field_release:pb.ConnMgmtStatus.reason) + + return reason_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void ConnMgmtStatus::set_allocated_reason(std::string* reason) { + if (reason != nullptr) { + + } else { + + } + reason_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), reason); + // @@protoc_insertion_point(field_set_allocated:pb.ConnMgmtStatus.reason) +} + +// ------------------------------------------------------------------- + +// ExtrasRequest + +// .pb.EXTRASREQTYPE requestType = 1; +inline void ExtrasRequest::clear_requesttype() { + requesttype_ = 0; +} +inline ::pb::EXTRASREQTYPE ExtrasRequest::_internal_requesttype() const { + return static_cast< ::pb::EXTRASREQTYPE >(requesttype_); +} +inline ::pb::EXTRASREQTYPE ExtrasRequest::requesttype() const { + // @@protoc_insertion_point(field_get:pb.ExtrasRequest.requestType) + return _internal_requesttype(); +} +inline void ExtrasRequest::_internal_set_requesttype(::pb::EXTRASREQTYPE value) { + + requesttype_ = value; +} +inline void ExtrasRequest::set_requesttype(::pb::EXTRASREQTYPE value) { + _internal_set_requesttype(value); + // @@protoc_insertion_point(field_set:pb.ExtrasRequest.requestType) +} + +// .pb.EXTRASTYPE extrasFeature = 2; +inline void ExtrasRequest::clear_extrasfeature() { + extrasfeature_ = 0; +} +inline ::pb::EXTRASTYPE ExtrasRequest::_internal_extrasfeature() const { + return static_cast< ::pb::EXTRASTYPE >(extrasfeature_); +} +inline ::pb::EXTRASTYPE ExtrasRequest::extrasfeature() const { + // @@protoc_insertion_point(field_get:pb.ExtrasRequest.extrasFeature) + return _internal_extrasfeature(); +} +inline void ExtrasRequest::_internal_set_extrasfeature(::pb::EXTRASTYPE value) { + + extrasfeature_ = value; +} +inline void ExtrasRequest::set_extrasfeature(::pb::EXTRASTYPE value) { + _internal_set_extrasfeature(value); + // @@protoc_insertion_point(field_set:pb.ExtrasRequest.extrasFeature) +} + +// ------------------------------------------------------------------- + +// BlockstoreRequest + +// .pb.BSREQTYPE requestType = 1; +inline void BlockstoreRequest::clear_requesttype() { + requesttype_ = 0; +} +inline ::pb::BSREQTYPE BlockstoreRequest::_internal_requesttype() const { + return static_cast< ::pb::BSREQTYPE >(requesttype_); +} +inline ::pb::BSREQTYPE BlockstoreRequest::requesttype() const { + // @@protoc_insertion_point(field_get:pb.BlockstoreRequest.requestType) + return _internal_requesttype(); +} +inline void BlockstoreRequest::_internal_set_requesttype(::pb::BSREQTYPE value) { + + requesttype_ = value; +} +inline void BlockstoreRequest::set_requesttype(::pb::BSREQTYPE value) { + _internal_set_requesttype(value); + // @@protoc_insertion_point(field_set:pb.BlockstoreRequest.requestType) +} + +// repeated .pb.BSREQOPTS reqOpts = 2; +inline int BlockstoreRequest::_internal_reqopts_size() const { + return reqopts_.size(); +} +inline int BlockstoreRequest::reqopts_size() const { + return _internal_reqopts_size(); +} +inline void BlockstoreRequest::clear_reqopts() { + reqopts_.Clear(); +} +inline ::pb::BSREQOPTS BlockstoreRequest::_internal_reqopts(int index) const { + return static_cast< ::pb::BSREQOPTS >(reqopts_.Get(index)); +} +inline ::pb::BSREQOPTS BlockstoreRequest::reqopts(int index) const { + // @@protoc_insertion_point(field_get:pb.BlockstoreRequest.reqOpts) + return _internal_reqopts(index); +} +inline void BlockstoreRequest::set_reqopts(int index, ::pb::BSREQOPTS value) { + reqopts_.Set(index, value); + // @@protoc_insertion_point(field_set:pb.BlockstoreRequest.reqOpts) +} +inline void BlockstoreRequest::_internal_add_reqopts(::pb::BSREQOPTS value) { + reqopts_.Add(value); +} +inline void BlockstoreRequest::add_reqopts(::pb::BSREQOPTS value) { + // @@protoc_insertion_point(field_add:pb.BlockstoreRequest.reqOpts) + _internal_add_reqopts(value); +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField& +BlockstoreRequest::reqopts() const { + // @@protoc_insertion_point(field_list:pb.BlockstoreRequest.reqOpts) + return reqopts_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +BlockstoreRequest::_internal_mutable_reqopts() { + return &reqopts_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +BlockstoreRequest::mutable_reqopts() { + // @@protoc_insertion_point(field_mutable_list:pb.BlockstoreRequest.reqOpts) + return _internal_mutable_reqopts(); +} + +// repeated string cids = 3; +inline int BlockstoreRequest::_internal_cids_size() const { + return cids_.size(); +} +inline int BlockstoreRequest::cids_size() const { + return _internal_cids_size(); +} +inline void BlockstoreRequest::clear_cids() { + cids_.Clear(); +} +inline std::string* BlockstoreRequest::add_cids() { + // @@protoc_insertion_point(field_add_mutable:pb.BlockstoreRequest.cids) + return _internal_add_cids(); +} +inline const std::string& BlockstoreRequest::_internal_cids(int index) const { + return cids_.Get(index); +} +inline const std::string& BlockstoreRequest::cids(int index) const { + // @@protoc_insertion_point(field_get:pb.BlockstoreRequest.cids) + return _internal_cids(index); +} +inline std::string* BlockstoreRequest::mutable_cids(int index) { + // @@protoc_insertion_point(field_mutable:pb.BlockstoreRequest.cids) + return cids_.Mutable(index); +} +inline void BlockstoreRequest::set_cids(int index, const std::string& value) { + // @@protoc_insertion_point(field_set:pb.BlockstoreRequest.cids) + cids_.Mutable(index)->assign(value); +} +inline void BlockstoreRequest::set_cids(int index, std::string&& value) { + // @@protoc_insertion_point(field_set:pb.BlockstoreRequest.cids) + cids_.Mutable(index)->assign(std::move(value)); +} +inline void BlockstoreRequest::set_cids(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + cids_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:pb.BlockstoreRequest.cids) +} +inline void BlockstoreRequest::set_cids(int index, const char* value, size_t size) { + cids_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:pb.BlockstoreRequest.cids) +} +inline std::string* BlockstoreRequest::_internal_add_cids() { + return cids_.Add(); +} +inline void BlockstoreRequest::add_cids(const std::string& value) { + cids_.Add()->assign(value); + // @@protoc_insertion_point(field_add:pb.BlockstoreRequest.cids) +} +inline void BlockstoreRequest::add_cids(std::string&& value) { + cids_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:pb.BlockstoreRequest.cids) +} +inline void BlockstoreRequest::add_cids(const char* value) { + GOOGLE_DCHECK(value != nullptr); + cids_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:pb.BlockstoreRequest.cids) +} +inline void BlockstoreRequest::add_cids(const char* value, size_t size) { + cids_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:pb.BlockstoreRequest.cids) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +BlockstoreRequest::cids() const { + // @@protoc_insertion_point(field_list:pb.BlockstoreRequest.cids) + return cids_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +BlockstoreRequest::mutable_cids() { + // @@protoc_insertion_point(field_mutable_list:pb.BlockstoreRequest.cids) + return &cids_; +} + +// repeated bytes data = 4; +inline int BlockstoreRequest::_internal_data_size() const { + return data_.size(); +} +inline int BlockstoreRequest::data_size() const { + return _internal_data_size(); +} +inline void BlockstoreRequest::clear_data() { + data_.Clear(); +} +inline std::string* BlockstoreRequest::add_data() { + // @@protoc_insertion_point(field_add_mutable:pb.BlockstoreRequest.data) + return _internal_add_data(); +} +inline const std::string& BlockstoreRequest::_internal_data(int index) const { + return data_.Get(index); +} +inline const std::string& BlockstoreRequest::data(int index) const { + // @@protoc_insertion_point(field_get:pb.BlockstoreRequest.data) + return _internal_data(index); +} +inline std::string* BlockstoreRequest::mutable_data(int index) { + // @@protoc_insertion_point(field_mutable:pb.BlockstoreRequest.data) + return data_.Mutable(index); +} +inline void BlockstoreRequest::set_data(int index, const std::string& value) { + // @@protoc_insertion_point(field_set:pb.BlockstoreRequest.data) + data_.Mutable(index)->assign(value); +} +inline void BlockstoreRequest::set_data(int index, std::string&& value) { + // @@protoc_insertion_point(field_set:pb.BlockstoreRequest.data) + data_.Mutable(index)->assign(std::move(value)); +} +inline void BlockstoreRequest::set_data(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + data_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:pb.BlockstoreRequest.data) +} +inline void BlockstoreRequest::set_data(int index, const void* value, size_t size) { + data_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:pb.BlockstoreRequest.data) +} +inline std::string* BlockstoreRequest::_internal_add_data() { + return data_.Add(); +} +inline void BlockstoreRequest::add_data(const std::string& value) { + data_.Add()->assign(value); + // @@protoc_insertion_point(field_add:pb.BlockstoreRequest.data) +} +inline void BlockstoreRequest::add_data(std::string&& value) { + data_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:pb.BlockstoreRequest.data) +} +inline void BlockstoreRequest::add_data(const char* value) { + GOOGLE_DCHECK(value != nullptr); + data_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:pb.BlockstoreRequest.data) +} +inline void BlockstoreRequest::add_data(const void* value, size_t size) { + data_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:pb.BlockstoreRequest.data) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +BlockstoreRequest::data() const { + // @@protoc_insertion_point(field_list:pb.BlockstoreRequest.data) + return data_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +BlockstoreRequest::mutable_data() { + // @@protoc_insertion_point(field_mutable_list:pb.BlockstoreRequest.data) + return &data_; +} + +// string cidVersion = 5; +inline void BlockstoreRequest::clear_cidversion() { + cidversion_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& BlockstoreRequest::cidversion() const { + // @@protoc_insertion_point(field_get:pb.BlockstoreRequest.cidVersion) + return _internal_cidversion(); +} +inline void BlockstoreRequest::set_cidversion(const std::string& value) { + _internal_set_cidversion(value); + // @@protoc_insertion_point(field_set:pb.BlockstoreRequest.cidVersion) +} +inline std::string* BlockstoreRequest::mutable_cidversion() { + // @@protoc_insertion_point(field_mutable:pb.BlockstoreRequest.cidVersion) + return _internal_mutable_cidversion(); +} +inline const std::string& BlockstoreRequest::_internal_cidversion() const { + return cidversion_.GetNoArena(); +} +inline void BlockstoreRequest::_internal_set_cidversion(const std::string& value) { + + cidversion_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void BlockstoreRequest::set_cidversion(std::string&& value) { + + cidversion_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.BlockstoreRequest.cidVersion) +} +inline void BlockstoreRequest::set_cidversion(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + cidversion_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.BlockstoreRequest.cidVersion) +} +inline void BlockstoreRequest::set_cidversion(const char* value, size_t size) { + + cidversion_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.BlockstoreRequest.cidVersion) +} +inline std::string* BlockstoreRequest::_internal_mutable_cidversion() { + + return cidversion_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* BlockstoreRequest::release_cidversion() { + // @@protoc_insertion_point(field_release:pb.BlockstoreRequest.cidVersion) + + return cidversion_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void BlockstoreRequest::set_allocated_cidversion(std::string* cidversion) { + if (cidversion != nullptr) { + + } else { + + } + cidversion_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), cidversion); + // @@protoc_insertion_point(field_set_allocated:pb.BlockstoreRequest.cidVersion) +} + +// string hashFunc = 7; +inline void BlockstoreRequest::clear_hashfunc() { + hashfunc_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& BlockstoreRequest::hashfunc() const { + // @@protoc_insertion_point(field_get:pb.BlockstoreRequest.hashFunc) + return _internal_hashfunc(); +} +inline void BlockstoreRequest::set_hashfunc(const std::string& value) { + _internal_set_hashfunc(value); + // @@protoc_insertion_point(field_set:pb.BlockstoreRequest.hashFunc) +} +inline std::string* BlockstoreRequest::mutable_hashfunc() { + // @@protoc_insertion_point(field_mutable:pb.BlockstoreRequest.hashFunc) + return _internal_mutable_hashfunc(); +} +inline const std::string& BlockstoreRequest::_internal_hashfunc() const { + return hashfunc_.GetNoArena(); +} +inline void BlockstoreRequest::_internal_set_hashfunc(const std::string& value) { + + hashfunc_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void BlockstoreRequest::set_hashfunc(std::string&& value) { + + hashfunc_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.BlockstoreRequest.hashFunc) +} +inline void BlockstoreRequest::set_hashfunc(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + hashfunc_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.BlockstoreRequest.hashFunc) +} +inline void BlockstoreRequest::set_hashfunc(const char* value, size_t size) { + + hashfunc_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.BlockstoreRequest.hashFunc) +} +inline std::string* BlockstoreRequest::_internal_mutable_hashfunc() { + + return hashfunc_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* BlockstoreRequest::release_hashfunc() { + // @@protoc_insertion_point(field_release:pb.BlockstoreRequest.hashFunc) + + return hashfunc_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void BlockstoreRequest::set_allocated_hashfunc(std::string* hashfunc) { + if (hashfunc != nullptr) { + + } else { + + } + hashfunc_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), hashfunc); + // @@protoc_insertion_point(field_set_allocated:pb.BlockstoreRequest.hashFunc) +} + +// ------------------------------------------------------------------- + +// BlockstoreResponse + +// .pb.BSREQTYPE requestType = 1; +inline void BlockstoreResponse::clear_requesttype() { + requesttype_ = 0; +} +inline ::pb::BSREQTYPE BlockstoreResponse::_internal_requesttype() const { + return static_cast< ::pb::BSREQTYPE >(requesttype_); +} +inline ::pb::BSREQTYPE BlockstoreResponse::requesttype() const { + // @@protoc_insertion_point(field_get:pb.BlockstoreResponse.requestType) + return _internal_requesttype(); +} +inline void BlockstoreResponse::_internal_set_requesttype(::pb::BSREQTYPE value) { + + requesttype_ = value; +} +inline void BlockstoreResponse::set_requesttype(::pb::BSREQTYPE value) { + _internal_set_requesttype(value); + // @@protoc_insertion_point(field_set:pb.BlockstoreResponse.requestType) +} + +// repeated .pb.Block blocks = 2; +inline int BlockstoreResponse::_internal_blocks_size() const { + return blocks_.size(); +} +inline int BlockstoreResponse::blocks_size() const { + return _internal_blocks_size(); +} +inline void BlockstoreResponse::clear_blocks() { + blocks_.Clear(); +} +inline ::pb::Block* BlockstoreResponse::mutable_blocks(int index) { + // @@protoc_insertion_point(field_mutable:pb.BlockstoreResponse.blocks) + return blocks_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::Block >* +BlockstoreResponse::mutable_blocks() { + // @@protoc_insertion_point(field_mutable_list:pb.BlockstoreResponse.blocks) + return &blocks_; +} +inline const ::pb::Block& BlockstoreResponse::_internal_blocks(int index) const { + return blocks_.Get(index); +} +inline const ::pb::Block& BlockstoreResponse::blocks(int index) const { + // @@protoc_insertion_point(field_get:pb.BlockstoreResponse.blocks) + return _internal_blocks(index); +} +inline ::pb::Block* BlockstoreResponse::_internal_add_blocks() { + return blocks_.Add(); +} +inline ::pb::Block* BlockstoreResponse::add_blocks() { + // @@protoc_insertion_point(field_add:pb.BlockstoreResponse.blocks) + return _internal_add_blocks(); +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::Block >& +BlockstoreResponse::blocks() const { + // @@protoc_insertion_point(field_list:pb.BlockstoreResponse.blocks) + return blocks_; +} + +// ------------------------------------------------------------------- + +// Block + +// string cid = 1; +inline void Block::clear_cid() { + cid_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& Block::cid() const { + // @@protoc_insertion_point(field_get:pb.Block.cid) + return _internal_cid(); +} +inline void Block::set_cid(const std::string& value) { + _internal_set_cid(value); + // @@protoc_insertion_point(field_set:pb.Block.cid) +} +inline std::string* Block::mutable_cid() { + // @@protoc_insertion_point(field_mutable:pb.Block.cid) + return _internal_mutable_cid(); +} +inline const std::string& Block::_internal_cid() const { + return cid_.GetNoArena(); +} +inline void Block::_internal_set_cid(const std::string& value) { + + cid_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void Block::set_cid(std::string&& value) { + + cid_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.Block.cid) +} +inline void Block::set_cid(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + cid_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.Block.cid) +} +inline void Block::set_cid(const char* value, size_t size) { + + cid_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.Block.cid) +} +inline std::string* Block::_internal_mutable_cid() { + + return cid_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* Block::release_cid() { + // @@protoc_insertion_point(field_release:pb.Block.cid) + + return cid_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void Block::set_allocated_cid(std::string* cid) { + if (cid != nullptr) { + + } else { + + } + cid_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), cid); + // @@protoc_insertion_point(field_set_allocated:pb.Block.cid) +} + +// bytes data = 2; +inline void Block::clear_data() { + data_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& Block::data() const { + // @@protoc_insertion_point(field_get:pb.Block.data) + return _internal_data(); +} +inline void Block::set_data(const std::string& value) { + _internal_set_data(value); + // @@protoc_insertion_point(field_set:pb.Block.data) +} +inline std::string* Block::mutable_data() { + // @@protoc_insertion_point(field_mutable:pb.Block.data) + return _internal_mutable_data(); +} +inline const std::string& Block::_internal_data() const { + return data_.GetNoArena(); +} +inline void Block::_internal_set_data(const std::string& value) { + + data_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void Block::set_data(std::string&& value) { + + data_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.Block.data) +} +inline void Block::set_data(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + data_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.Block.data) +} +inline void Block::set_data(const void* value, size_t size) { + + data_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.Block.data) +} +inline std::string* Block::_internal_mutable_data() { + + return data_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* Block::release_data() { + // @@protoc_insertion_point(field_release:pb.Block.data) + + return data_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void Block::set_allocated_data(std::string* data) { + if (data != nullptr) { + + } else { + + } + data_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), data); + // @@protoc_insertion_point(field_set_allocated:pb.Block.data) +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// DagRequest + +// .pb.DAGREQTYPE requestType = 1; +inline void DagRequest::clear_requesttype() { + requesttype_ = 0; +} +inline ::pb::DAGREQTYPE DagRequest::_internal_requesttype() const { + return static_cast< ::pb::DAGREQTYPE >(requesttype_); +} +inline ::pb::DAGREQTYPE DagRequest::requesttype() const { + // @@protoc_insertion_point(field_get:pb.DagRequest.requestType) + return _internal_requesttype(); +} +inline void DagRequest::_internal_set_requesttype(::pb::DAGREQTYPE value) { + + requesttype_ = value; +} +inline void DagRequest::set_requesttype(::pb::DAGREQTYPE value) { + _internal_set_requesttype(value); + // @@protoc_insertion_point(field_set:pb.DagRequest.requestType) +} + +// bytes data = 2; +inline void DagRequest::clear_data() { + data_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& DagRequest::data() const { + // @@protoc_insertion_point(field_get:pb.DagRequest.data) + return _internal_data(); +} +inline void DagRequest::set_data(const std::string& value) { + _internal_set_data(value); + // @@protoc_insertion_point(field_set:pb.DagRequest.data) +} +inline std::string* DagRequest::mutable_data() { + // @@protoc_insertion_point(field_mutable:pb.DagRequest.data) + return _internal_mutable_data(); +} +inline const std::string& DagRequest::_internal_data() const { + return data_.GetNoArena(); +} +inline void DagRequest::_internal_set_data(const std::string& value) { + + data_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void DagRequest::set_data(std::string&& value) { + + data_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.DagRequest.data) +} +inline void DagRequest::set_data(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + data_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.DagRequest.data) +} +inline void DagRequest::set_data(const void* value, size_t size) { + + data_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.DagRequest.data) +} +inline std::string* DagRequest::_internal_mutable_data() { + + return data_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* DagRequest::release_data() { + // @@protoc_insertion_point(field_release:pb.DagRequest.data) + + return data_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void DagRequest::set_allocated_data(std::string* data) { + if (data != nullptr) { + + } else { + + } + data_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), data); + // @@protoc_insertion_point(field_set_allocated:pb.DagRequest.data) +} + +// string objectEncoding = 3; +inline void DagRequest::clear_objectencoding() { + objectencoding_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& DagRequest::objectencoding() const { + // @@protoc_insertion_point(field_get:pb.DagRequest.objectEncoding) + return _internal_objectencoding(); +} +inline void DagRequest::set_objectencoding(const std::string& value) { + _internal_set_objectencoding(value); + // @@protoc_insertion_point(field_set:pb.DagRequest.objectEncoding) +} +inline std::string* DagRequest::mutable_objectencoding() { + // @@protoc_insertion_point(field_mutable:pb.DagRequest.objectEncoding) + return _internal_mutable_objectencoding(); +} +inline const std::string& DagRequest::_internal_objectencoding() const { + return objectencoding_.GetNoArena(); +} +inline void DagRequest::_internal_set_objectencoding(const std::string& value) { + + objectencoding_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void DagRequest::set_objectencoding(std::string&& value) { + + objectencoding_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.DagRequest.objectEncoding) +} +inline void DagRequest::set_objectencoding(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + objectencoding_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.DagRequest.objectEncoding) +} +inline void DagRequest::set_objectencoding(const char* value, size_t size) { + + objectencoding_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.DagRequest.objectEncoding) +} +inline std::string* DagRequest::_internal_mutable_objectencoding() { + + return objectencoding_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* DagRequest::release_objectencoding() { + // @@protoc_insertion_point(field_release:pb.DagRequest.objectEncoding) + + return objectencoding_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void DagRequest::set_allocated_objectencoding(std::string* objectencoding) { + if (objectencoding != nullptr) { + + } else { + + } + objectencoding_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), objectencoding); + // @@protoc_insertion_point(field_set_allocated:pb.DagRequest.objectEncoding) +} + +// string serializationFormat = 4; +inline void DagRequest::clear_serializationformat() { + serializationformat_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& DagRequest::serializationformat() const { + // @@protoc_insertion_point(field_get:pb.DagRequest.serializationFormat) + return _internal_serializationformat(); +} +inline void DagRequest::set_serializationformat(const std::string& value) { + _internal_set_serializationformat(value); + // @@protoc_insertion_point(field_set:pb.DagRequest.serializationFormat) +} +inline std::string* DagRequest::mutable_serializationformat() { + // @@protoc_insertion_point(field_mutable:pb.DagRequest.serializationFormat) + return _internal_mutable_serializationformat(); +} +inline const std::string& DagRequest::_internal_serializationformat() const { + return serializationformat_.GetNoArena(); +} +inline void DagRequest::_internal_set_serializationformat(const std::string& value) { + + serializationformat_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void DagRequest::set_serializationformat(std::string&& value) { + + serializationformat_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.DagRequest.serializationFormat) +} +inline void DagRequest::set_serializationformat(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + serializationformat_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.DagRequest.serializationFormat) +} +inline void DagRequest::set_serializationformat(const char* value, size_t size) { + + serializationformat_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.DagRequest.serializationFormat) +} +inline std::string* DagRequest::_internal_mutable_serializationformat() { + + return serializationformat_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* DagRequest::release_serializationformat() { + // @@protoc_insertion_point(field_release:pb.DagRequest.serializationFormat) + + return serializationformat_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void DagRequest::set_allocated_serializationformat(std::string* serializationformat) { + if (serializationformat != nullptr) { + + } else { + + } + serializationformat_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), serializationformat); + // @@protoc_insertion_point(field_set_allocated:pb.DagRequest.serializationFormat) +} + +// string hashFunc = 5; +inline void DagRequest::clear_hashfunc() { + hashfunc_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& DagRequest::hashfunc() const { + // @@protoc_insertion_point(field_get:pb.DagRequest.hashFunc) + return _internal_hashfunc(); +} +inline void DagRequest::set_hashfunc(const std::string& value) { + _internal_set_hashfunc(value); + // @@protoc_insertion_point(field_set:pb.DagRequest.hashFunc) +} +inline std::string* DagRequest::mutable_hashfunc() { + // @@protoc_insertion_point(field_mutable:pb.DagRequest.hashFunc) + return _internal_mutable_hashfunc(); +} +inline const std::string& DagRequest::_internal_hashfunc() const { + return hashfunc_.GetNoArena(); +} +inline void DagRequest::_internal_set_hashfunc(const std::string& value) { + + hashfunc_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void DagRequest::set_hashfunc(std::string&& value) { + + hashfunc_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.DagRequest.hashFunc) +} +inline void DagRequest::set_hashfunc(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + hashfunc_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.DagRequest.hashFunc) +} +inline void DagRequest::set_hashfunc(const char* value, size_t size) { + + hashfunc_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.DagRequest.hashFunc) +} +inline std::string* DagRequest::_internal_mutable_hashfunc() { + + return hashfunc_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* DagRequest::release_hashfunc() { + // @@protoc_insertion_point(field_release:pb.DagRequest.hashFunc) + + return hashfunc_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void DagRequest::set_allocated_hashfunc(std::string* hashfunc) { + if (hashfunc != nullptr) { + + } else { + + } + hashfunc_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), hashfunc); + // @@protoc_insertion_point(field_set_allocated:pb.DagRequest.hashFunc) +} + +// int64 cidVersion = 6; +inline void DagRequest::clear_cidversion() { + cidversion_ = PROTOBUF_LONGLONG(0); +} +inline ::PROTOBUF_NAMESPACE_ID::int64 DagRequest::_internal_cidversion() const { + return cidversion_; +} +inline ::PROTOBUF_NAMESPACE_ID::int64 DagRequest::cidversion() const { + // @@protoc_insertion_point(field_get:pb.DagRequest.cidVersion) + return _internal_cidversion(); +} +inline void DagRequest::_internal_set_cidversion(::PROTOBUF_NAMESPACE_ID::int64 value) { + + cidversion_ = value; +} +inline void DagRequest::set_cidversion(::PROTOBUF_NAMESPACE_ID::int64 value) { + _internal_set_cidversion(value); + // @@protoc_insertion_point(field_set:pb.DagRequest.cidVersion) +} + +// string hash = 7; +inline void DagRequest::clear_hash() { + hash_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& DagRequest::hash() const { + // @@protoc_insertion_point(field_get:pb.DagRequest.hash) + return _internal_hash(); +} +inline void DagRequest::set_hash(const std::string& value) { + _internal_set_hash(value); + // @@protoc_insertion_point(field_set:pb.DagRequest.hash) +} +inline std::string* DagRequest::mutable_hash() { + // @@protoc_insertion_point(field_mutable:pb.DagRequest.hash) + return _internal_mutable_hash(); +} +inline const std::string& DagRequest::_internal_hash() const { + return hash_.GetNoArena(); +} +inline void DagRequest::_internal_set_hash(const std::string& value) { + + hash_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void DagRequest::set_hash(std::string&& value) { + + hash_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.DagRequest.hash) +} +inline void DagRequest::set_hash(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + hash_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.DagRequest.hash) +} +inline void DagRequest::set_hash(const char* value, size_t size) { + + hash_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.DagRequest.hash) +} +inline std::string* DagRequest::_internal_mutable_hash() { + + return hash_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* DagRequest::release_hash() { + // @@protoc_insertion_point(field_release:pb.DagRequest.hash) + + return hash_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void DagRequest::set_allocated_hash(std::string* hash) { + if (hash != nullptr) { + + } else { + + } + hash_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), hash); + // @@protoc_insertion_point(field_set_allocated:pb.DagRequest.hash) +} + +// map links = 8; +inline int DagRequest::_internal_links_size() const { + return links_.size(); +} +inline int DagRequest::links_size() const { + return _internal_links_size(); +} +inline void DagRequest::clear_links() { + links_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +DagRequest::_internal_links() const { + return links_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +DagRequest::links() const { + // @@protoc_insertion_point(field_map:pb.DagRequest.links) + return _internal_links(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +DagRequest::_internal_mutable_links() { + return links_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +DagRequest::mutable_links() { + // @@protoc_insertion_point(field_mutable_map:pb.DagRequest.links) + return _internal_mutable_links(); +} + +// ------------------------------------------------------------------- + +// DagResponse + +// .pb.DAGREQTYPE requestType = 1; +inline void DagResponse::clear_requesttype() { + requesttype_ = 0; +} +inline ::pb::DAGREQTYPE DagResponse::_internal_requesttype() const { + return static_cast< ::pb::DAGREQTYPE >(requesttype_); +} +inline ::pb::DAGREQTYPE DagResponse::requesttype() const { + // @@protoc_insertion_point(field_get:pb.DagResponse.requestType) + return _internal_requesttype(); +} +inline void DagResponse::_internal_set_requesttype(::pb::DAGREQTYPE value) { + + requesttype_ = value; +} +inline void DagResponse::set_requesttype(::pb::DAGREQTYPE value) { + _internal_set_requesttype(value); + // @@protoc_insertion_point(field_set:pb.DagResponse.requestType) +} + +// repeated string hashes = 2; +inline int DagResponse::_internal_hashes_size() const { + return hashes_.size(); +} +inline int DagResponse::hashes_size() const { + return _internal_hashes_size(); +} +inline void DagResponse::clear_hashes() { + hashes_.Clear(); +} +inline std::string* DagResponse::add_hashes() { + // @@protoc_insertion_point(field_add_mutable:pb.DagResponse.hashes) + return _internal_add_hashes(); +} +inline const std::string& DagResponse::_internal_hashes(int index) const { + return hashes_.Get(index); +} +inline const std::string& DagResponse::hashes(int index) const { + // @@protoc_insertion_point(field_get:pb.DagResponse.hashes) + return _internal_hashes(index); +} +inline std::string* DagResponse::mutable_hashes(int index) { + // @@protoc_insertion_point(field_mutable:pb.DagResponse.hashes) + return hashes_.Mutable(index); +} +inline void DagResponse::set_hashes(int index, const std::string& value) { + // @@protoc_insertion_point(field_set:pb.DagResponse.hashes) + hashes_.Mutable(index)->assign(value); +} +inline void DagResponse::set_hashes(int index, std::string&& value) { + // @@protoc_insertion_point(field_set:pb.DagResponse.hashes) + hashes_.Mutable(index)->assign(std::move(value)); +} +inline void DagResponse::set_hashes(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + hashes_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:pb.DagResponse.hashes) +} +inline void DagResponse::set_hashes(int index, const char* value, size_t size) { + hashes_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:pb.DagResponse.hashes) +} +inline std::string* DagResponse::_internal_add_hashes() { + return hashes_.Add(); +} +inline void DagResponse::add_hashes(const std::string& value) { + hashes_.Add()->assign(value); + // @@protoc_insertion_point(field_add:pb.DagResponse.hashes) +} +inline void DagResponse::add_hashes(std::string&& value) { + hashes_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:pb.DagResponse.hashes) +} +inline void DagResponse::add_hashes(const char* value) { + GOOGLE_DCHECK(value != nullptr); + hashes_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:pb.DagResponse.hashes) +} +inline void DagResponse::add_hashes(const char* value, size_t size) { + hashes_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:pb.DagResponse.hashes) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +DagResponse::hashes() const { + // @@protoc_insertion_point(field_list:pb.DagResponse.hashes) + return hashes_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +DagResponse::mutable_hashes() { + // @@protoc_insertion_point(field_mutable_list:pb.DagResponse.hashes) + return &hashes_; +} + +// bytes rawData = 3; +inline void DagResponse::clear_rawdata() { + rawdata_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& DagResponse::rawdata() const { + // @@protoc_insertion_point(field_get:pb.DagResponse.rawData) + return _internal_rawdata(); +} +inline void DagResponse::set_rawdata(const std::string& value) { + _internal_set_rawdata(value); + // @@protoc_insertion_point(field_set:pb.DagResponse.rawData) +} +inline std::string* DagResponse::mutable_rawdata() { + // @@protoc_insertion_point(field_mutable:pb.DagResponse.rawData) + return _internal_mutable_rawdata(); +} +inline const std::string& DagResponse::_internal_rawdata() const { + return rawdata_.GetNoArena(); +} +inline void DagResponse::_internal_set_rawdata(const std::string& value) { + + rawdata_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void DagResponse::set_rawdata(std::string&& value) { + + rawdata_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.DagResponse.rawData) +} +inline void DagResponse::set_rawdata(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + rawdata_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.DagResponse.rawData) +} +inline void DagResponse::set_rawdata(const void* value, size_t size) { + + rawdata_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.DagResponse.rawData) +} +inline std::string* DagResponse::_internal_mutable_rawdata() { + + return rawdata_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* DagResponse::release_rawdata() { + // @@protoc_insertion_point(field_release:pb.DagResponse.rawData) + + return rawdata_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void DagResponse::set_allocated_rawdata(std::string* rawdata) { + if (rawdata != nullptr) { + + } else { + + } + rawdata_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), rawdata); + // @@protoc_insertion_point(field_set_allocated:pb.DagResponse.rawData) +} + +// repeated .pb.IPLDLink links = 4; +inline int DagResponse::_internal_links_size() const { + return links_.size(); +} +inline int DagResponse::links_size() const { + return _internal_links_size(); +} +inline void DagResponse::clear_links() { + links_.Clear(); +} +inline ::pb::IPLDLink* DagResponse::mutable_links(int index) { + // @@protoc_insertion_point(field_mutable:pb.DagResponse.links) + return links_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::IPLDLink >* +DagResponse::mutable_links() { + // @@protoc_insertion_point(field_mutable_list:pb.DagResponse.links) + return &links_; +} +inline const ::pb::IPLDLink& DagResponse::_internal_links(int index) const { + return links_.Get(index); +} +inline const ::pb::IPLDLink& DagResponse::links(int index) const { + // @@protoc_insertion_point(field_get:pb.DagResponse.links) + return _internal_links(index); +} +inline ::pb::IPLDLink* DagResponse::_internal_add_links() { + return links_.Add(); +} +inline ::pb::IPLDLink* DagResponse::add_links() { + // @@protoc_insertion_point(field_add:pb.DagResponse.links) + return _internal_add_links(); +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::IPLDLink >& +DagResponse::links() const { + // @@protoc_insertion_point(field_list:pb.DagResponse.links) + return links_; +} + +// ------------------------------------------------------------------- + +// IPLDLink + +// bytes hash = 1; +inline void IPLDLink::clear_hash() { + hash_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& IPLDLink::hash() const { + // @@protoc_insertion_point(field_get:pb.IPLDLink.hash) + return _internal_hash(); +} +inline void IPLDLink::set_hash(const std::string& value) { + _internal_set_hash(value); + // @@protoc_insertion_point(field_set:pb.IPLDLink.hash) +} +inline std::string* IPLDLink::mutable_hash() { + // @@protoc_insertion_point(field_mutable:pb.IPLDLink.hash) + return _internal_mutable_hash(); +} +inline const std::string& IPLDLink::_internal_hash() const { + return hash_.GetNoArena(); +} +inline void IPLDLink::_internal_set_hash(const std::string& value) { + + hash_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void IPLDLink::set_hash(std::string&& value) { + + hash_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.IPLDLink.hash) +} +inline void IPLDLink::set_hash(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + hash_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.IPLDLink.hash) +} +inline void IPLDLink::set_hash(const void* value, size_t size) { + + hash_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.IPLDLink.hash) +} +inline std::string* IPLDLink::_internal_mutable_hash() { + + return hash_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* IPLDLink::release_hash() { + // @@protoc_insertion_point(field_release:pb.IPLDLink.hash) + + return hash_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void IPLDLink::set_allocated_hash(std::string* hash) { + if (hash != nullptr) { + + } else { + + } + hash_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), hash); + // @@protoc_insertion_point(field_set_allocated:pb.IPLDLink.hash) +} + +// string name = 2; +inline void IPLDLink::clear_name() { + name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& IPLDLink::name() const { + // @@protoc_insertion_point(field_get:pb.IPLDLink.name) + return _internal_name(); +} +inline void IPLDLink::set_name(const std::string& value) { + _internal_set_name(value); + // @@protoc_insertion_point(field_set:pb.IPLDLink.name) +} +inline std::string* IPLDLink::mutable_name() { + // @@protoc_insertion_point(field_mutable:pb.IPLDLink.name) + return _internal_mutable_name(); +} +inline const std::string& IPLDLink::_internal_name() const { + return name_.GetNoArena(); +} +inline void IPLDLink::_internal_set_name(const std::string& value) { + + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void IPLDLink::set_name(std::string&& value) { + + name_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.IPLDLink.name) +} +inline void IPLDLink::set_name(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.IPLDLink.name) +} +inline void IPLDLink::set_name(const char* value, size_t size) { + + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.IPLDLink.name) +} +inline std::string* IPLDLink::_internal_mutable_name() { + + return name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* IPLDLink::release_name() { + // @@protoc_insertion_point(field_release:pb.IPLDLink.name) + + return name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void IPLDLink::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:pb.IPLDLink.name) +} + +// uint64 size = 3; +inline void IPLDLink::clear_size() { + size_ = PROTOBUF_ULONGLONG(0); +} +inline ::PROTOBUF_NAMESPACE_ID::uint64 IPLDLink::_internal_size() const { + return size_; +} +inline ::PROTOBUF_NAMESPACE_ID::uint64 IPLDLink::size() const { + // @@protoc_insertion_point(field_get:pb.IPLDLink.size) + return _internal_size(); +} +inline void IPLDLink::_internal_set_size(::PROTOBUF_NAMESPACE_ID::uint64 value) { + + size_ = value; +} +inline void IPLDLink::set_size(::PROTOBUF_NAMESPACE_ID::uint64 value) { + _internal_set_size(value); + // @@protoc_insertion_point(field_set:pb.IPLDLink.size) +} + +// ------------------------------------------------------------------- + +// IPLDNode + +// repeated .pb.IPLDLink links = 2; +inline int IPLDNode::_internal_links_size() const { + return links_.size(); +} +inline int IPLDNode::links_size() const { + return _internal_links_size(); +} +inline void IPLDNode::clear_links() { + links_.Clear(); +} +inline ::pb::IPLDLink* IPLDNode::mutable_links(int index) { + // @@protoc_insertion_point(field_mutable:pb.IPLDNode.links) + return links_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::IPLDLink >* +IPLDNode::mutable_links() { + // @@protoc_insertion_point(field_mutable_list:pb.IPLDNode.links) + return &links_; +} +inline const ::pb::IPLDLink& IPLDNode::_internal_links(int index) const { + return links_.Get(index); +} +inline const ::pb::IPLDLink& IPLDNode::links(int index) const { + // @@protoc_insertion_point(field_get:pb.IPLDNode.links) + return _internal_links(index); +} +inline ::pb::IPLDLink* IPLDNode::_internal_add_links() { + return links_.Add(); +} +inline ::pb::IPLDLink* IPLDNode::add_links() { + // @@protoc_insertion_point(field_add:pb.IPLDNode.links) + return _internal_add_links(); +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::IPLDLink >& +IPLDNode::links() const { + // @@protoc_insertion_point(field_list:pb.IPLDNode.links) + return links_; +} + +// bytes data = 1; +inline void IPLDNode::clear_data() { + data_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& IPLDNode::data() const { + // @@protoc_insertion_point(field_get:pb.IPLDNode.data) + return _internal_data(); +} +inline void IPLDNode::set_data(const std::string& value) { + _internal_set_data(value); + // @@protoc_insertion_point(field_set:pb.IPLDNode.data) +} +inline std::string* IPLDNode::mutable_data() { + // @@protoc_insertion_point(field_mutable:pb.IPLDNode.data) + return _internal_mutable_data(); +} +inline const std::string& IPLDNode::_internal_data() const { + return data_.GetNoArena(); +} +inline void IPLDNode::_internal_set_data(const std::string& value) { + + data_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void IPLDNode::set_data(std::string&& value) { + + data_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.IPLDNode.data) +} +inline void IPLDNode::set_data(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + data_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.IPLDNode.data) +} +inline void IPLDNode::set_data(const void* value, size_t size) { + + data_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.IPLDNode.data) +} +inline std::string* IPLDNode::_internal_mutable_data() { + + return data_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* IPLDNode::release_data() { + // @@protoc_insertion_point(field_release:pb.IPLDNode.data) + + return data_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void IPLDNode::set_allocated_data(std::string* data) { + if (data != nullptr) { + + } else { + + } + data_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), data); + // @@protoc_insertion_point(field_set_allocated:pb.IPLDNode.data) +} + +// ------------------------------------------------------------------- + +// KeystoreRequest + +// .pb.KSREQTYPE requestType = 1; +inline void KeystoreRequest::clear_requesttype() { + requesttype_ = 0; +} +inline ::pb::KSREQTYPE KeystoreRequest::_internal_requesttype() const { + return static_cast< ::pb::KSREQTYPE >(requesttype_); +} +inline ::pb::KSREQTYPE KeystoreRequest::requesttype() const { + // @@protoc_insertion_point(field_get:pb.KeystoreRequest.requestType) + return _internal_requesttype(); +} +inline void KeystoreRequest::_internal_set_requesttype(::pb::KSREQTYPE value) { + + requesttype_ = value; +} +inline void KeystoreRequest::set_requesttype(::pb::KSREQTYPE value) { + _internal_set_requesttype(value); + // @@protoc_insertion_point(field_set:pb.KeystoreRequest.requestType) +} + +// string name = 2; +inline void KeystoreRequest::clear_name() { + name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& KeystoreRequest::name() const { + // @@protoc_insertion_point(field_get:pb.KeystoreRequest.name) + return _internal_name(); +} +inline void KeystoreRequest::set_name(const std::string& value) { + _internal_set_name(value); + // @@protoc_insertion_point(field_set:pb.KeystoreRequest.name) +} +inline std::string* KeystoreRequest::mutable_name() { + // @@protoc_insertion_point(field_mutable:pb.KeystoreRequest.name) + return _internal_mutable_name(); +} +inline const std::string& KeystoreRequest::_internal_name() const { + return name_.GetNoArena(); +} +inline void KeystoreRequest::_internal_set_name(const std::string& value) { + + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void KeystoreRequest::set_name(std::string&& value) { + + name_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.KeystoreRequest.name) +} +inline void KeystoreRequest::set_name(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.KeystoreRequest.name) +} +inline void KeystoreRequest::set_name(const char* value, size_t size) { + + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.KeystoreRequest.name) +} +inline std::string* KeystoreRequest::_internal_mutable_name() { + + return name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* KeystoreRequest::release_name() { + // @@protoc_insertion_point(field_release:pb.KeystoreRequest.name) + + return name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void KeystoreRequest::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:pb.KeystoreRequest.name) +} + +// bytes privateKey = 3; +inline void KeystoreRequest::clear_privatekey() { + privatekey_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& KeystoreRequest::privatekey() const { + // @@protoc_insertion_point(field_get:pb.KeystoreRequest.privateKey) + return _internal_privatekey(); +} +inline void KeystoreRequest::set_privatekey(const std::string& value) { + _internal_set_privatekey(value); + // @@protoc_insertion_point(field_set:pb.KeystoreRequest.privateKey) +} +inline std::string* KeystoreRequest::mutable_privatekey() { + // @@protoc_insertion_point(field_mutable:pb.KeystoreRequest.privateKey) + return _internal_mutable_privatekey(); +} +inline const std::string& KeystoreRequest::_internal_privatekey() const { + return privatekey_.GetNoArena(); +} +inline void KeystoreRequest::_internal_set_privatekey(const std::string& value) { + + privatekey_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void KeystoreRequest::set_privatekey(std::string&& value) { + + privatekey_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.KeystoreRequest.privateKey) +} +inline void KeystoreRequest::set_privatekey(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + privatekey_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.KeystoreRequest.privateKey) +} +inline void KeystoreRequest::set_privatekey(const void* value, size_t size) { + + privatekey_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.KeystoreRequest.privateKey) +} +inline std::string* KeystoreRequest::_internal_mutable_privatekey() { + + return privatekey_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* KeystoreRequest::release_privatekey() { + // @@protoc_insertion_point(field_release:pb.KeystoreRequest.privateKey) + + return privatekey_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void KeystoreRequest::set_allocated_privatekey(std::string* privatekey) { + if (privatekey != nullptr) { + + } else { + + } + privatekey_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), privatekey); + // @@protoc_insertion_point(field_set_allocated:pb.KeystoreRequest.privateKey) +} + +// ------------------------------------------------------------------- + +// KeystoreResponse + +// .pb.KSREQTYPE requestType = 1; +inline void KeystoreResponse::clear_requesttype() { + requesttype_ = 0; +} +inline ::pb::KSREQTYPE KeystoreResponse::_internal_requesttype() const { + return static_cast< ::pb::KSREQTYPE >(requesttype_); +} +inline ::pb::KSREQTYPE KeystoreResponse::requesttype() const { + // @@protoc_insertion_point(field_get:pb.KeystoreResponse.requestType) + return _internal_requesttype(); +} +inline void KeystoreResponse::_internal_set_requesttype(::pb::KSREQTYPE value) { + + requesttype_ = value; +} +inline void KeystoreResponse::set_requesttype(::pb::KSREQTYPE value) { + _internal_set_requesttype(value); + // @@protoc_insertion_point(field_set:pb.KeystoreResponse.requestType) +} + +// bytes privateKey = 2; +inline void KeystoreResponse::clear_privatekey() { + privatekey_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& KeystoreResponse::privatekey() const { + // @@protoc_insertion_point(field_get:pb.KeystoreResponse.privateKey) + return _internal_privatekey(); +} +inline void KeystoreResponse::set_privatekey(const std::string& value) { + _internal_set_privatekey(value); + // @@protoc_insertion_point(field_set:pb.KeystoreResponse.privateKey) +} +inline std::string* KeystoreResponse::mutable_privatekey() { + // @@protoc_insertion_point(field_mutable:pb.KeystoreResponse.privateKey) + return _internal_mutable_privatekey(); +} +inline const std::string& KeystoreResponse::_internal_privatekey() const { + return privatekey_.GetNoArena(); +} +inline void KeystoreResponse::_internal_set_privatekey(const std::string& value) { + + privatekey_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void KeystoreResponse::set_privatekey(std::string&& value) { + + privatekey_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.KeystoreResponse.privateKey) +} +inline void KeystoreResponse::set_privatekey(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + privatekey_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.KeystoreResponse.privateKey) +} +inline void KeystoreResponse::set_privatekey(const void* value, size_t size) { + + privatekey_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.KeystoreResponse.privateKey) +} +inline std::string* KeystoreResponse::_internal_mutable_privatekey() { + + return privatekey_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* KeystoreResponse::release_privatekey() { + // @@protoc_insertion_point(field_release:pb.KeystoreResponse.privateKey) + + return privatekey_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void KeystoreResponse::set_allocated_privatekey(std::string* privatekey) { + if (privatekey != nullptr) { + + } else { + + } + privatekey_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), privatekey); + // @@protoc_insertion_point(field_set_allocated:pb.KeystoreResponse.privateKey) +} + +// repeated string keyNames = 3; +inline int KeystoreResponse::_internal_keynames_size() const { + return keynames_.size(); +} +inline int KeystoreResponse::keynames_size() const { + return _internal_keynames_size(); +} +inline void KeystoreResponse::clear_keynames() { + keynames_.Clear(); +} +inline std::string* KeystoreResponse::add_keynames() { + // @@protoc_insertion_point(field_add_mutable:pb.KeystoreResponse.keyNames) + return _internal_add_keynames(); +} +inline const std::string& KeystoreResponse::_internal_keynames(int index) const { + return keynames_.Get(index); +} +inline const std::string& KeystoreResponse::keynames(int index) const { + // @@protoc_insertion_point(field_get:pb.KeystoreResponse.keyNames) + return _internal_keynames(index); +} +inline std::string* KeystoreResponse::mutable_keynames(int index) { + // @@protoc_insertion_point(field_mutable:pb.KeystoreResponse.keyNames) + return keynames_.Mutable(index); +} +inline void KeystoreResponse::set_keynames(int index, const std::string& value) { + // @@protoc_insertion_point(field_set:pb.KeystoreResponse.keyNames) + keynames_.Mutable(index)->assign(value); +} +inline void KeystoreResponse::set_keynames(int index, std::string&& value) { + // @@protoc_insertion_point(field_set:pb.KeystoreResponse.keyNames) + keynames_.Mutable(index)->assign(std::move(value)); +} +inline void KeystoreResponse::set_keynames(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + keynames_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:pb.KeystoreResponse.keyNames) +} +inline void KeystoreResponse::set_keynames(int index, const char* value, size_t size) { + keynames_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:pb.KeystoreResponse.keyNames) +} +inline std::string* KeystoreResponse::_internal_add_keynames() { + return keynames_.Add(); +} +inline void KeystoreResponse::add_keynames(const std::string& value) { + keynames_.Add()->assign(value); + // @@protoc_insertion_point(field_add:pb.KeystoreResponse.keyNames) +} +inline void KeystoreResponse::add_keynames(std::string&& value) { + keynames_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:pb.KeystoreResponse.keyNames) +} +inline void KeystoreResponse::add_keynames(const char* value) { + GOOGLE_DCHECK(value != nullptr); + keynames_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:pb.KeystoreResponse.keyNames) +} +inline void KeystoreResponse::add_keynames(const char* value, size_t size) { + keynames_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:pb.KeystoreResponse.keyNames) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +KeystoreResponse::keynames() const { + // @@protoc_insertion_point(field_list:pb.KeystoreResponse.keyNames) + return keynames_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +KeystoreResponse::mutable_keynames() { + // @@protoc_insertion_point(field_mutable_list:pb.KeystoreResponse.keyNames) + return &keynames_; +} + +// bool has = 4; +inline void KeystoreResponse::clear_has() { + has_ = false; +} +inline bool KeystoreResponse::_internal_has() const { + return has_; +} +inline bool KeystoreResponse::has() const { + // @@protoc_insertion_point(field_get:pb.KeystoreResponse.has) + return _internal_has(); +} +inline void KeystoreResponse::_internal_set_has(bool value) { + + has_ = value; +} +inline void KeystoreResponse::set_has(bool value) { + _internal_set_has(value); + // @@protoc_insertion_point(field_set:pb.KeystoreResponse.has) +} + +// ------------------------------------------------------------------- + +// PersistRequest + +// repeated string cids = 1; +inline int PersistRequest::_internal_cids_size() const { + return cids_.size(); +} +inline int PersistRequest::cids_size() const { + return _internal_cids_size(); +} +inline void PersistRequest::clear_cids() { + cids_.Clear(); +} +inline std::string* PersistRequest::add_cids() { + // @@protoc_insertion_point(field_add_mutable:pb.PersistRequest.cids) + return _internal_add_cids(); +} +inline const std::string& PersistRequest::_internal_cids(int index) const { + return cids_.Get(index); +} +inline const std::string& PersistRequest::cids(int index) const { + // @@protoc_insertion_point(field_get:pb.PersistRequest.cids) + return _internal_cids(index); +} +inline std::string* PersistRequest::mutable_cids(int index) { + // @@protoc_insertion_point(field_mutable:pb.PersistRequest.cids) + return cids_.Mutable(index); +} +inline void PersistRequest::set_cids(int index, const std::string& value) { + // @@protoc_insertion_point(field_set:pb.PersistRequest.cids) + cids_.Mutable(index)->assign(value); +} +inline void PersistRequest::set_cids(int index, std::string&& value) { + // @@protoc_insertion_point(field_set:pb.PersistRequest.cids) + cids_.Mutable(index)->assign(std::move(value)); +} +inline void PersistRequest::set_cids(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + cids_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:pb.PersistRequest.cids) +} +inline void PersistRequest::set_cids(int index, const char* value, size_t size) { + cids_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:pb.PersistRequest.cids) +} +inline std::string* PersistRequest::_internal_add_cids() { + return cids_.Add(); +} +inline void PersistRequest::add_cids(const std::string& value) { + cids_.Add()->assign(value); + // @@protoc_insertion_point(field_add:pb.PersistRequest.cids) +} +inline void PersistRequest::add_cids(std::string&& value) { + cids_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:pb.PersistRequest.cids) +} +inline void PersistRequest::add_cids(const char* value) { + GOOGLE_DCHECK(value != nullptr); + cids_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:pb.PersistRequest.cids) +} +inline void PersistRequest::add_cids(const char* value, size_t size) { + cids_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:pb.PersistRequest.cids) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +PersistRequest::cids() const { + // @@protoc_insertion_point(field_list:pb.PersistRequest.cids) + return cids_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +PersistRequest::mutable_cids() { + // @@protoc_insertion_point(field_mutable_list:pb.PersistRequest.cids) + return &cids_; +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// PersistResponse + +// map status = 1; +inline int PersistResponse::_internal_status_size() const { + return status_.size(); +} +inline int PersistResponse::status_size() const { + return _internal_status_size(); +} +inline void PersistResponse::clear_status() { + status_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >& +PersistResponse::_internal_status() const { + return status_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >& +PersistResponse::status() const { + // @@protoc_insertion_point(field_map:pb.PersistResponse.status) + return _internal_status(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >* +PersistResponse::_internal_mutable_status() { + return status_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, bool >* +PersistResponse::mutable_status() { + // @@protoc_insertion_point(field_mutable_map:pb.PersistResponse.status) + return _internal_mutable_status(); +} + +// map errors = 2; +inline int PersistResponse::_internal_errors_size() const { + return errors_.size(); +} +inline int PersistResponse::errors_size() const { + return _internal_errors_size(); +} +inline void PersistResponse::clear_errors() { + errors_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +PersistResponse::_internal_errors() const { + return errors_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +PersistResponse::errors() const { + // @@protoc_insertion_point(field_map:pb.PersistResponse.errors) + return _internal_errors(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +PersistResponse::_internal_mutable_errors() { + return errors_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +PersistResponse::mutable_errors() { + // @@protoc_insertion_point(field_mutable_map:pb.PersistResponse.errors) + return _internal_mutable_errors(); +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace pb + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::pb::P2PREQTYPE> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::pb::P2PREQTYPE>() { + return ::pb::P2PREQTYPE_descriptor(); +} +template <> struct is_proto_enum< ::pb::CONNMGMTREQTYPE> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::pb::CONNMGMTREQTYPE>() { + return ::pb::CONNMGMTREQTYPE_descriptor(); +} +template <> struct is_proto_enum< ::pb::EXTRASREQTYPE> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::pb::EXTRASREQTYPE>() { + return ::pb::EXTRASREQTYPE_descriptor(); +} +template <> struct is_proto_enum< ::pb::EXTRASTYPE> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::pb::EXTRASTYPE>() { + return ::pb::EXTRASTYPE_descriptor(); +} +template <> struct is_proto_enum< ::pb::BSREQTYPE> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::pb::BSREQTYPE>() { + return ::pb::BSREQTYPE_descriptor(); +} +template <> struct is_proto_enum< ::pb::BSREQOPTS> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::pb::BSREQOPTS>() { + return ::pb::BSREQOPTS_descriptor(); +} +template <> struct is_proto_enum< ::pb::DAGREQTYPE> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::pb::DAGREQTYPE>() { + return ::pb::DAGREQTYPE_descriptor(); +} +template <> struct is_proto_enum< ::pb::KSREQTYPE> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::pb::KSREQTYPE>() { + return ::pb::KSREQTYPE_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_node_2eproto diff --git a/cpp/pubsub.grpc.pb.cc b/cpp/pubsub.grpc.pb.cc new file mode 100644 index 0000000..919ae71 --- /dev/null +++ b/cpp/pubsub.grpc.pb.cc @@ -0,0 +1,73 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: pubsub.proto + +#include "pubsub.pb.h" +#include "pubsub.grpc.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace pb { + +static const char* PubSubAPI_method_names[] = { + "/pb.PubSubAPI/PubSub", +}; + +std::unique_ptr< PubSubAPI::Stub> PubSubAPI::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< PubSubAPI::Stub> stub(new PubSubAPI::Stub(channel)); + return stub; +} + +PubSubAPI::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel) + : channel_(channel), rpcmethod_PubSub_(PubSubAPI_method_names[0], ::grpc::internal::RpcMethod::BIDI_STREAMING, channel) + {} + +::grpc::ClientReaderWriter< ::pb::PubSubRequest, ::pb::PubSubResponse>* PubSubAPI::Stub::PubSubRaw(::grpc::ClientContext* context) { + return ::grpc_impl::internal::ClientReaderWriterFactory< ::pb::PubSubRequest, ::pb::PubSubResponse>::Create(channel_.get(), rpcmethod_PubSub_, context); +} + +void PubSubAPI::Stub::experimental_async::PubSub(::grpc::ClientContext* context, ::grpc::experimental::ClientBidiReactor< ::pb::PubSubRequest,::pb::PubSubResponse>* reactor) { + ::grpc_impl::internal::ClientCallbackReaderWriterFactory< ::pb::PubSubRequest,::pb::PubSubResponse>::Create(stub_->channel_.get(), stub_->rpcmethod_PubSub_, context, reactor); +} + +::grpc::ClientAsyncReaderWriter< ::pb::PubSubRequest, ::pb::PubSubResponse>* PubSubAPI::Stub::AsyncPubSubRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { + return ::grpc_impl::internal::ClientAsyncReaderWriterFactory< ::pb::PubSubRequest, ::pb::PubSubResponse>::Create(channel_.get(), cq, rpcmethod_PubSub_, context, true, tag); +} + +::grpc::ClientAsyncReaderWriter< ::pb::PubSubRequest, ::pb::PubSubResponse>* PubSubAPI::Stub::PrepareAsyncPubSubRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncReaderWriterFactory< ::pb::PubSubRequest, ::pb::PubSubResponse>::Create(channel_.get(), cq, rpcmethod_PubSub_, context, false, nullptr); +} + +PubSubAPI::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + PubSubAPI_method_names[0], + ::grpc::internal::RpcMethod::BIDI_STREAMING, + new ::grpc::internal::BidiStreamingHandler< PubSubAPI::Service, ::pb::PubSubRequest, ::pb::PubSubResponse>( + std::mem_fn(&PubSubAPI::Service::PubSub), this))); +} + +PubSubAPI::Service::~Service() { +} + +::grpc::Status PubSubAPI::Service::PubSub(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::pb::PubSubResponse, ::pb::PubSubRequest>* stream) { + (void) context; + (void) stream; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +} // namespace pb + diff --git a/cpp/pubsub.grpc.pb.h b/cpp/pubsub.grpc.pb.h new file mode 100644 index 0000000..649a62c --- /dev/null +++ b/cpp/pubsub.grpc.pb.h @@ -0,0 +1,268 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: pubsub.proto +#ifndef GRPC_pubsub_2eproto__INCLUDED +#define GRPC_pubsub_2eproto__INCLUDED + +#include "pubsub.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace pb { + +// PubSubAPI provides a libp2p pubsub API and is equivalent to go-ipfs +// `ipfs pubsub` subset of commands. +class PubSubAPI final { + public: + static constexpr char const* service_full_name() { + return "pb.PubSubAPI"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + // PubSub allows controlling libp2p pubsub topics and subscriptions using + // a bidirectional streaming API + std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::pb::PubSubRequest, ::pb::PubSubResponse>> PubSub(::grpc::ClientContext* context) { + return std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::pb::PubSubRequest, ::pb::PubSubResponse>>(PubSubRaw(context)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::pb::PubSubRequest, ::pb::PubSubResponse>> AsyncPubSub(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::pb::PubSubRequest, ::pb::PubSubResponse>>(AsyncPubSubRaw(context, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::pb::PubSubRequest, ::pb::PubSubResponse>> PrepareAsyncPubSub(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::pb::PubSubRequest, ::pb::PubSubResponse>>(PrepareAsyncPubSubRaw(context, cq)); + } + class experimental_async_interface { + public: + virtual ~experimental_async_interface() {} + // PubSub allows controlling libp2p pubsub topics and subscriptions using + // a bidirectional streaming API + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void PubSub(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::pb::PubSubRequest,::pb::PubSubResponse>* reactor) = 0; + #else + virtual void PubSub(::grpc::ClientContext* context, ::grpc::experimental::ClientBidiReactor< ::pb::PubSubRequest,::pb::PubSubResponse>* reactor) = 0; + #endif + }; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + typedef class experimental_async_interface async_interface; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + async_interface* async() { return experimental_async(); } + #endif + virtual class experimental_async_interface* experimental_async() { return nullptr; } + private: + virtual ::grpc::ClientReaderWriterInterface< ::pb::PubSubRequest, ::pb::PubSubResponse>* PubSubRaw(::grpc::ClientContext* context) = 0; + virtual ::grpc::ClientAsyncReaderWriterInterface< ::pb::PubSubRequest, ::pb::PubSubResponse>* AsyncPubSubRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0; + virtual ::grpc::ClientAsyncReaderWriterInterface< ::pb::PubSubRequest, ::pb::PubSubResponse>* PrepareAsyncPubSubRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel); + std::unique_ptr< ::grpc::ClientReaderWriter< ::pb::PubSubRequest, ::pb::PubSubResponse>> PubSub(::grpc::ClientContext* context) { + return std::unique_ptr< ::grpc::ClientReaderWriter< ::pb::PubSubRequest, ::pb::PubSubResponse>>(PubSubRaw(context)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::pb::PubSubRequest, ::pb::PubSubResponse>> AsyncPubSub(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::pb::PubSubRequest, ::pb::PubSubResponse>>(AsyncPubSubRaw(context, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::pb::PubSubRequest, ::pb::PubSubResponse>> PrepareAsyncPubSub(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::pb::PubSubRequest, ::pb::PubSubResponse>>(PrepareAsyncPubSubRaw(context, cq)); + } + class experimental_async final : + public StubInterface::experimental_async_interface { + public: + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void PubSub(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::pb::PubSubRequest,::pb::PubSubResponse>* reactor) override; + #else + void PubSub(::grpc::ClientContext* context, ::grpc::experimental::ClientBidiReactor< ::pb::PubSubRequest,::pb::PubSubResponse>* reactor) override; + #endif + private: + friend class Stub; + explicit experimental_async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class experimental_async_interface* experimental_async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class experimental_async async_stub_{this}; + ::grpc::ClientReaderWriter< ::pb::PubSubRequest, ::pb::PubSubResponse>* PubSubRaw(::grpc::ClientContext* context) override; + ::grpc::ClientAsyncReaderWriter< ::pb::PubSubRequest, ::pb::PubSubResponse>* AsyncPubSubRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) override; + ::grpc::ClientAsyncReaderWriter< ::pb::PubSubRequest, ::pb::PubSubResponse>* PrepareAsyncPubSubRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_PubSub_; + }; + static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + + class Service : public ::grpc::Service { + public: + Service(); + virtual ~Service(); + // PubSub allows controlling libp2p pubsub topics and subscriptions using + // a bidirectional streaming API + virtual ::grpc::Status PubSub(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::pb::PubSubResponse, ::pb::PubSubRequest>* stream); + }; + template + class WithAsyncMethod_PubSub : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_PubSub() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_PubSub() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status PubSub(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::pb::PubSubResponse, ::pb::PubSubRequest>* /*stream*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestPubSub(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::pb::PubSubResponse, ::pb::PubSubRequest>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncBidiStreaming(0, context, stream, new_call_cq, notification_cq, tag); + } + }; + typedef WithAsyncMethod_PubSub AsyncService; + template + class ExperimentalWithCallbackMethod_PubSub : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_PubSub() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(0, + new ::grpc_impl::internal::CallbackBidiHandler< ::pb::PubSubRequest, ::pb::PubSubResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context) { return this->PubSub(context); })); + } + ~ExperimentalWithCallbackMethod_PubSub() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status PubSub(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::pb::PubSubResponse, ::pb::PubSubRequest>* /*stream*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerBidiReactor< ::pb::PubSubRequest, ::pb::PubSubResponse>* PubSub( + ::grpc::CallbackServerContext* /*context*/) + #else + virtual ::grpc::experimental::ServerBidiReactor< ::pb::PubSubRequest, ::pb::PubSubResponse>* PubSub( + ::grpc::experimental::CallbackServerContext* /*context*/) + #endif + { return nullptr; } + }; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + typedef ExperimentalWithCallbackMethod_PubSub CallbackService; + #endif + + typedef ExperimentalWithCallbackMethod_PubSub ExperimentalCallbackService; + template + class WithGenericMethod_PubSub : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_PubSub() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_PubSub() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status PubSub(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::pb::PubSubResponse, ::pb::PubSubRequest>* /*stream*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_PubSub : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_PubSub() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_PubSub() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status PubSub(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::pb::PubSubResponse, ::pb::PubSubRequest>* /*stream*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestPubSub(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncBidiStreaming(0, context, stream, new_call_cq, notification_cq, tag); + } + }; + template + class ExperimentalWithRawCallbackMethod_PubSub : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_PubSub() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(0, + new ::grpc_impl::internal::CallbackBidiHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context) { return this->PubSub(context); })); + } + ~ExperimentalWithRawCallbackMethod_PubSub() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status PubSub(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::pb::PubSubResponse, ::pb::PubSubRequest>* /*stream*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerBidiReactor< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* PubSub( + ::grpc::CallbackServerContext* /*context*/) + #else + virtual ::grpc::experimental::ServerBidiReactor< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* PubSub( + ::grpc::experimental::CallbackServerContext* /*context*/) + #endif + { return nullptr; } + }; + typedef Service StreamedUnaryService; + typedef Service SplitStreamedService; + typedef Service StreamedService; +}; + +} // namespace pb + + +#endif // GRPC_pubsub_2eproto__INCLUDED diff --git a/cpp/pubsub.pb.cc b/cpp/pubsub.pb.cc new file mode 100644 index 0000000..aef9a15 --- /dev/null +++ b/cpp/pubsub.pb.cc @@ -0,0 +1,1369 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: pubsub.proto + +#include "pubsub.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include +extern PROTOBUF_INTERNAL_EXPORT_pubsub_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_PubSubMessage_pubsub_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_pubsub_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_PubSubPeer_pubsub_2eproto; +namespace pb { +class PubSubRequestDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _PubSubRequest_default_instance_; +class PubSubResponseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _PubSubResponse_default_instance_; +class PubSubMessageDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _PubSubMessage_default_instance_; +class PubSubPeerDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _PubSubPeer_default_instance_; +} // namespace pb +static void InitDefaultsscc_info_PubSubMessage_pubsub_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_PubSubMessage_default_instance_; + new (ptr) ::pb::PubSubMessage(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::PubSubMessage::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_PubSubMessage_pubsub_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_PubSubMessage_pubsub_2eproto}, {}}; + +static void InitDefaultsscc_info_PubSubPeer_pubsub_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_PubSubPeer_default_instance_; + new (ptr) ::pb::PubSubPeer(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::PubSubPeer::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_PubSubPeer_pubsub_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_PubSubPeer_pubsub_2eproto}, {}}; + +static void InitDefaultsscc_info_PubSubRequest_pubsub_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_PubSubRequest_default_instance_; + new (ptr) ::pb::PubSubRequest(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::PubSubRequest::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_PubSubRequest_pubsub_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_PubSubRequest_pubsub_2eproto}, {}}; + +static void InitDefaultsscc_info_PubSubResponse_pubsub_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_PubSubResponse_default_instance_; + new (ptr) ::pb::PubSubResponse(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::PubSubResponse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_PubSubResponse_pubsub_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_PubSubResponse_pubsub_2eproto}, { + &scc_info_PubSubMessage_pubsub_2eproto.base, + &scc_info_PubSubPeer_pubsub_2eproto.base,}}; + +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_pubsub_2eproto[4]; +static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_pubsub_2eproto[1]; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_pubsub_2eproto = nullptr; + +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_pubsub_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::PubSubRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::PubSubRequest, requesttype_), + PROTOBUF_FIELD_OFFSET(::pb::PubSubRequest, topics_), + PROTOBUF_FIELD_OFFSET(::pb::PubSubRequest, data_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::PubSubResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::PubSubResponse, requesttype_), + PROTOBUF_FIELD_OFFSET(::pb::PubSubResponse, message_), + PROTOBUF_FIELD_OFFSET(::pb::PubSubResponse, topics_), + PROTOBUF_FIELD_OFFSET(::pb::PubSubResponse, peers_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::PubSubMessage, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::PubSubMessage, from_), + PROTOBUF_FIELD_OFFSET(::pb::PubSubMessage, data_), + PROTOBUF_FIELD_OFFSET(::pb::PubSubMessage, seqno_), + PROTOBUF_FIELD_OFFSET(::pb::PubSubMessage, topicids_), + PROTOBUF_FIELD_OFFSET(::pb::PubSubMessage, signature_), + PROTOBUF_FIELD_OFFSET(::pb::PubSubMessage, key_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::PubSubPeer, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::PubSubPeer, topic_), + PROTOBUF_FIELD_OFFSET(::pb::PubSubPeer, peerid_), +}; +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(::pb::PubSubRequest)}, + { 8, -1, sizeof(::pb::PubSubResponse)}, + { 17, -1, sizeof(::pb::PubSubMessage)}, + { 28, -1, sizeof(::pb::PubSubPeer)}, +}; + +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&::pb::_PubSubRequest_default_instance_), + reinterpret_cast(&::pb::_PubSubResponse_default_instance_), + reinterpret_cast(&::pb::_PubSubMessage_default_instance_), + reinterpret_cast(&::pb::_PubSubPeer_default_instance_), +}; + +const char descriptor_table_protodef_pubsub_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\014pubsub.proto\022\002pb\"Q\n\rPubSubRequest\022\"\n\013r" + "equestType\030\001 \001(\0162\r.pb.PSREQTYPE\022\016\n\006topic" + "s\030\002 \003(\t\022\014\n\004data\030\003 \001(\014\"\207\001\n\016PubSubResponse" + "\022\"\n\013requestType\030\001 \001(\0162\r.pb.PSREQTYPE\022\"\n\007" + "message\030\002 \003(\0132\021.pb.PubSubMessage\022\016\n\006topi" + "cs\030\003 \003(\t\022\035\n\005peers\030\004 \003(\0132\016.pb.PubSubPeer\"" + "l\n\rPubSubMessage\022\014\n\004from\030\001 \001(\014\022\014\n\004data\030\002" + " \001(\014\022\r\n\005seqno\030\003 \001(\014\022\020\n\010topicIDs\030\004 \003(\t\022\021\n" + "\tsignature\030\005 \001(\014\022\013\n\003key\030\006 \001(\014\"+\n\nPubSubP" + "eer\022\r\n\005topic\030\001 \001(\t\022\016\n\006peerID\030\002 \001(\t*S\n\tPS" + "REQTYPE\022\021\n\rPS_GET_TOPICS\020\000\022\021\n\rPS_LIST_PE" + "ERS\020\001\022\020\n\014PS_SUBSCRIBE\020\002\022\016\n\nPS_PUBLISH\020\0032" + "B\n\tPubSubAPI\0225\n\006PubSub\022\021.pb.PubSubReques" + "t\032\022.pb.PubSubResponse\"\000(\0010\001b\006proto3" + ; +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_pubsub_2eproto_deps[1] = { +}; +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_pubsub_2eproto_sccs[4] = { + &scc_info_PubSubMessage_pubsub_2eproto.base, + &scc_info_PubSubPeer_pubsub_2eproto.base, + &scc_info_PubSubRequest_pubsub_2eproto.base, + &scc_info_PubSubResponse_pubsub_2eproto.base, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_pubsub_2eproto_once; +static bool descriptor_table_pubsub_2eproto_initialized = false; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_pubsub_2eproto = { + &descriptor_table_pubsub_2eproto_initialized, descriptor_table_protodef_pubsub_2eproto, "pubsub.proto", 555, + &descriptor_table_pubsub_2eproto_once, descriptor_table_pubsub_2eproto_sccs, descriptor_table_pubsub_2eproto_deps, 4, 0, + schemas, file_default_instances, TableStruct_pubsub_2eproto::offsets, + file_level_metadata_pubsub_2eproto, 4, file_level_enum_descriptors_pubsub_2eproto, file_level_service_descriptors_pubsub_2eproto, +}; + +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_pubsub_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_pubsub_2eproto), true); +namespace pb { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PSREQTYPE_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_pubsub_2eproto); + return file_level_enum_descriptors_pubsub_2eproto[0]; +} +bool PSREQTYPE_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + + +// =================================================================== + +void PubSubRequest::InitAsDefaultInstance() { +} +class PubSubRequest::_Internal { + public: +}; + +PubSubRequest::PubSubRequest() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.PubSubRequest) +} +PubSubRequest::PubSubRequest(const PubSubRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr), + topics_(from.topics_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_data().empty()) { + data_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.data_); + } + requesttype_ = from.requesttype_; + // @@protoc_insertion_point(copy_constructor:pb.PubSubRequest) +} + +void PubSubRequest::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_PubSubRequest_pubsub_2eproto.base); + data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + requesttype_ = 0; +} + +PubSubRequest::~PubSubRequest() { + // @@protoc_insertion_point(destructor:pb.PubSubRequest) + SharedDtor(); +} + +void PubSubRequest::SharedDtor() { + data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void PubSubRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const PubSubRequest& PubSubRequest::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_PubSubRequest_pubsub_2eproto.base); + return *internal_default_instance(); +} + + +void PubSubRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.PubSubRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + topics_.Clear(); + data_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + requesttype_ = 0; + _internal_metadata_.Clear(); +} + +const char* PubSubRequest::_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) { + // .pb.PSREQTYPE requestType = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + _internal_set_requesttype(static_cast<::pb::PSREQTYPE>(val)); + } else goto handle_unusual; + continue; + // repeated string topics = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_topics(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.PubSubRequest.topics")); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else goto handle_unusual; + continue; + // bytes data = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + auto str = _internal_mutable_data(); + 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_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* PubSubRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.PubSubRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .pb.PSREQTYPE requestType = 1; + if (this->requesttype() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_requesttype(), target); + } + + // repeated string topics = 2; + for (int i = 0, n = this->_internal_topics_size(); i < n; i++) { + const auto& s = this->_internal_topics(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.PubSubRequest.topics"); + target = stream->WriteString(2, s, target); + } + + // bytes data = 3; + if (this->data().size() > 0) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_data(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.PubSubRequest) + return target; +} + +size_t PubSubRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.PubSubRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string topics = 2; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(topics_.size()); + for (int i = 0, n = topics_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + topics_.Get(i)); + } + + // bytes data = 3; + if (this->data().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_data()); + } + + // .pb.PSREQTYPE requestType = 1; + if (this->requesttype() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_requesttype()); + } + + 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 PubSubRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.PubSubRequest) + GOOGLE_DCHECK_NE(&from, this); + const PubSubRequest* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.PubSubRequest) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.PubSubRequest) + MergeFrom(*source); + } +} + +void PubSubRequest::MergeFrom(const PubSubRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.PubSubRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + topics_.MergeFrom(from.topics_); + if (from.data().size() > 0) { + + data_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.data_); + } + if (from.requesttype() != 0) { + _internal_set_requesttype(from._internal_requesttype()); + } +} + +void PubSubRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.PubSubRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void PubSubRequest::CopyFrom(const PubSubRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.PubSubRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool PubSubRequest::IsInitialized() const { + return true; +} + +void PubSubRequest::InternalSwap(PubSubRequest* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + topics_.InternalSwap(&other->topics_); + data_.Swap(&other->data_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(requesttype_, other->requesttype_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata PubSubRequest::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void PubSubResponse::InitAsDefaultInstance() { +} +class PubSubResponse::_Internal { + public: +}; + +PubSubResponse::PubSubResponse() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.PubSubResponse) +} +PubSubResponse::PubSubResponse(const PubSubResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr), + message_(from.message_), + topics_(from.topics_), + peers_(from.peers_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + requesttype_ = from.requesttype_; + // @@protoc_insertion_point(copy_constructor:pb.PubSubResponse) +} + +void PubSubResponse::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_PubSubResponse_pubsub_2eproto.base); + requesttype_ = 0; +} + +PubSubResponse::~PubSubResponse() { + // @@protoc_insertion_point(destructor:pb.PubSubResponse) + SharedDtor(); +} + +void PubSubResponse::SharedDtor() { +} + +void PubSubResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const PubSubResponse& PubSubResponse::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_PubSubResponse_pubsub_2eproto.base); + return *internal_default_instance(); +} + + +void PubSubResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.PubSubResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + message_.Clear(); + topics_.Clear(); + peers_.Clear(); + requesttype_ = 0; + _internal_metadata_.Clear(); +} + +const char* PubSubResponse::_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) { + // .pb.PSREQTYPE requestType = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + _internal_set_requesttype(static_cast<::pb::PSREQTYPE>(val)); + } else goto handle_unusual; + continue; + // repeated .pb.PubSubMessage message = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_message(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else goto handle_unusual; + continue; + // repeated string topics = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_topics(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.PubSubResponse.topics")); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else goto handle_unusual; + continue; + // repeated .pb.PubSubPeer peers = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_peers(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* PubSubResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.PubSubResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .pb.PSREQTYPE requestType = 1; + if (this->requesttype() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_requesttype(), target); + } + + // repeated .pb.PubSubMessage message = 2; + for (unsigned int i = 0, + n = static_cast(this->_internal_message_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, this->_internal_message(i), target, stream); + } + + // repeated string topics = 3; + for (int i = 0, n = this->_internal_topics_size(); i < n; i++) { + const auto& s = this->_internal_topics(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.PubSubResponse.topics"); + target = stream->WriteString(3, s, target); + } + + // repeated .pb.PubSubPeer peers = 4; + for (unsigned int i = 0, + n = static_cast(this->_internal_peers_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(4, this->_internal_peers(i), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.PubSubResponse) + return target; +} + +size_t PubSubResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.PubSubResponse) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .pb.PubSubMessage message = 2; + total_size += 1UL * this->_internal_message_size(); + for (const auto& msg : this->message_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated string topics = 3; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(topics_.size()); + for (int i = 0, n = topics_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + topics_.Get(i)); + } + + // repeated .pb.PubSubPeer peers = 4; + total_size += 1UL * this->_internal_peers_size(); + for (const auto& msg : this->peers_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // .pb.PSREQTYPE requestType = 1; + if (this->requesttype() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_requesttype()); + } + + 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 PubSubResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.PubSubResponse) + GOOGLE_DCHECK_NE(&from, this); + const PubSubResponse* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.PubSubResponse) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.PubSubResponse) + MergeFrom(*source); + } +} + +void PubSubResponse::MergeFrom(const PubSubResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.PubSubResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + message_.MergeFrom(from.message_); + topics_.MergeFrom(from.topics_); + peers_.MergeFrom(from.peers_); + if (from.requesttype() != 0) { + _internal_set_requesttype(from._internal_requesttype()); + } +} + +void PubSubResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.PubSubResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void PubSubResponse::CopyFrom(const PubSubResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.PubSubResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool PubSubResponse::IsInitialized() const { + return true; +} + +void PubSubResponse::InternalSwap(PubSubResponse* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + message_.InternalSwap(&other->message_); + topics_.InternalSwap(&other->topics_); + peers_.InternalSwap(&other->peers_); + swap(requesttype_, other->requesttype_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata PubSubResponse::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void PubSubMessage::InitAsDefaultInstance() { +} +class PubSubMessage::_Internal { + public: +}; + +PubSubMessage::PubSubMessage() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.PubSubMessage) +} +PubSubMessage::PubSubMessage(const PubSubMessage& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr), + topicids_(from.topicids_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + from_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_from().empty()) { + from_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.from_); + } + data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_data().empty()) { + data_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.data_); + } + seqno_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_seqno().empty()) { + seqno_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.seqno_); + } + signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_signature().empty()) { + signature_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.signature_); + } + key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_key().empty()) { + key_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.key_); + } + // @@protoc_insertion_point(copy_constructor:pb.PubSubMessage) +} + +void PubSubMessage::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_PubSubMessage_pubsub_2eproto.base); + from_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + seqno_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +PubSubMessage::~PubSubMessage() { + // @@protoc_insertion_point(destructor:pb.PubSubMessage) + SharedDtor(); +} + +void PubSubMessage::SharedDtor() { + from_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + seqno_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + signature_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void PubSubMessage::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const PubSubMessage& PubSubMessage::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_PubSubMessage_pubsub_2eproto.base); + return *internal_default_instance(); +} + + +void PubSubMessage::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.PubSubMessage) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + topicids_.Clear(); + from_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + data_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + seqno_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + signature_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + key_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + _internal_metadata_.Clear(); +} + +const char* PubSubMessage::_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) { + // bytes from = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_from(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bytes data = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_data(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bytes seqno = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + auto str = _internal_mutable_seqno(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else goto handle_unusual; + continue; + // repeated string topicIDs = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_topicids(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.PubSubMessage.topicIDs")); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); + } else goto handle_unusual; + continue; + // bytes signature = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + auto str = _internal_mutable_signature(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bytes key = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { + auto str = _internal_mutable_key(); + 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_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* PubSubMessage::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.PubSubMessage) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bytes from = 1; + if (this->from().size() > 0) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_from(), target); + } + + // bytes data = 2; + if (this->data().size() > 0) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_data(), target); + } + + // bytes seqno = 3; + if (this->seqno().size() > 0) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_seqno(), target); + } + + // repeated string topicIDs = 4; + for (int i = 0, n = this->_internal_topicids_size(); i < n; i++) { + const auto& s = this->_internal_topicids(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.PubSubMessage.topicIDs"); + target = stream->WriteString(4, s, target); + } + + // bytes signature = 5; + if (this->signature().size() > 0) { + target = stream->WriteBytesMaybeAliased( + 5, this->_internal_signature(), target); + } + + // bytes key = 6; + if (this->key().size() > 0) { + target = stream->WriteBytesMaybeAliased( + 6, this->_internal_key(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.PubSubMessage) + return target; +} + +size_t PubSubMessage::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.PubSubMessage) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string topicIDs = 4; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(topicids_.size()); + for (int i = 0, n = topicids_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + topicids_.Get(i)); + } + + // bytes from = 1; + if (this->from().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_from()); + } + + // bytes data = 2; + if (this->data().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_data()); + } + + // bytes seqno = 3; + if (this->seqno().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_seqno()); + } + + // bytes signature = 5; + if (this->signature().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_signature()); + } + + // bytes key = 6; + if (this->key().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_key()); + } + + 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 PubSubMessage::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.PubSubMessage) + GOOGLE_DCHECK_NE(&from, this); + const PubSubMessage* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.PubSubMessage) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.PubSubMessage) + MergeFrom(*source); + } +} + +void PubSubMessage::MergeFrom(const PubSubMessage& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.PubSubMessage) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + topicids_.MergeFrom(from.topicids_); + if (from.from().size() > 0) { + + from_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.from_); + } + if (from.data().size() > 0) { + + data_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.data_); + } + if (from.seqno().size() > 0) { + + seqno_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.seqno_); + } + if (from.signature().size() > 0) { + + signature_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.signature_); + } + if (from.key().size() > 0) { + + key_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.key_); + } +} + +void PubSubMessage::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.PubSubMessage) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void PubSubMessage::CopyFrom(const PubSubMessage& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.PubSubMessage) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool PubSubMessage::IsInitialized() const { + return true; +} + +void PubSubMessage::InternalSwap(PubSubMessage* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + topicids_.InternalSwap(&other->topicids_); + from_.Swap(&other->from_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + data_.Swap(&other->data_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + seqno_.Swap(&other->seqno_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + signature_.Swap(&other->signature_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + key_.Swap(&other->key_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} + +::PROTOBUF_NAMESPACE_ID::Metadata PubSubMessage::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void PubSubPeer::InitAsDefaultInstance() { +} +class PubSubPeer::_Internal { + public: +}; + +PubSubPeer::PubSubPeer() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.PubSubPeer) +} +PubSubPeer::PubSubPeer(const PubSubPeer& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + topic_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_topic().empty()) { + topic_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.topic_); + } + peerid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_peerid().empty()) { + peerid_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.peerid_); + } + // @@protoc_insertion_point(copy_constructor:pb.PubSubPeer) +} + +void PubSubPeer::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_PubSubPeer_pubsub_2eproto.base); + topic_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + peerid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +PubSubPeer::~PubSubPeer() { + // @@protoc_insertion_point(destructor:pb.PubSubPeer) + SharedDtor(); +} + +void PubSubPeer::SharedDtor() { + topic_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + peerid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void PubSubPeer::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const PubSubPeer& PubSubPeer::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_PubSubPeer_pubsub_2eproto.base); + return *internal_default_instance(); +} + + +void PubSubPeer::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.PubSubPeer) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + topic_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + peerid_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + _internal_metadata_.Clear(); +} + +const char* PubSubPeer::_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 topic = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_topic(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.PubSubPeer.topic")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string peerID = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_peerid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.PubSubPeer.peerID")); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* PubSubPeer::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.PubSubPeer) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string topic = 1; + if (this->topic().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_topic().data(), static_cast(this->_internal_topic().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.PubSubPeer.topic"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_topic(), target); + } + + // string peerID = 2; + if (this->peerid().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_peerid().data(), static_cast(this->_internal_peerid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.PubSubPeer.peerID"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_peerid(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.PubSubPeer) + return target; +} + +size_t PubSubPeer::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.PubSubPeer) + 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 topic = 1; + if (this->topic().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_topic()); + } + + // string peerID = 2; + if (this->peerid().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_peerid()); + } + + 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 PubSubPeer::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.PubSubPeer) + GOOGLE_DCHECK_NE(&from, this); + const PubSubPeer* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.PubSubPeer) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.PubSubPeer) + MergeFrom(*source); + } +} + +void PubSubPeer::MergeFrom(const PubSubPeer& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.PubSubPeer) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.topic().size() > 0) { + + topic_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.topic_); + } + if (from.peerid().size() > 0) { + + peerid_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.peerid_); + } +} + +void PubSubPeer::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.PubSubPeer) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void PubSubPeer::CopyFrom(const PubSubPeer& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.PubSubPeer) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool PubSubPeer::IsInitialized() const { + return true; +} + +void PubSubPeer::InternalSwap(PubSubPeer* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + topic_.Swap(&other->topic_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + peerid_.Swap(&other->peerid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} + +::PROTOBUF_NAMESPACE_ID::Metadata PubSubPeer::GetMetadata() const { + return GetMetadataStatic(); +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace pb +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::pb::PubSubRequest* Arena::CreateMaybeMessage< ::pb::PubSubRequest >(Arena* arena) { + return Arena::CreateInternal< ::pb::PubSubRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::PubSubResponse* Arena::CreateMaybeMessage< ::pb::PubSubResponse >(Arena* arena) { + return Arena::CreateInternal< ::pb::PubSubResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::PubSubMessage* Arena::CreateMaybeMessage< ::pb::PubSubMessage >(Arena* arena) { + return Arena::CreateInternal< ::pb::PubSubMessage >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::PubSubPeer* Arena::CreateMaybeMessage< ::pb::PubSubPeer >(Arena* arena) { + return Arena::CreateInternal< ::pb::PubSubPeer >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/cpp/pubsub.pb.h b/cpp/pubsub.pb.h new file mode 100644 index 0000000..84eda2e --- /dev/null +++ b/cpp/pubsub.pb.h @@ -0,0 +1,1729 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: pubsub.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_pubsub_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_pubsub_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3011000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3011002 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_pubsub_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_pubsub_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[4] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_pubsub_2eproto; +namespace pb { +class PubSubMessage; +class PubSubMessageDefaultTypeInternal; +extern PubSubMessageDefaultTypeInternal _PubSubMessage_default_instance_; +class PubSubPeer; +class PubSubPeerDefaultTypeInternal; +extern PubSubPeerDefaultTypeInternal _PubSubPeer_default_instance_; +class PubSubRequest; +class PubSubRequestDefaultTypeInternal; +extern PubSubRequestDefaultTypeInternal _PubSubRequest_default_instance_; +class PubSubResponse; +class PubSubResponseDefaultTypeInternal; +extern PubSubResponseDefaultTypeInternal _PubSubResponse_default_instance_; +} // namespace pb +PROTOBUF_NAMESPACE_OPEN +template<> ::pb::PubSubMessage* Arena::CreateMaybeMessage<::pb::PubSubMessage>(Arena*); +template<> ::pb::PubSubPeer* Arena::CreateMaybeMessage<::pb::PubSubPeer>(Arena*); +template<> ::pb::PubSubRequest* Arena::CreateMaybeMessage<::pb::PubSubRequest>(Arena*); +template<> ::pb::PubSubResponse* Arena::CreateMaybeMessage<::pb::PubSubResponse>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace pb { + +enum PSREQTYPE : int { + PS_GET_TOPICS = 0, + PS_LIST_PEERS = 1, + PS_SUBSCRIBE = 2, + PS_PUBLISH = 3, + PSREQTYPE_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + PSREQTYPE_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() +}; +bool PSREQTYPE_IsValid(int value); +constexpr PSREQTYPE PSREQTYPE_MIN = PS_GET_TOPICS; +constexpr PSREQTYPE PSREQTYPE_MAX = PS_PUBLISH; +constexpr int PSREQTYPE_ARRAYSIZE = PSREQTYPE_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PSREQTYPE_descriptor(); +template +inline const std::string& PSREQTYPE_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function PSREQTYPE_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + PSREQTYPE_descriptor(), enum_t_value); +} +inline bool PSREQTYPE_Parse( + const std::string& name, PSREQTYPE* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + PSREQTYPE_descriptor(), name, value); +} +// =================================================================== + +class PubSubRequest : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.PubSubRequest) */ { + public: + PubSubRequest(); + virtual ~PubSubRequest(); + + PubSubRequest(const PubSubRequest& from); + PubSubRequest(PubSubRequest&& from) noexcept + : PubSubRequest() { + *this = ::std::move(from); + } + + inline PubSubRequest& operator=(const PubSubRequest& from) { + CopyFrom(from); + return *this; + } + inline PubSubRequest& operator=(PubSubRequest&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 PubSubRequest& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const PubSubRequest* internal_default_instance() { + return reinterpret_cast( + &_PubSubRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(PubSubRequest& a, PubSubRequest& b) { + a.Swap(&b); + } + inline void Swap(PubSubRequest* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline PubSubRequest* New() const final { + return CreateMaybeMessage(nullptr); + } + + PubSubRequest* 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 PubSubRequest& from); + void MergeFrom(const PubSubRequest& 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(PubSubRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.PubSubRequest"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_pubsub_2eproto); + return ::descriptor_table_pubsub_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTopicsFieldNumber = 2, + kDataFieldNumber = 3, + kRequestTypeFieldNumber = 1, + }; + // repeated string topics = 2; + int topics_size() const; + private: + int _internal_topics_size() const; + public: + void clear_topics(); + const std::string& topics(int index) const; + std::string* mutable_topics(int index); + void set_topics(int index, const std::string& value); + void set_topics(int index, std::string&& value); + void set_topics(int index, const char* value); + void set_topics(int index, const char* value, size_t size); + std::string* add_topics(); + void add_topics(const std::string& value); + void add_topics(std::string&& value); + void add_topics(const char* value); + void add_topics(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& topics() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_topics(); + private: + const std::string& _internal_topics(int index) const; + std::string* _internal_add_topics(); + public: + + // bytes data = 3; + void clear_data(); + const std::string& data() const; + void set_data(const std::string& value); + void set_data(std::string&& value); + void set_data(const char* value); + void set_data(const void* value, size_t size); + std::string* mutable_data(); + std::string* release_data(); + void set_allocated_data(std::string* data); + private: + const std::string& _internal_data() const; + void _internal_set_data(const std::string& value); + std::string* _internal_mutable_data(); + public: + + // .pb.PSREQTYPE requestType = 1; + void clear_requesttype(); + ::pb::PSREQTYPE requesttype() const; + void set_requesttype(::pb::PSREQTYPE value); + private: + ::pb::PSREQTYPE _internal_requesttype() const; + void _internal_set_requesttype(::pb::PSREQTYPE value); + public: + + // @@protoc_insertion_point(class_scope:pb.PubSubRequest) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField topics_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_; + int requesttype_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_pubsub_2eproto; +}; +// ------------------------------------------------------------------- + +class PubSubResponse : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.PubSubResponse) */ { + public: + PubSubResponse(); + virtual ~PubSubResponse(); + + PubSubResponse(const PubSubResponse& from); + PubSubResponse(PubSubResponse&& from) noexcept + : PubSubResponse() { + *this = ::std::move(from); + } + + inline PubSubResponse& operator=(const PubSubResponse& from) { + CopyFrom(from); + return *this; + } + inline PubSubResponse& operator=(PubSubResponse&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 PubSubResponse& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const PubSubResponse* internal_default_instance() { + return reinterpret_cast( + &_PubSubResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(PubSubResponse& a, PubSubResponse& b) { + a.Swap(&b); + } + inline void Swap(PubSubResponse* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline PubSubResponse* New() const final { + return CreateMaybeMessage(nullptr); + } + + PubSubResponse* 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 PubSubResponse& from); + void MergeFrom(const PubSubResponse& 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(PubSubResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.PubSubResponse"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_pubsub_2eproto); + return ::descriptor_table_pubsub_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kMessageFieldNumber = 2, + kTopicsFieldNumber = 3, + kPeersFieldNumber = 4, + kRequestTypeFieldNumber = 1, + }; + // repeated .pb.PubSubMessage message = 2; + int message_size() const; + private: + int _internal_message_size() const; + public: + void clear_message(); + ::pb::PubSubMessage* mutable_message(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::PubSubMessage >* + mutable_message(); + private: + const ::pb::PubSubMessage& _internal_message(int index) const; + ::pb::PubSubMessage* _internal_add_message(); + public: + const ::pb::PubSubMessage& message(int index) const; + ::pb::PubSubMessage* add_message(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::PubSubMessage >& + message() const; + + // repeated string topics = 3; + int topics_size() const; + private: + int _internal_topics_size() const; + public: + void clear_topics(); + const std::string& topics(int index) const; + std::string* mutable_topics(int index); + void set_topics(int index, const std::string& value); + void set_topics(int index, std::string&& value); + void set_topics(int index, const char* value); + void set_topics(int index, const char* value, size_t size); + std::string* add_topics(); + void add_topics(const std::string& value); + void add_topics(std::string&& value); + void add_topics(const char* value); + void add_topics(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& topics() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_topics(); + private: + const std::string& _internal_topics(int index) const; + std::string* _internal_add_topics(); + public: + + // repeated .pb.PubSubPeer peers = 4; + int peers_size() const; + private: + int _internal_peers_size() const; + public: + void clear_peers(); + ::pb::PubSubPeer* mutable_peers(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::PubSubPeer >* + mutable_peers(); + private: + const ::pb::PubSubPeer& _internal_peers(int index) const; + ::pb::PubSubPeer* _internal_add_peers(); + public: + const ::pb::PubSubPeer& peers(int index) const; + ::pb::PubSubPeer* add_peers(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::PubSubPeer >& + peers() const; + + // .pb.PSREQTYPE requestType = 1; + void clear_requesttype(); + ::pb::PSREQTYPE requesttype() const; + void set_requesttype(::pb::PSREQTYPE value); + private: + ::pb::PSREQTYPE _internal_requesttype() const; + void _internal_set_requesttype(::pb::PSREQTYPE value); + public: + + // @@protoc_insertion_point(class_scope:pb.PubSubResponse) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::PubSubMessage > message_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField topics_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::PubSubPeer > peers_; + int requesttype_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_pubsub_2eproto; +}; +// ------------------------------------------------------------------- + +class PubSubMessage : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.PubSubMessage) */ { + public: + PubSubMessage(); + virtual ~PubSubMessage(); + + PubSubMessage(const PubSubMessage& from); + PubSubMessage(PubSubMessage&& from) noexcept + : PubSubMessage() { + *this = ::std::move(from); + } + + inline PubSubMessage& operator=(const PubSubMessage& from) { + CopyFrom(from); + return *this; + } + inline PubSubMessage& operator=(PubSubMessage&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 PubSubMessage& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const PubSubMessage* internal_default_instance() { + return reinterpret_cast( + &_PubSubMessage_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(PubSubMessage& a, PubSubMessage& b) { + a.Swap(&b); + } + inline void Swap(PubSubMessage* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline PubSubMessage* New() const final { + return CreateMaybeMessage(nullptr); + } + + PubSubMessage* 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 PubSubMessage& from); + void MergeFrom(const PubSubMessage& 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(PubSubMessage* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.PubSubMessage"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_pubsub_2eproto); + return ::descriptor_table_pubsub_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTopicIDsFieldNumber = 4, + kFromFieldNumber = 1, + kDataFieldNumber = 2, + kSeqnoFieldNumber = 3, + kSignatureFieldNumber = 5, + kKeyFieldNumber = 6, + }; + // repeated string topicIDs = 4; + int topicids_size() const; + private: + int _internal_topicids_size() const; + public: + void clear_topicids(); + const std::string& topicids(int index) const; + std::string* mutable_topicids(int index); + void set_topicids(int index, const std::string& value); + void set_topicids(int index, std::string&& value); + void set_topicids(int index, const char* value); + void set_topicids(int index, const char* value, size_t size); + std::string* add_topicids(); + void add_topicids(const std::string& value); + void add_topicids(std::string&& value); + void add_topicids(const char* value); + void add_topicids(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& topicids() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_topicids(); + private: + const std::string& _internal_topicids(int index) const; + std::string* _internal_add_topicids(); + public: + + // bytes from = 1; + void clear_from(); + const std::string& from() const; + void set_from(const std::string& value); + void set_from(std::string&& value); + void set_from(const char* value); + void set_from(const void* value, size_t size); + std::string* mutable_from(); + std::string* release_from(); + void set_allocated_from(std::string* from); + private: + const std::string& _internal_from() const; + void _internal_set_from(const std::string& value); + std::string* _internal_mutable_from(); + public: + + // bytes data = 2; + void clear_data(); + const std::string& data() const; + void set_data(const std::string& value); + void set_data(std::string&& value); + void set_data(const char* value); + void set_data(const void* value, size_t size); + std::string* mutable_data(); + std::string* release_data(); + void set_allocated_data(std::string* data); + private: + const std::string& _internal_data() const; + void _internal_set_data(const std::string& value); + std::string* _internal_mutable_data(); + public: + + // bytes seqno = 3; + void clear_seqno(); + const std::string& seqno() const; + void set_seqno(const std::string& value); + void set_seqno(std::string&& value); + void set_seqno(const char* value); + void set_seqno(const void* value, size_t size); + std::string* mutable_seqno(); + std::string* release_seqno(); + void set_allocated_seqno(std::string* seqno); + private: + const std::string& _internal_seqno() const; + void _internal_set_seqno(const std::string& value); + std::string* _internal_mutable_seqno(); + public: + + // bytes signature = 5; + void clear_signature(); + const std::string& signature() const; + void set_signature(const std::string& value); + void set_signature(std::string&& value); + void set_signature(const char* value); + void set_signature(const void* value, size_t size); + std::string* mutable_signature(); + std::string* release_signature(); + void set_allocated_signature(std::string* signature); + private: + const std::string& _internal_signature() const; + void _internal_set_signature(const std::string& value); + std::string* _internal_mutable_signature(); + public: + + // bytes key = 6; + void clear_key(); + const std::string& key() const; + void set_key(const std::string& value); + void set_key(std::string&& value); + void set_key(const char* value); + void set_key(const void* value, size_t size); + std::string* mutable_key(); + std::string* release_key(); + void set_allocated_key(std::string* key); + private: + const std::string& _internal_key() const; + void _internal_set_key(const std::string& value); + std::string* _internal_mutable_key(); + public: + + // @@protoc_insertion_point(class_scope:pb.PubSubMessage) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField topicids_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr from_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr seqno_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr signature_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_pubsub_2eproto; +}; +// ------------------------------------------------------------------- + +class PubSubPeer : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.PubSubPeer) */ { + public: + PubSubPeer(); + virtual ~PubSubPeer(); + + PubSubPeer(const PubSubPeer& from); + PubSubPeer(PubSubPeer&& from) noexcept + : PubSubPeer() { + *this = ::std::move(from); + } + + inline PubSubPeer& operator=(const PubSubPeer& from) { + CopyFrom(from); + return *this; + } + inline PubSubPeer& operator=(PubSubPeer&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 PubSubPeer& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const PubSubPeer* internal_default_instance() { + return reinterpret_cast( + &_PubSubPeer_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(PubSubPeer& a, PubSubPeer& b) { + a.Swap(&b); + } + inline void Swap(PubSubPeer* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline PubSubPeer* New() const final { + return CreateMaybeMessage(nullptr); + } + + PubSubPeer* 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 PubSubPeer& from); + void MergeFrom(const PubSubPeer& 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(PubSubPeer* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.PubSubPeer"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_pubsub_2eproto); + return ::descriptor_table_pubsub_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTopicFieldNumber = 1, + kPeerIDFieldNumber = 2, + }; + // string topic = 1; + void clear_topic(); + const std::string& topic() const; + void set_topic(const std::string& value); + void set_topic(std::string&& value); + void set_topic(const char* value); + void set_topic(const char* value, size_t size); + std::string* mutable_topic(); + std::string* release_topic(); + void set_allocated_topic(std::string* topic); + private: + const std::string& _internal_topic() const; + void _internal_set_topic(const std::string& value); + std::string* _internal_mutable_topic(); + public: + + // string peerID = 2; + void clear_peerid(); + const std::string& peerid() const; + void set_peerid(const std::string& value); + void set_peerid(std::string&& value); + void set_peerid(const char* value); + void set_peerid(const char* value, size_t size); + std::string* mutable_peerid(); + std::string* release_peerid(); + void set_allocated_peerid(std::string* peerid); + private: + const std::string& _internal_peerid() const; + void _internal_set_peerid(const std::string& value); + std::string* _internal_mutable_peerid(); + public: + + // @@protoc_insertion_point(class_scope:pb.PubSubPeer) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr topic_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr peerid_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_pubsub_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// PubSubRequest + +// .pb.PSREQTYPE requestType = 1; +inline void PubSubRequest::clear_requesttype() { + requesttype_ = 0; +} +inline ::pb::PSREQTYPE PubSubRequest::_internal_requesttype() const { + return static_cast< ::pb::PSREQTYPE >(requesttype_); +} +inline ::pb::PSREQTYPE PubSubRequest::requesttype() const { + // @@protoc_insertion_point(field_get:pb.PubSubRequest.requestType) + return _internal_requesttype(); +} +inline void PubSubRequest::_internal_set_requesttype(::pb::PSREQTYPE value) { + + requesttype_ = value; +} +inline void PubSubRequest::set_requesttype(::pb::PSREQTYPE value) { + _internal_set_requesttype(value); + // @@protoc_insertion_point(field_set:pb.PubSubRequest.requestType) +} + +// repeated string topics = 2; +inline int PubSubRequest::_internal_topics_size() const { + return topics_.size(); +} +inline int PubSubRequest::topics_size() const { + return _internal_topics_size(); +} +inline void PubSubRequest::clear_topics() { + topics_.Clear(); +} +inline std::string* PubSubRequest::add_topics() { + // @@protoc_insertion_point(field_add_mutable:pb.PubSubRequest.topics) + return _internal_add_topics(); +} +inline const std::string& PubSubRequest::_internal_topics(int index) const { + return topics_.Get(index); +} +inline const std::string& PubSubRequest::topics(int index) const { + // @@protoc_insertion_point(field_get:pb.PubSubRequest.topics) + return _internal_topics(index); +} +inline std::string* PubSubRequest::mutable_topics(int index) { + // @@protoc_insertion_point(field_mutable:pb.PubSubRequest.topics) + return topics_.Mutable(index); +} +inline void PubSubRequest::set_topics(int index, const std::string& value) { + // @@protoc_insertion_point(field_set:pb.PubSubRequest.topics) + topics_.Mutable(index)->assign(value); +} +inline void PubSubRequest::set_topics(int index, std::string&& value) { + // @@protoc_insertion_point(field_set:pb.PubSubRequest.topics) + topics_.Mutable(index)->assign(std::move(value)); +} +inline void PubSubRequest::set_topics(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + topics_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:pb.PubSubRequest.topics) +} +inline void PubSubRequest::set_topics(int index, const char* value, size_t size) { + topics_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:pb.PubSubRequest.topics) +} +inline std::string* PubSubRequest::_internal_add_topics() { + return topics_.Add(); +} +inline void PubSubRequest::add_topics(const std::string& value) { + topics_.Add()->assign(value); + // @@protoc_insertion_point(field_add:pb.PubSubRequest.topics) +} +inline void PubSubRequest::add_topics(std::string&& value) { + topics_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:pb.PubSubRequest.topics) +} +inline void PubSubRequest::add_topics(const char* value) { + GOOGLE_DCHECK(value != nullptr); + topics_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:pb.PubSubRequest.topics) +} +inline void PubSubRequest::add_topics(const char* value, size_t size) { + topics_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:pb.PubSubRequest.topics) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +PubSubRequest::topics() const { + // @@protoc_insertion_point(field_list:pb.PubSubRequest.topics) + return topics_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +PubSubRequest::mutable_topics() { + // @@protoc_insertion_point(field_mutable_list:pb.PubSubRequest.topics) + return &topics_; +} + +// bytes data = 3; +inline void PubSubRequest::clear_data() { + data_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& PubSubRequest::data() const { + // @@protoc_insertion_point(field_get:pb.PubSubRequest.data) + return _internal_data(); +} +inline void PubSubRequest::set_data(const std::string& value) { + _internal_set_data(value); + // @@protoc_insertion_point(field_set:pb.PubSubRequest.data) +} +inline std::string* PubSubRequest::mutable_data() { + // @@protoc_insertion_point(field_mutable:pb.PubSubRequest.data) + return _internal_mutable_data(); +} +inline const std::string& PubSubRequest::_internal_data() const { + return data_.GetNoArena(); +} +inline void PubSubRequest::_internal_set_data(const std::string& value) { + + data_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void PubSubRequest::set_data(std::string&& value) { + + data_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.PubSubRequest.data) +} +inline void PubSubRequest::set_data(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + data_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.PubSubRequest.data) +} +inline void PubSubRequest::set_data(const void* value, size_t size) { + + data_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.PubSubRequest.data) +} +inline std::string* PubSubRequest::_internal_mutable_data() { + + return data_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* PubSubRequest::release_data() { + // @@protoc_insertion_point(field_release:pb.PubSubRequest.data) + + return data_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void PubSubRequest::set_allocated_data(std::string* data) { + if (data != nullptr) { + + } else { + + } + data_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), data); + // @@protoc_insertion_point(field_set_allocated:pb.PubSubRequest.data) +} + +// ------------------------------------------------------------------- + +// PubSubResponse + +// .pb.PSREQTYPE requestType = 1; +inline void PubSubResponse::clear_requesttype() { + requesttype_ = 0; +} +inline ::pb::PSREQTYPE PubSubResponse::_internal_requesttype() const { + return static_cast< ::pb::PSREQTYPE >(requesttype_); +} +inline ::pb::PSREQTYPE PubSubResponse::requesttype() const { + // @@protoc_insertion_point(field_get:pb.PubSubResponse.requestType) + return _internal_requesttype(); +} +inline void PubSubResponse::_internal_set_requesttype(::pb::PSREQTYPE value) { + + requesttype_ = value; +} +inline void PubSubResponse::set_requesttype(::pb::PSREQTYPE value) { + _internal_set_requesttype(value); + // @@protoc_insertion_point(field_set:pb.PubSubResponse.requestType) +} + +// repeated .pb.PubSubMessage message = 2; +inline int PubSubResponse::_internal_message_size() const { + return message_.size(); +} +inline int PubSubResponse::message_size() const { + return _internal_message_size(); +} +inline void PubSubResponse::clear_message() { + message_.Clear(); +} +inline ::pb::PubSubMessage* PubSubResponse::mutable_message(int index) { + // @@protoc_insertion_point(field_mutable:pb.PubSubResponse.message) + return message_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::PubSubMessage >* +PubSubResponse::mutable_message() { + // @@protoc_insertion_point(field_mutable_list:pb.PubSubResponse.message) + return &message_; +} +inline const ::pb::PubSubMessage& PubSubResponse::_internal_message(int index) const { + return message_.Get(index); +} +inline const ::pb::PubSubMessage& PubSubResponse::message(int index) const { + // @@protoc_insertion_point(field_get:pb.PubSubResponse.message) + return _internal_message(index); +} +inline ::pb::PubSubMessage* PubSubResponse::_internal_add_message() { + return message_.Add(); +} +inline ::pb::PubSubMessage* PubSubResponse::add_message() { + // @@protoc_insertion_point(field_add:pb.PubSubResponse.message) + return _internal_add_message(); +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::PubSubMessage >& +PubSubResponse::message() const { + // @@protoc_insertion_point(field_list:pb.PubSubResponse.message) + return message_; +} + +// repeated string topics = 3; +inline int PubSubResponse::_internal_topics_size() const { + return topics_.size(); +} +inline int PubSubResponse::topics_size() const { + return _internal_topics_size(); +} +inline void PubSubResponse::clear_topics() { + topics_.Clear(); +} +inline std::string* PubSubResponse::add_topics() { + // @@protoc_insertion_point(field_add_mutable:pb.PubSubResponse.topics) + return _internal_add_topics(); +} +inline const std::string& PubSubResponse::_internal_topics(int index) const { + return topics_.Get(index); +} +inline const std::string& PubSubResponse::topics(int index) const { + // @@protoc_insertion_point(field_get:pb.PubSubResponse.topics) + return _internal_topics(index); +} +inline std::string* PubSubResponse::mutable_topics(int index) { + // @@protoc_insertion_point(field_mutable:pb.PubSubResponse.topics) + return topics_.Mutable(index); +} +inline void PubSubResponse::set_topics(int index, const std::string& value) { + // @@protoc_insertion_point(field_set:pb.PubSubResponse.topics) + topics_.Mutable(index)->assign(value); +} +inline void PubSubResponse::set_topics(int index, std::string&& value) { + // @@protoc_insertion_point(field_set:pb.PubSubResponse.topics) + topics_.Mutable(index)->assign(std::move(value)); +} +inline void PubSubResponse::set_topics(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + topics_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:pb.PubSubResponse.topics) +} +inline void PubSubResponse::set_topics(int index, const char* value, size_t size) { + topics_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:pb.PubSubResponse.topics) +} +inline std::string* PubSubResponse::_internal_add_topics() { + return topics_.Add(); +} +inline void PubSubResponse::add_topics(const std::string& value) { + topics_.Add()->assign(value); + // @@protoc_insertion_point(field_add:pb.PubSubResponse.topics) +} +inline void PubSubResponse::add_topics(std::string&& value) { + topics_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:pb.PubSubResponse.topics) +} +inline void PubSubResponse::add_topics(const char* value) { + GOOGLE_DCHECK(value != nullptr); + topics_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:pb.PubSubResponse.topics) +} +inline void PubSubResponse::add_topics(const char* value, size_t size) { + topics_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:pb.PubSubResponse.topics) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +PubSubResponse::topics() const { + // @@protoc_insertion_point(field_list:pb.PubSubResponse.topics) + return topics_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +PubSubResponse::mutable_topics() { + // @@protoc_insertion_point(field_mutable_list:pb.PubSubResponse.topics) + return &topics_; +} + +// repeated .pb.PubSubPeer peers = 4; +inline int PubSubResponse::_internal_peers_size() const { + return peers_.size(); +} +inline int PubSubResponse::peers_size() const { + return _internal_peers_size(); +} +inline void PubSubResponse::clear_peers() { + peers_.Clear(); +} +inline ::pb::PubSubPeer* PubSubResponse::mutable_peers(int index) { + // @@protoc_insertion_point(field_mutable:pb.PubSubResponse.peers) + return peers_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::PubSubPeer >* +PubSubResponse::mutable_peers() { + // @@protoc_insertion_point(field_mutable_list:pb.PubSubResponse.peers) + return &peers_; +} +inline const ::pb::PubSubPeer& PubSubResponse::_internal_peers(int index) const { + return peers_.Get(index); +} +inline const ::pb::PubSubPeer& PubSubResponse::peers(int index) const { + // @@protoc_insertion_point(field_get:pb.PubSubResponse.peers) + return _internal_peers(index); +} +inline ::pb::PubSubPeer* PubSubResponse::_internal_add_peers() { + return peers_.Add(); +} +inline ::pb::PubSubPeer* PubSubResponse::add_peers() { + // @@protoc_insertion_point(field_add:pb.PubSubResponse.peers) + return _internal_add_peers(); +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::PubSubPeer >& +PubSubResponse::peers() const { + // @@protoc_insertion_point(field_list:pb.PubSubResponse.peers) + return peers_; +} + +// ------------------------------------------------------------------- + +// PubSubMessage + +// bytes from = 1; +inline void PubSubMessage::clear_from() { + from_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& PubSubMessage::from() const { + // @@protoc_insertion_point(field_get:pb.PubSubMessage.from) + return _internal_from(); +} +inline void PubSubMessage::set_from(const std::string& value) { + _internal_set_from(value); + // @@protoc_insertion_point(field_set:pb.PubSubMessage.from) +} +inline std::string* PubSubMessage::mutable_from() { + // @@protoc_insertion_point(field_mutable:pb.PubSubMessage.from) + return _internal_mutable_from(); +} +inline const std::string& PubSubMessage::_internal_from() const { + return from_.GetNoArena(); +} +inline void PubSubMessage::_internal_set_from(const std::string& value) { + + from_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void PubSubMessage::set_from(std::string&& value) { + + from_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.PubSubMessage.from) +} +inline void PubSubMessage::set_from(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + from_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.PubSubMessage.from) +} +inline void PubSubMessage::set_from(const void* value, size_t size) { + + from_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.PubSubMessage.from) +} +inline std::string* PubSubMessage::_internal_mutable_from() { + + return from_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* PubSubMessage::release_from() { + // @@protoc_insertion_point(field_release:pb.PubSubMessage.from) + + return from_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void PubSubMessage::set_allocated_from(std::string* from) { + if (from != nullptr) { + + } else { + + } + from_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from); + // @@protoc_insertion_point(field_set_allocated:pb.PubSubMessage.from) +} + +// bytes data = 2; +inline void PubSubMessage::clear_data() { + data_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& PubSubMessage::data() const { + // @@protoc_insertion_point(field_get:pb.PubSubMessage.data) + return _internal_data(); +} +inline void PubSubMessage::set_data(const std::string& value) { + _internal_set_data(value); + // @@protoc_insertion_point(field_set:pb.PubSubMessage.data) +} +inline std::string* PubSubMessage::mutable_data() { + // @@protoc_insertion_point(field_mutable:pb.PubSubMessage.data) + return _internal_mutable_data(); +} +inline const std::string& PubSubMessage::_internal_data() const { + return data_.GetNoArena(); +} +inline void PubSubMessage::_internal_set_data(const std::string& value) { + + data_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void PubSubMessage::set_data(std::string&& value) { + + data_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.PubSubMessage.data) +} +inline void PubSubMessage::set_data(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + data_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.PubSubMessage.data) +} +inline void PubSubMessage::set_data(const void* value, size_t size) { + + data_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.PubSubMessage.data) +} +inline std::string* PubSubMessage::_internal_mutable_data() { + + return data_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* PubSubMessage::release_data() { + // @@protoc_insertion_point(field_release:pb.PubSubMessage.data) + + return data_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void PubSubMessage::set_allocated_data(std::string* data) { + if (data != nullptr) { + + } else { + + } + data_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), data); + // @@protoc_insertion_point(field_set_allocated:pb.PubSubMessage.data) +} + +// bytes seqno = 3; +inline void PubSubMessage::clear_seqno() { + seqno_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& PubSubMessage::seqno() const { + // @@protoc_insertion_point(field_get:pb.PubSubMessage.seqno) + return _internal_seqno(); +} +inline void PubSubMessage::set_seqno(const std::string& value) { + _internal_set_seqno(value); + // @@protoc_insertion_point(field_set:pb.PubSubMessage.seqno) +} +inline std::string* PubSubMessage::mutable_seqno() { + // @@protoc_insertion_point(field_mutable:pb.PubSubMessage.seqno) + return _internal_mutable_seqno(); +} +inline const std::string& PubSubMessage::_internal_seqno() const { + return seqno_.GetNoArena(); +} +inline void PubSubMessage::_internal_set_seqno(const std::string& value) { + + seqno_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void PubSubMessage::set_seqno(std::string&& value) { + + seqno_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.PubSubMessage.seqno) +} +inline void PubSubMessage::set_seqno(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + seqno_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.PubSubMessage.seqno) +} +inline void PubSubMessage::set_seqno(const void* value, size_t size) { + + seqno_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.PubSubMessage.seqno) +} +inline std::string* PubSubMessage::_internal_mutable_seqno() { + + return seqno_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* PubSubMessage::release_seqno() { + // @@protoc_insertion_point(field_release:pb.PubSubMessage.seqno) + + return seqno_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void PubSubMessage::set_allocated_seqno(std::string* seqno) { + if (seqno != nullptr) { + + } else { + + } + seqno_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), seqno); + // @@protoc_insertion_point(field_set_allocated:pb.PubSubMessage.seqno) +} + +// repeated string topicIDs = 4; +inline int PubSubMessage::_internal_topicids_size() const { + return topicids_.size(); +} +inline int PubSubMessage::topicids_size() const { + return _internal_topicids_size(); +} +inline void PubSubMessage::clear_topicids() { + topicids_.Clear(); +} +inline std::string* PubSubMessage::add_topicids() { + // @@protoc_insertion_point(field_add_mutable:pb.PubSubMessage.topicIDs) + return _internal_add_topicids(); +} +inline const std::string& PubSubMessage::_internal_topicids(int index) const { + return topicids_.Get(index); +} +inline const std::string& PubSubMessage::topicids(int index) const { + // @@protoc_insertion_point(field_get:pb.PubSubMessage.topicIDs) + return _internal_topicids(index); +} +inline std::string* PubSubMessage::mutable_topicids(int index) { + // @@protoc_insertion_point(field_mutable:pb.PubSubMessage.topicIDs) + return topicids_.Mutable(index); +} +inline void PubSubMessage::set_topicids(int index, const std::string& value) { + // @@protoc_insertion_point(field_set:pb.PubSubMessage.topicIDs) + topicids_.Mutable(index)->assign(value); +} +inline void PubSubMessage::set_topicids(int index, std::string&& value) { + // @@protoc_insertion_point(field_set:pb.PubSubMessage.topicIDs) + topicids_.Mutable(index)->assign(std::move(value)); +} +inline void PubSubMessage::set_topicids(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + topicids_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:pb.PubSubMessage.topicIDs) +} +inline void PubSubMessage::set_topicids(int index, const char* value, size_t size) { + topicids_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:pb.PubSubMessage.topicIDs) +} +inline std::string* PubSubMessage::_internal_add_topicids() { + return topicids_.Add(); +} +inline void PubSubMessage::add_topicids(const std::string& value) { + topicids_.Add()->assign(value); + // @@protoc_insertion_point(field_add:pb.PubSubMessage.topicIDs) +} +inline void PubSubMessage::add_topicids(std::string&& value) { + topicids_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:pb.PubSubMessage.topicIDs) +} +inline void PubSubMessage::add_topicids(const char* value) { + GOOGLE_DCHECK(value != nullptr); + topicids_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:pb.PubSubMessage.topicIDs) +} +inline void PubSubMessage::add_topicids(const char* value, size_t size) { + topicids_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:pb.PubSubMessage.topicIDs) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +PubSubMessage::topicids() const { + // @@protoc_insertion_point(field_list:pb.PubSubMessage.topicIDs) + return topicids_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +PubSubMessage::mutable_topicids() { + // @@protoc_insertion_point(field_mutable_list:pb.PubSubMessage.topicIDs) + return &topicids_; +} + +// bytes signature = 5; +inline void PubSubMessage::clear_signature() { + signature_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& PubSubMessage::signature() const { + // @@protoc_insertion_point(field_get:pb.PubSubMessage.signature) + return _internal_signature(); +} +inline void PubSubMessage::set_signature(const std::string& value) { + _internal_set_signature(value); + // @@protoc_insertion_point(field_set:pb.PubSubMessage.signature) +} +inline std::string* PubSubMessage::mutable_signature() { + // @@protoc_insertion_point(field_mutable:pb.PubSubMessage.signature) + return _internal_mutable_signature(); +} +inline const std::string& PubSubMessage::_internal_signature() const { + return signature_.GetNoArena(); +} +inline void PubSubMessage::_internal_set_signature(const std::string& value) { + + signature_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void PubSubMessage::set_signature(std::string&& value) { + + signature_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.PubSubMessage.signature) +} +inline void PubSubMessage::set_signature(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + signature_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.PubSubMessage.signature) +} +inline void PubSubMessage::set_signature(const void* value, size_t size) { + + signature_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.PubSubMessage.signature) +} +inline std::string* PubSubMessage::_internal_mutable_signature() { + + return signature_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* PubSubMessage::release_signature() { + // @@protoc_insertion_point(field_release:pb.PubSubMessage.signature) + + return signature_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void PubSubMessage::set_allocated_signature(std::string* signature) { + if (signature != nullptr) { + + } else { + + } + signature_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), signature); + // @@protoc_insertion_point(field_set_allocated:pb.PubSubMessage.signature) +} + +// bytes key = 6; +inline void PubSubMessage::clear_key() { + key_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& PubSubMessage::key() const { + // @@protoc_insertion_point(field_get:pb.PubSubMessage.key) + return _internal_key(); +} +inline void PubSubMessage::set_key(const std::string& value) { + _internal_set_key(value); + // @@protoc_insertion_point(field_set:pb.PubSubMessage.key) +} +inline std::string* PubSubMessage::mutable_key() { + // @@protoc_insertion_point(field_mutable:pb.PubSubMessage.key) + return _internal_mutable_key(); +} +inline const std::string& PubSubMessage::_internal_key() const { + return key_.GetNoArena(); +} +inline void PubSubMessage::_internal_set_key(const std::string& value) { + + key_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void PubSubMessage::set_key(std::string&& value) { + + key_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.PubSubMessage.key) +} +inline void PubSubMessage::set_key(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + key_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.PubSubMessage.key) +} +inline void PubSubMessage::set_key(const void* value, size_t size) { + + key_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.PubSubMessage.key) +} +inline std::string* PubSubMessage::_internal_mutable_key() { + + return key_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* PubSubMessage::release_key() { + // @@protoc_insertion_point(field_release:pb.PubSubMessage.key) + + return key_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void PubSubMessage::set_allocated_key(std::string* key) { + if (key != nullptr) { + + } else { + + } + key_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), key); + // @@protoc_insertion_point(field_set_allocated:pb.PubSubMessage.key) +} + +// ------------------------------------------------------------------- + +// PubSubPeer + +// string topic = 1; +inline void PubSubPeer::clear_topic() { + topic_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& PubSubPeer::topic() const { + // @@protoc_insertion_point(field_get:pb.PubSubPeer.topic) + return _internal_topic(); +} +inline void PubSubPeer::set_topic(const std::string& value) { + _internal_set_topic(value); + // @@protoc_insertion_point(field_set:pb.PubSubPeer.topic) +} +inline std::string* PubSubPeer::mutable_topic() { + // @@protoc_insertion_point(field_mutable:pb.PubSubPeer.topic) + return _internal_mutable_topic(); +} +inline const std::string& PubSubPeer::_internal_topic() const { + return topic_.GetNoArena(); +} +inline void PubSubPeer::_internal_set_topic(const std::string& value) { + + topic_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void PubSubPeer::set_topic(std::string&& value) { + + topic_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.PubSubPeer.topic) +} +inline void PubSubPeer::set_topic(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + topic_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.PubSubPeer.topic) +} +inline void PubSubPeer::set_topic(const char* value, size_t size) { + + topic_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.PubSubPeer.topic) +} +inline std::string* PubSubPeer::_internal_mutable_topic() { + + return topic_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* PubSubPeer::release_topic() { + // @@protoc_insertion_point(field_release:pb.PubSubPeer.topic) + + return topic_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void PubSubPeer::set_allocated_topic(std::string* topic) { + if (topic != nullptr) { + + } else { + + } + topic_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), topic); + // @@protoc_insertion_point(field_set_allocated:pb.PubSubPeer.topic) +} + +// string peerID = 2; +inline void PubSubPeer::clear_peerid() { + peerid_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& PubSubPeer::peerid() const { + // @@protoc_insertion_point(field_get:pb.PubSubPeer.peerID) + return _internal_peerid(); +} +inline void PubSubPeer::set_peerid(const std::string& value) { + _internal_set_peerid(value); + // @@protoc_insertion_point(field_set:pb.PubSubPeer.peerID) +} +inline std::string* PubSubPeer::mutable_peerid() { + // @@protoc_insertion_point(field_mutable:pb.PubSubPeer.peerID) + return _internal_mutable_peerid(); +} +inline const std::string& PubSubPeer::_internal_peerid() const { + return peerid_.GetNoArena(); +} +inline void PubSubPeer::_internal_set_peerid(const std::string& value) { + + peerid_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void PubSubPeer::set_peerid(std::string&& value) { + + peerid_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.PubSubPeer.peerID) +} +inline void PubSubPeer::set_peerid(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + peerid_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.PubSubPeer.peerID) +} +inline void PubSubPeer::set_peerid(const char* value, size_t size) { + + peerid_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.PubSubPeer.peerID) +} +inline std::string* PubSubPeer::_internal_mutable_peerid() { + + return peerid_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* PubSubPeer::release_peerid() { + // @@protoc_insertion_point(field_release:pb.PubSubPeer.peerID) + + return peerid_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void PubSubPeer::set_allocated_peerid(std::string* peerid) { + if (peerid != nullptr) { + + } else { + + } + peerid_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), peerid); + // @@protoc_insertion_point(field_set_allocated:pb.PubSubPeer.peerID) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace pb + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::pb::PSREQTYPE> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::pb::PSREQTYPE>() { + return ::pb::PSREQTYPE_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_pubsub_2eproto diff --git a/cpp/replication.grpc.pb.cc b/cpp/replication.grpc.pb.cc new file mode 100644 index 0000000..20adc4a --- /dev/null +++ b/cpp/replication.grpc.pb.cc @@ -0,0 +1,176 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: replication.proto + +#include "replication.pb.h" +#include "replication.grpc.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace pb { + +static const char* replicator_method_names[] = { + "/pb.replicator/Add", + "/pb.replicator/Status", + "/pb.replicator/GetSubscriptionUpdate", + "/pb.replicator/SubmitReplication", +}; + +std::unique_ptr< replicator::Stub> replicator::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< replicator::Stub> stub(new replicator::Stub(channel)); + return stub; +} + +replicator::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel) + : channel_(channel), rpcmethod_Add_(replicator_method_names[0], ::grpc::internal::RpcMethod::SERVER_STREAMING, channel) + , rpcmethod_Status_(replicator_method_names[1], ::grpc::internal::RpcMethod::SERVER_STREAMING, channel) + , rpcmethod_GetSubscriptionUpdate_(replicator_method_names[2], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_SubmitReplication_(replicator_method_names[3], ::grpc::internal::RpcMethod::SERVER_STREAMING, channel) + {} + +::grpc::ClientReader< ::pb::ReplicationStatus>* replicator::Stub::AddRaw(::grpc::ClientContext* context, const ::pb::Subscription& request) { + return ::grpc_impl::internal::ClientReaderFactory< ::pb::ReplicationStatus>::Create(channel_.get(), rpcmethod_Add_, context, request); +} + +void replicator::Stub::experimental_async::Add(::grpc::ClientContext* context, ::pb::Subscription* request, ::grpc::experimental::ClientReadReactor< ::pb::ReplicationStatus>* reactor) { + ::grpc_impl::internal::ClientCallbackReaderFactory< ::pb::ReplicationStatus>::Create(stub_->channel_.get(), stub_->rpcmethod_Add_, context, request, reactor); +} + +::grpc::ClientAsyncReader< ::pb::ReplicationStatus>* replicator::Stub::AsyncAddRaw(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq, void* tag) { + return ::grpc_impl::internal::ClientAsyncReaderFactory< ::pb::ReplicationStatus>::Create(channel_.get(), cq, rpcmethod_Add_, context, request, true, tag); +} + +::grpc::ClientAsyncReader< ::pb::ReplicationStatus>* replicator::Stub::PrepareAsyncAddRaw(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncReaderFactory< ::pb::ReplicationStatus>::Create(channel_.get(), cq, rpcmethod_Add_, context, request, false, nullptr); +} + +::grpc::ClientReader< ::pb::ReplicationStatus>* replicator::Stub::StatusRaw(::grpc::ClientContext* context, const ::pb::Subscription& request) { + return ::grpc_impl::internal::ClientReaderFactory< ::pb::ReplicationStatus>::Create(channel_.get(), rpcmethod_Status_, context, request); +} + +void replicator::Stub::experimental_async::Status(::grpc::ClientContext* context, ::pb::Subscription* request, ::grpc::experimental::ClientReadReactor< ::pb::ReplicationStatus>* reactor) { + ::grpc_impl::internal::ClientCallbackReaderFactory< ::pb::ReplicationStatus>::Create(stub_->channel_.get(), stub_->rpcmethod_Status_, context, request, reactor); +} + +::grpc::ClientAsyncReader< ::pb::ReplicationStatus>* replicator::Stub::AsyncStatusRaw(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq, void* tag) { + return ::grpc_impl::internal::ClientAsyncReaderFactory< ::pb::ReplicationStatus>::Create(channel_.get(), cq, rpcmethod_Status_, context, request, true, tag); +} + +::grpc::ClientAsyncReader< ::pb::ReplicationStatus>* replicator::Stub::PrepareAsyncStatusRaw(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncReaderFactory< ::pb::ReplicationStatus>::Create(channel_.get(), cq, rpcmethod_Status_, context, request, false, nullptr); +} + +::grpc::Status replicator::Stub::GetSubscriptionUpdate(::grpc::ClientContext* context, const ::pb::Subscription& request, ::pb::SubscriptionUpdate* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_GetSubscriptionUpdate_, context, request, response); +} + +void replicator::Stub::experimental_async::GetSubscriptionUpdate(::grpc::ClientContext* context, const ::pb::Subscription* request, ::pb::SubscriptionUpdate* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_GetSubscriptionUpdate_, context, request, response, std::move(f)); +} + +void replicator::Stub::experimental_async::GetSubscriptionUpdate(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::SubscriptionUpdate* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_GetSubscriptionUpdate_, context, request, response, std::move(f)); +} + +void replicator::Stub::experimental_async::GetSubscriptionUpdate(::grpc::ClientContext* context, const ::pb::Subscription* request, ::pb::SubscriptionUpdate* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_GetSubscriptionUpdate_, context, request, response, reactor); +} + +void replicator::Stub::experimental_async::GetSubscriptionUpdate(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::SubscriptionUpdate* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_GetSubscriptionUpdate_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::pb::SubscriptionUpdate>* replicator::Stub::AsyncGetSubscriptionUpdateRaw(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::SubscriptionUpdate>::Create(channel_.get(), cq, rpcmethod_GetSubscriptionUpdate_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::pb::SubscriptionUpdate>* replicator::Stub::PrepareAsyncGetSubscriptionUpdateRaw(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::SubscriptionUpdate>::Create(channel_.get(), cq, rpcmethod_GetSubscriptionUpdate_, context, request, false); +} + +::grpc::ClientReader< ::pb::ReplicationStatus>* replicator::Stub::SubmitReplicationRaw(::grpc::ClientContext* context, const ::pb::SignedSubscription& request) { + return ::grpc_impl::internal::ClientReaderFactory< ::pb::ReplicationStatus>::Create(channel_.get(), rpcmethod_SubmitReplication_, context, request); +} + +void replicator::Stub::experimental_async::SubmitReplication(::grpc::ClientContext* context, ::pb::SignedSubscription* request, ::grpc::experimental::ClientReadReactor< ::pb::ReplicationStatus>* reactor) { + ::grpc_impl::internal::ClientCallbackReaderFactory< ::pb::ReplicationStatus>::Create(stub_->channel_.get(), stub_->rpcmethod_SubmitReplication_, context, request, reactor); +} + +::grpc::ClientAsyncReader< ::pb::ReplicationStatus>* replicator::Stub::AsyncSubmitReplicationRaw(::grpc::ClientContext* context, const ::pb::SignedSubscription& request, ::grpc::CompletionQueue* cq, void* tag) { + return ::grpc_impl::internal::ClientAsyncReaderFactory< ::pb::ReplicationStatus>::Create(channel_.get(), cq, rpcmethod_SubmitReplication_, context, request, true, tag); +} + +::grpc::ClientAsyncReader< ::pb::ReplicationStatus>* replicator::Stub::PrepareAsyncSubmitReplicationRaw(::grpc::ClientContext* context, const ::pb::SignedSubscription& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncReaderFactory< ::pb::ReplicationStatus>::Create(channel_.get(), cq, rpcmethod_SubmitReplication_, context, request, false, nullptr); +} + +replicator::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + replicator_method_names[0], + ::grpc::internal::RpcMethod::SERVER_STREAMING, + new ::grpc::internal::ServerStreamingHandler< replicator::Service, ::pb::Subscription, ::pb::ReplicationStatus>( + std::mem_fn(&replicator::Service::Add), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + replicator_method_names[1], + ::grpc::internal::RpcMethod::SERVER_STREAMING, + new ::grpc::internal::ServerStreamingHandler< replicator::Service, ::pb::Subscription, ::pb::ReplicationStatus>( + std::mem_fn(&replicator::Service::Status), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + replicator_method_names[2], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< replicator::Service, ::pb::Subscription, ::pb::SubscriptionUpdate>( + std::mem_fn(&replicator::Service::GetSubscriptionUpdate), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + replicator_method_names[3], + ::grpc::internal::RpcMethod::SERVER_STREAMING, + new ::grpc::internal::ServerStreamingHandler< replicator::Service, ::pb::SignedSubscription, ::pb::ReplicationStatus>( + std::mem_fn(&replicator::Service::SubmitReplication), this))); +} + +replicator::Service::~Service() { +} + +::grpc::Status replicator::Service::Add(::grpc::ServerContext* context, const ::pb::Subscription* request, ::grpc::ServerWriter< ::pb::ReplicationStatus>* writer) { + (void) context; + (void) request; + (void) writer; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status replicator::Service::Status(::grpc::ServerContext* context, const ::pb::Subscription* request, ::grpc::ServerWriter< ::pb::ReplicationStatus>* writer) { + (void) context; + (void) request; + (void) writer; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status replicator::Service::GetSubscriptionUpdate(::grpc::ServerContext* context, const ::pb::Subscription* request, ::pb::SubscriptionUpdate* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status replicator::Service::SubmitReplication(::grpc::ServerContext* context, const ::pb::SignedSubscription* request, ::grpc::ServerWriter< ::pb::ReplicationStatus>* writer) { + (void) context; + (void) request; + (void) writer; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +} // namespace pb + diff --git a/cpp/replication.grpc.pb.h b/cpp/replication.grpc.pb.h new file mode 100644 index 0000000..9d78483 --- /dev/null +++ b/cpp/replication.grpc.pb.h @@ -0,0 +1,880 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: replication.proto +#ifndef GRPC_replication_2eproto__INCLUDED +#define GRPC_replication_2eproto__INCLUDED + +#include "replication.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace pb { + +// The replicator provides replication services. +class replicator final { + public: + static constexpr char const* service_full_name() { + return "pb.replicator"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + // Add is used to add a replication to this server, changing it's status from reserved to active. + std::unique_ptr< ::grpc::ClientReaderInterface< ::pb::ReplicationStatus>> Add(::grpc::ClientContext* context, const ::pb::Subscription& request) { + return std::unique_ptr< ::grpc::ClientReaderInterface< ::pb::ReplicationStatus>>(AddRaw(context, request)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::pb::ReplicationStatus>> AsyncAdd(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::pb::ReplicationStatus>>(AsyncAddRaw(context, request, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::pb::ReplicationStatus>> PrepareAsyncAdd(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::pb::ReplicationStatus>>(PrepareAsyncAddRaw(context, request, cq)); + } + // Status returns an updating stream of the replication status on the server. + std::unique_ptr< ::grpc::ClientReaderInterface< ::pb::ReplicationStatus>> Status(::grpc::ClientContext* context, const ::pb::Subscription& request) { + return std::unique_ptr< ::grpc::ClientReaderInterface< ::pb::ReplicationStatus>>(StatusRaw(context, request)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::pb::ReplicationStatus>> AsyncStatus(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::pb::ReplicationStatus>>(AsyncStatusRaw(context, request, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::pb::ReplicationStatus>> PrepareAsyncStatus(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::pb::ReplicationStatus>>(PrepareAsyncStatusRaw(context, request, cq)); + } + // GetSubscriptionUpdate returns the latest version of subscribed replication + virtual ::grpc::Status GetSubscriptionUpdate(::grpc::ClientContext* context, const ::pb::Subscription& request, ::pb::SubscriptionUpdate* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::SubscriptionUpdate>> AsyncGetSubscriptionUpdate(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::SubscriptionUpdate>>(AsyncGetSubscriptionUpdateRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::SubscriptionUpdate>> PrepareAsyncGetSubscriptionUpdate(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::SubscriptionUpdate>>(PrepareAsyncGetSubscriptionUpdateRaw(context, request, cq)); + } + // SubmitReplication is used by client agents to start replications, after they + // have uploaded the files and retrieved the cid, and collected servers to replicate too. + std::unique_ptr< ::grpc::ClientReaderInterface< ::pb::ReplicationStatus>> SubmitReplication(::grpc::ClientContext* context, const ::pb::SignedSubscription& request) { + return std::unique_ptr< ::grpc::ClientReaderInterface< ::pb::ReplicationStatus>>(SubmitReplicationRaw(context, request)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::pb::ReplicationStatus>> AsyncSubmitReplication(::grpc::ClientContext* context, const ::pb::SignedSubscription& request, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::pb::ReplicationStatus>>(AsyncSubmitReplicationRaw(context, request, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::pb::ReplicationStatus>> PrepareAsyncSubmitReplication(::grpc::ClientContext* context, const ::pb::SignedSubscription& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::pb::ReplicationStatus>>(PrepareAsyncSubmitReplicationRaw(context, request, cq)); + } + class experimental_async_interface { + public: + virtual ~experimental_async_interface() {} + // Add is used to add a replication to this server, changing it's status from reserved to active. + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void Add(::grpc::ClientContext* context, ::pb::Subscription* request, ::grpc::ClientReadReactor< ::pb::ReplicationStatus>* reactor) = 0; + #else + virtual void Add(::grpc::ClientContext* context, ::pb::Subscription* request, ::grpc::experimental::ClientReadReactor< ::pb::ReplicationStatus>* reactor) = 0; + #endif + // Status returns an updating stream of the replication status on the server. + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void Status(::grpc::ClientContext* context, ::pb::Subscription* request, ::grpc::ClientReadReactor< ::pb::ReplicationStatus>* reactor) = 0; + #else + virtual void Status(::grpc::ClientContext* context, ::pb::Subscription* request, ::grpc::experimental::ClientReadReactor< ::pb::ReplicationStatus>* reactor) = 0; + #endif + // GetSubscriptionUpdate returns the latest version of subscribed replication + virtual void GetSubscriptionUpdate(::grpc::ClientContext* context, const ::pb::Subscription* request, ::pb::SubscriptionUpdate* response, std::function) = 0; + virtual void GetSubscriptionUpdate(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::SubscriptionUpdate* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void GetSubscriptionUpdate(::grpc::ClientContext* context, const ::pb::Subscription* request, ::pb::SubscriptionUpdate* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void GetSubscriptionUpdate(::grpc::ClientContext* context, const ::pb::Subscription* request, ::pb::SubscriptionUpdate* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void GetSubscriptionUpdate(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::SubscriptionUpdate* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void GetSubscriptionUpdate(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::SubscriptionUpdate* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + // SubmitReplication is used by client agents to start replications, after they + // have uploaded the files and retrieved the cid, and collected servers to replicate too. + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void SubmitReplication(::grpc::ClientContext* context, ::pb::SignedSubscription* request, ::grpc::ClientReadReactor< ::pb::ReplicationStatus>* reactor) = 0; + #else + virtual void SubmitReplication(::grpc::ClientContext* context, ::pb::SignedSubscription* request, ::grpc::experimental::ClientReadReactor< ::pb::ReplicationStatus>* reactor) = 0; + #endif + }; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + typedef class experimental_async_interface async_interface; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + async_interface* async() { return experimental_async(); } + #endif + virtual class experimental_async_interface* experimental_async() { return nullptr; } + private: + virtual ::grpc::ClientReaderInterface< ::pb::ReplicationStatus>* AddRaw(::grpc::ClientContext* context, const ::pb::Subscription& request) = 0; + virtual ::grpc::ClientAsyncReaderInterface< ::pb::ReplicationStatus>* AsyncAddRaw(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq, void* tag) = 0; + virtual ::grpc::ClientAsyncReaderInterface< ::pb::ReplicationStatus>* PrepareAsyncAddRaw(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientReaderInterface< ::pb::ReplicationStatus>* StatusRaw(::grpc::ClientContext* context, const ::pb::Subscription& request) = 0; + virtual ::grpc::ClientAsyncReaderInterface< ::pb::ReplicationStatus>* AsyncStatusRaw(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq, void* tag) = 0; + virtual ::grpc::ClientAsyncReaderInterface< ::pb::ReplicationStatus>* PrepareAsyncStatusRaw(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::SubscriptionUpdate>* AsyncGetSubscriptionUpdateRaw(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::SubscriptionUpdate>* PrepareAsyncGetSubscriptionUpdateRaw(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientReaderInterface< ::pb::ReplicationStatus>* SubmitReplicationRaw(::grpc::ClientContext* context, const ::pb::SignedSubscription& request) = 0; + virtual ::grpc::ClientAsyncReaderInterface< ::pb::ReplicationStatus>* AsyncSubmitReplicationRaw(::grpc::ClientContext* context, const ::pb::SignedSubscription& request, ::grpc::CompletionQueue* cq, void* tag) = 0; + virtual ::grpc::ClientAsyncReaderInterface< ::pb::ReplicationStatus>* PrepareAsyncSubmitReplicationRaw(::grpc::ClientContext* context, const ::pb::SignedSubscription& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel); + std::unique_ptr< ::grpc::ClientReader< ::pb::ReplicationStatus>> Add(::grpc::ClientContext* context, const ::pb::Subscription& request) { + return std::unique_ptr< ::grpc::ClientReader< ::pb::ReplicationStatus>>(AddRaw(context, request)); + } + std::unique_ptr< ::grpc::ClientAsyncReader< ::pb::ReplicationStatus>> AsyncAdd(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReader< ::pb::ReplicationStatus>>(AsyncAddRaw(context, request, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReader< ::pb::ReplicationStatus>> PrepareAsyncAdd(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReader< ::pb::ReplicationStatus>>(PrepareAsyncAddRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientReader< ::pb::ReplicationStatus>> Status(::grpc::ClientContext* context, const ::pb::Subscription& request) { + return std::unique_ptr< ::grpc::ClientReader< ::pb::ReplicationStatus>>(StatusRaw(context, request)); + } + std::unique_ptr< ::grpc::ClientAsyncReader< ::pb::ReplicationStatus>> AsyncStatus(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReader< ::pb::ReplicationStatus>>(AsyncStatusRaw(context, request, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReader< ::pb::ReplicationStatus>> PrepareAsyncStatus(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReader< ::pb::ReplicationStatus>>(PrepareAsyncStatusRaw(context, request, cq)); + } + ::grpc::Status GetSubscriptionUpdate(::grpc::ClientContext* context, const ::pb::Subscription& request, ::pb::SubscriptionUpdate* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::SubscriptionUpdate>> AsyncGetSubscriptionUpdate(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::SubscriptionUpdate>>(AsyncGetSubscriptionUpdateRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::SubscriptionUpdate>> PrepareAsyncGetSubscriptionUpdate(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::SubscriptionUpdate>>(PrepareAsyncGetSubscriptionUpdateRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientReader< ::pb::ReplicationStatus>> SubmitReplication(::grpc::ClientContext* context, const ::pb::SignedSubscription& request) { + return std::unique_ptr< ::grpc::ClientReader< ::pb::ReplicationStatus>>(SubmitReplicationRaw(context, request)); + } + std::unique_ptr< ::grpc::ClientAsyncReader< ::pb::ReplicationStatus>> AsyncSubmitReplication(::grpc::ClientContext* context, const ::pb::SignedSubscription& request, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReader< ::pb::ReplicationStatus>>(AsyncSubmitReplicationRaw(context, request, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReader< ::pb::ReplicationStatus>> PrepareAsyncSubmitReplication(::grpc::ClientContext* context, const ::pb::SignedSubscription& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReader< ::pb::ReplicationStatus>>(PrepareAsyncSubmitReplicationRaw(context, request, cq)); + } + class experimental_async final : + public StubInterface::experimental_async_interface { + public: + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void Add(::grpc::ClientContext* context, ::pb::Subscription* request, ::grpc::ClientReadReactor< ::pb::ReplicationStatus>* reactor) override; + #else + void Add(::grpc::ClientContext* context, ::pb::Subscription* request, ::grpc::experimental::ClientReadReactor< ::pb::ReplicationStatus>* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void Status(::grpc::ClientContext* context, ::pb::Subscription* request, ::grpc::ClientReadReactor< ::pb::ReplicationStatus>* reactor) override; + #else + void Status(::grpc::ClientContext* context, ::pb::Subscription* request, ::grpc::experimental::ClientReadReactor< ::pb::ReplicationStatus>* reactor) override; + #endif + void GetSubscriptionUpdate(::grpc::ClientContext* context, const ::pb::Subscription* request, ::pb::SubscriptionUpdate* response, std::function) override; + void GetSubscriptionUpdate(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::SubscriptionUpdate* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void GetSubscriptionUpdate(::grpc::ClientContext* context, const ::pb::Subscription* request, ::pb::SubscriptionUpdate* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void GetSubscriptionUpdate(::grpc::ClientContext* context, const ::pb::Subscription* request, ::pb::SubscriptionUpdate* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void GetSubscriptionUpdate(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::SubscriptionUpdate* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void GetSubscriptionUpdate(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::SubscriptionUpdate* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void SubmitReplication(::grpc::ClientContext* context, ::pb::SignedSubscription* request, ::grpc::ClientReadReactor< ::pb::ReplicationStatus>* reactor) override; + #else + void SubmitReplication(::grpc::ClientContext* context, ::pb::SignedSubscription* request, ::grpc::experimental::ClientReadReactor< ::pb::ReplicationStatus>* reactor) override; + #endif + private: + friend class Stub; + explicit experimental_async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class experimental_async_interface* experimental_async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class experimental_async async_stub_{this}; + ::grpc::ClientReader< ::pb::ReplicationStatus>* AddRaw(::grpc::ClientContext* context, const ::pb::Subscription& request) override; + ::grpc::ClientAsyncReader< ::pb::ReplicationStatus>* AsyncAddRaw(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq, void* tag) override; + ::grpc::ClientAsyncReader< ::pb::ReplicationStatus>* PrepareAsyncAddRaw(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientReader< ::pb::ReplicationStatus>* StatusRaw(::grpc::ClientContext* context, const ::pb::Subscription& request) override; + ::grpc::ClientAsyncReader< ::pb::ReplicationStatus>* AsyncStatusRaw(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq, void* tag) override; + ::grpc::ClientAsyncReader< ::pb::ReplicationStatus>* PrepareAsyncStatusRaw(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::pb::SubscriptionUpdate>* AsyncGetSubscriptionUpdateRaw(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::pb::SubscriptionUpdate>* PrepareAsyncGetSubscriptionUpdateRaw(::grpc::ClientContext* context, const ::pb::Subscription& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientReader< ::pb::ReplicationStatus>* SubmitReplicationRaw(::grpc::ClientContext* context, const ::pb::SignedSubscription& request) override; + ::grpc::ClientAsyncReader< ::pb::ReplicationStatus>* AsyncSubmitReplicationRaw(::grpc::ClientContext* context, const ::pb::SignedSubscription& request, ::grpc::CompletionQueue* cq, void* tag) override; + ::grpc::ClientAsyncReader< ::pb::ReplicationStatus>* PrepareAsyncSubmitReplicationRaw(::grpc::ClientContext* context, const ::pb::SignedSubscription& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_Add_; + const ::grpc::internal::RpcMethod rpcmethod_Status_; + const ::grpc::internal::RpcMethod rpcmethod_GetSubscriptionUpdate_; + const ::grpc::internal::RpcMethod rpcmethod_SubmitReplication_; + }; + static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + + class Service : public ::grpc::Service { + public: + Service(); + virtual ~Service(); + // Add is used to add a replication to this server, changing it's status from reserved to active. + virtual ::grpc::Status Add(::grpc::ServerContext* context, const ::pb::Subscription* request, ::grpc::ServerWriter< ::pb::ReplicationStatus>* writer); + // Status returns an updating stream of the replication status on the server. + virtual ::grpc::Status Status(::grpc::ServerContext* context, const ::pb::Subscription* request, ::grpc::ServerWriter< ::pb::ReplicationStatus>* writer); + // GetSubscriptionUpdate returns the latest version of subscribed replication + virtual ::grpc::Status GetSubscriptionUpdate(::grpc::ServerContext* context, const ::pb::Subscription* request, ::pb::SubscriptionUpdate* response); + // SubmitReplication is used by client agents to start replications, after they + // have uploaded the files and retrieved the cid, and collected servers to replicate too. + virtual ::grpc::Status SubmitReplication(::grpc::ServerContext* context, const ::pb::SignedSubscription* request, ::grpc::ServerWriter< ::pb::ReplicationStatus>* writer); + }; + template + class WithAsyncMethod_Add : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_Add() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_Add() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Add(::grpc::ServerContext* /*context*/, const ::pb::Subscription* /*request*/, ::grpc::ServerWriter< ::pb::ReplicationStatus>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestAdd(::grpc::ServerContext* context, ::pb::Subscription* request, ::grpc::ServerAsyncWriter< ::pb::ReplicationStatus>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncServerStreaming(0, context, request, writer, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_Status : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_Status() { + ::grpc::Service::MarkMethodAsync(1); + } + ~WithAsyncMethod_Status() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Status(::grpc::ServerContext* /*context*/, const ::pb::Subscription* /*request*/, ::grpc::ServerWriter< ::pb::ReplicationStatus>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestStatus(::grpc::ServerContext* context, ::pb::Subscription* request, ::grpc::ServerAsyncWriter< ::pb::ReplicationStatus>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncServerStreaming(1, context, request, writer, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_GetSubscriptionUpdate : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_GetSubscriptionUpdate() { + ::grpc::Service::MarkMethodAsync(2); + } + ~WithAsyncMethod_GetSubscriptionUpdate() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetSubscriptionUpdate(::grpc::ServerContext* /*context*/, const ::pb::Subscription* /*request*/, ::pb::SubscriptionUpdate* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetSubscriptionUpdate(::grpc::ServerContext* context, ::pb::Subscription* request, ::grpc::ServerAsyncResponseWriter< ::pb::SubscriptionUpdate>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_SubmitReplication : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_SubmitReplication() { + ::grpc::Service::MarkMethodAsync(3); + } + ~WithAsyncMethod_SubmitReplication() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SubmitReplication(::grpc::ServerContext* /*context*/, const ::pb::SignedSubscription* /*request*/, ::grpc::ServerWriter< ::pb::ReplicationStatus>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestSubmitReplication(::grpc::ServerContext* context, ::pb::SignedSubscription* request, ::grpc::ServerAsyncWriter< ::pb::ReplicationStatus>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncServerStreaming(3, context, request, writer, new_call_cq, notification_cq, tag); + } + }; + typedef WithAsyncMethod_Add > > > AsyncService; + template + class ExperimentalWithCallbackMethod_Add : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_Add() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(0, + new ::grpc_impl::internal::CallbackServerStreamingHandler< ::pb::Subscription, ::pb::ReplicationStatus>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::pb::Subscription* request) { return this->Add(context, request); })); + } + ~ExperimentalWithCallbackMethod_Add() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Add(::grpc::ServerContext* /*context*/, const ::pb::Subscription* /*request*/, ::grpc::ServerWriter< ::pb::ReplicationStatus>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerWriteReactor< ::pb::ReplicationStatus>* Add( + ::grpc::CallbackServerContext* /*context*/, const ::pb::Subscription* /*request*/) + #else + virtual ::grpc::experimental::ServerWriteReactor< ::pb::ReplicationStatus>* Add( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::pb::Subscription* /*request*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_Status : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_Status() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(1, + new ::grpc_impl::internal::CallbackServerStreamingHandler< ::pb::Subscription, ::pb::ReplicationStatus>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::pb::Subscription* request) { return this->Status(context, request); })); + } + ~ExperimentalWithCallbackMethod_Status() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Status(::grpc::ServerContext* /*context*/, const ::pb::Subscription* /*request*/, ::grpc::ServerWriter< ::pb::ReplicationStatus>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerWriteReactor< ::pb::ReplicationStatus>* Status( + ::grpc::CallbackServerContext* /*context*/, const ::pb::Subscription* /*request*/) + #else + virtual ::grpc::experimental::ServerWriteReactor< ::pb::ReplicationStatus>* Status( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::pb::Subscription* /*request*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_GetSubscriptionUpdate : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_GetSubscriptionUpdate() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(2, + new ::grpc_impl::internal::CallbackUnaryHandler< ::pb::Subscription, ::pb::SubscriptionUpdate>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::pb::Subscription* request, ::pb::SubscriptionUpdate* response) { return this->GetSubscriptionUpdate(context, request, response); }));} + void SetMessageAllocatorFor_GetSubscriptionUpdate( + ::grpc::experimental::MessageAllocator< ::pb::Subscription, ::pb::SubscriptionUpdate>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(2); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(2); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::pb::Subscription, ::pb::SubscriptionUpdate>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_GetSubscriptionUpdate() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetSubscriptionUpdate(::grpc::ServerContext* /*context*/, const ::pb::Subscription* /*request*/, ::pb::SubscriptionUpdate* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* GetSubscriptionUpdate( + ::grpc::CallbackServerContext* /*context*/, const ::pb::Subscription* /*request*/, ::pb::SubscriptionUpdate* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* GetSubscriptionUpdate( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::pb::Subscription* /*request*/, ::pb::SubscriptionUpdate* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_SubmitReplication : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_SubmitReplication() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(3, + new ::grpc_impl::internal::CallbackServerStreamingHandler< ::pb::SignedSubscription, ::pb::ReplicationStatus>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::pb::SignedSubscription* request) { return this->SubmitReplication(context, request); })); + } + ~ExperimentalWithCallbackMethod_SubmitReplication() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SubmitReplication(::grpc::ServerContext* /*context*/, const ::pb::SignedSubscription* /*request*/, ::grpc::ServerWriter< ::pb::ReplicationStatus>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerWriteReactor< ::pb::ReplicationStatus>* SubmitReplication( + ::grpc::CallbackServerContext* /*context*/, const ::pb::SignedSubscription* /*request*/) + #else + virtual ::grpc::experimental::ServerWriteReactor< ::pb::ReplicationStatus>* SubmitReplication( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::pb::SignedSubscription* /*request*/) + #endif + { return nullptr; } + }; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + typedef ExperimentalWithCallbackMethod_Add > > > CallbackService; + #endif + + typedef ExperimentalWithCallbackMethod_Add > > > ExperimentalCallbackService; + template + class WithGenericMethod_Add : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_Add() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_Add() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Add(::grpc::ServerContext* /*context*/, const ::pb::Subscription* /*request*/, ::grpc::ServerWriter< ::pb::ReplicationStatus>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_Status : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_Status() { + ::grpc::Service::MarkMethodGeneric(1); + } + ~WithGenericMethod_Status() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Status(::grpc::ServerContext* /*context*/, const ::pb::Subscription* /*request*/, ::grpc::ServerWriter< ::pb::ReplicationStatus>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_GetSubscriptionUpdate : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_GetSubscriptionUpdate() { + ::grpc::Service::MarkMethodGeneric(2); + } + ~WithGenericMethod_GetSubscriptionUpdate() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetSubscriptionUpdate(::grpc::ServerContext* /*context*/, const ::pb::Subscription* /*request*/, ::pb::SubscriptionUpdate* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_SubmitReplication : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_SubmitReplication() { + ::grpc::Service::MarkMethodGeneric(3); + } + ~WithGenericMethod_SubmitReplication() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SubmitReplication(::grpc::ServerContext* /*context*/, const ::pb::SignedSubscription* /*request*/, ::grpc::ServerWriter< ::pb::ReplicationStatus>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_Add : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_Add() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_Add() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Add(::grpc::ServerContext* /*context*/, const ::pb::Subscription* /*request*/, ::grpc::ServerWriter< ::pb::ReplicationStatus>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestAdd(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncServerStreaming(0, context, request, writer, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_Status : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_Status() { + ::grpc::Service::MarkMethodRaw(1); + } + ~WithRawMethod_Status() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Status(::grpc::ServerContext* /*context*/, const ::pb::Subscription* /*request*/, ::grpc::ServerWriter< ::pb::ReplicationStatus>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestStatus(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncServerStreaming(1, context, request, writer, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_GetSubscriptionUpdate : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_GetSubscriptionUpdate() { + ::grpc::Service::MarkMethodRaw(2); + } + ~WithRawMethod_GetSubscriptionUpdate() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetSubscriptionUpdate(::grpc::ServerContext* /*context*/, const ::pb::Subscription* /*request*/, ::pb::SubscriptionUpdate* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetSubscriptionUpdate(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_SubmitReplication : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_SubmitReplication() { + ::grpc::Service::MarkMethodRaw(3); + } + ~WithRawMethod_SubmitReplication() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SubmitReplication(::grpc::ServerContext* /*context*/, const ::pb::SignedSubscription* /*request*/, ::grpc::ServerWriter< ::pb::ReplicationStatus>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestSubmitReplication(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncServerStreaming(3, context, request, writer, new_call_cq, notification_cq, tag); + } + }; + template + class ExperimentalWithRawCallbackMethod_Add : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_Add() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(0, + new ::grpc_impl::internal::CallbackServerStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const::grpc::ByteBuffer* request) { return this->Add(context, request); })); + } + ~ExperimentalWithRawCallbackMethod_Add() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Add(::grpc::ServerContext* /*context*/, const ::pb::Subscription* /*request*/, ::grpc::ServerWriter< ::pb::ReplicationStatus>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerWriteReactor< ::grpc::ByteBuffer>* Add( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/) + #else + virtual ::grpc::experimental::ServerWriteReactor< ::grpc::ByteBuffer>* Add( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_Status : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_Status() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(1, + new ::grpc_impl::internal::CallbackServerStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const::grpc::ByteBuffer* request) { return this->Status(context, request); })); + } + ~ExperimentalWithRawCallbackMethod_Status() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Status(::grpc::ServerContext* /*context*/, const ::pb::Subscription* /*request*/, ::grpc::ServerWriter< ::pb::ReplicationStatus>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerWriteReactor< ::grpc::ByteBuffer>* Status( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/) + #else + virtual ::grpc::experimental::ServerWriteReactor< ::grpc::ByteBuffer>* Status( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_GetSubscriptionUpdate : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_GetSubscriptionUpdate() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(2, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->GetSubscriptionUpdate(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_GetSubscriptionUpdate() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetSubscriptionUpdate(::grpc::ServerContext* /*context*/, const ::pb::Subscription* /*request*/, ::pb::SubscriptionUpdate* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* GetSubscriptionUpdate( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* GetSubscriptionUpdate( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_SubmitReplication : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_SubmitReplication() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(3, + new ::grpc_impl::internal::CallbackServerStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const::grpc::ByteBuffer* request) { return this->SubmitReplication(context, request); })); + } + ~ExperimentalWithRawCallbackMethod_SubmitReplication() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SubmitReplication(::grpc::ServerContext* /*context*/, const ::pb::SignedSubscription* /*request*/, ::grpc::ServerWriter< ::pb::ReplicationStatus>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerWriteReactor< ::grpc::ByteBuffer>* SubmitReplication( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/) + #else + virtual ::grpc::experimental::ServerWriteReactor< ::grpc::ByteBuffer>* SubmitReplication( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/) + #endif + { return nullptr; } + }; + template + class WithStreamedUnaryMethod_GetSubscriptionUpdate : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_GetSubscriptionUpdate() { + ::grpc::Service::MarkMethodStreamed(2, + new ::grpc::internal::StreamedUnaryHandler< ::pb::Subscription, ::pb::SubscriptionUpdate>(std::bind(&WithStreamedUnaryMethod_GetSubscriptionUpdate::StreamedGetSubscriptionUpdate, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_GetSubscriptionUpdate() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status GetSubscriptionUpdate(::grpc::ServerContext* /*context*/, const ::pb::Subscription* /*request*/, ::pb::SubscriptionUpdate* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedGetSubscriptionUpdate(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::pb::Subscription,::pb::SubscriptionUpdate>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_GetSubscriptionUpdate StreamedUnaryService; + template + class WithSplitStreamingMethod_Add : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithSplitStreamingMethod_Add() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::SplitServerStreamingHandler< ::pb::Subscription, ::pb::ReplicationStatus>(std::bind(&WithSplitStreamingMethod_Add::StreamedAdd, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithSplitStreamingMethod_Add() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status Add(::grpc::ServerContext* /*context*/, const ::pb::Subscription* /*request*/, ::grpc::ServerWriter< ::pb::ReplicationStatus>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with split streamed + virtual ::grpc::Status StreamedAdd(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::pb::Subscription,::pb::ReplicationStatus>* server_split_streamer) = 0; + }; + template + class WithSplitStreamingMethod_Status : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithSplitStreamingMethod_Status() { + ::grpc::Service::MarkMethodStreamed(1, + new ::grpc::internal::SplitServerStreamingHandler< ::pb::Subscription, ::pb::ReplicationStatus>(std::bind(&WithSplitStreamingMethod_Status::StreamedStatus, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithSplitStreamingMethod_Status() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status Status(::grpc::ServerContext* /*context*/, const ::pb::Subscription* /*request*/, ::grpc::ServerWriter< ::pb::ReplicationStatus>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with split streamed + virtual ::grpc::Status StreamedStatus(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::pb::Subscription,::pb::ReplicationStatus>* server_split_streamer) = 0; + }; + template + class WithSplitStreamingMethod_SubmitReplication : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithSplitStreamingMethod_SubmitReplication() { + ::grpc::Service::MarkMethodStreamed(3, + new ::grpc::internal::SplitServerStreamingHandler< ::pb::SignedSubscription, ::pb::ReplicationStatus>(std::bind(&WithSplitStreamingMethod_SubmitReplication::StreamedSubmitReplication, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithSplitStreamingMethod_SubmitReplication() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status SubmitReplication(::grpc::ServerContext* /*context*/, const ::pb::SignedSubscription* /*request*/, ::grpc::ServerWriter< ::pb::ReplicationStatus>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with split streamed + virtual ::grpc::Status StreamedSubmitReplication(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::pb::SignedSubscription,::pb::ReplicationStatus>* server_split_streamer) = 0; + }; + typedef WithSplitStreamingMethod_Add > > SplitStreamedService; + typedef WithSplitStreamingMethod_Add > > > StreamedService; +}; + +} // namespace pb + + +#endif // GRPC_replication_2eproto__INCLUDED diff --git a/cpp/replication.pb.cc b/cpp/replication.pb.cc new file mode 100644 index 0000000..a641e44 --- /dev/null +++ b/cpp/replication.pb.cc @@ -0,0 +1,2133 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: replication.proto + +#include "replication.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include +extern PROTOBUF_INTERNAL_EXPORT_replication_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_AddrInfo_replication_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_replication_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ServerSource_replication_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_replication_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Subscription_replication_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_replication_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SubscriptionUpdate_replication_2eproto; +namespace pb { +class ReplicationDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Replication_default_instance_; +class ServerSourceDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _ServerSource_default_instance_; +class AddrInfoDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _AddrInfo_default_instance_; +class SubscriptionDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Subscription_default_instance_; +class ReplicationStatusDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _ReplicationStatus_default_instance_; +class SubscriptionUpdateDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _SubscriptionUpdate_default_instance_; +class SignedSubscriptionDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _SignedSubscription_default_instance_; +} // namespace pb +static void InitDefaultsscc_info_AddrInfo_replication_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_AddrInfo_default_instance_; + new (ptr) ::pb::AddrInfo(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::AddrInfo::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_AddrInfo_replication_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_AddrInfo_replication_2eproto}, {}}; + +static void InitDefaultsscc_info_Replication_replication_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_Replication_default_instance_; + new (ptr) ::pb::Replication(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::Replication::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Replication_replication_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Replication_replication_2eproto}, { + &scc_info_ServerSource_replication_2eproto.base,}}; + +static void InitDefaultsscc_info_ReplicationStatus_replication_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_ReplicationStatus_default_instance_; + new (ptr) ::pb::ReplicationStatus(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::ReplicationStatus::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ReplicationStatus_replication_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_ReplicationStatus_replication_2eproto}, {}}; + +static void InitDefaultsscc_info_ServerSource_replication_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_ServerSource_default_instance_; + new (ptr) ::pb::ServerSource(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::ServerSource::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ServerSource_replication_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_ServerSource_replication_2eproto}, { + &scc_info_AddrInfo_replication_2eproto.base,}}; + +static void InitDefaultsscc_info_SignedSubscription_replication_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_SignedSubscription_default_instance_; + new (ptr) ::pb::SignedSubscription(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::SignedSubscription::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_SignedSubscription_replication_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_SignedSubscription_replication_2eproto}, { + &scc_info_Subscription_replication_2eproto.base, + &scc_info_SubscriptionUpdate_replication_2eproto.base,}}; + +static void InitDefaultsscc_info_Subscription_replication_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_Subscription_default_instance_; + new (ptr) ::pb::Subscription(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::Subscription::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Subscription_replication_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Subscription_replication_2eproto}, {}}; + +static void InitDefaultsscc_info_SubscriptionUpdate_replication_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_SubscriptionUpdate_default_instance_; + new (ptr) ::pb::SubscriptionUpdate(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::SubscriptionUpdate::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SubscriptionUpdate_replication_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_SubscriptionUpdate_replication_2eproto}, {}}; + +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_replication_2eproto[7]; +static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_replication_2eproto = nullptr; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_replication_2eproto = nullptr; + +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_replication_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::Replication, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::Replication, header_), + PROTOBUF_FIELD_OFFSET(::pb::Replication, cids_bytes_), + PROTOBUF_FIELD_OFFSET(::pb::Replication, servers_), + PROTOBUF_FIELD_OFFSET(::pb::Replication, replication_factor_), + PROTOBUF_FIELD_OFFSET(::pb::Replication, refresh_interval_seconds_), + PROTOBUF_FIELD_OFFSET(::pb::Replication, server_down_delay_seconds_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::ServerSource, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::ServerSource, addr_info_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::AddrInfo, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::AddrInfo, id_bytes_), + PROTOBUF_FIELD_OFFSET(::pb::AddrInfo, addrs_bytes_), + PROTOBUF_FIELD_OFFSET(::pb::AddrInfo, grpc_port_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::Subscription, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::Subscription, topic_), + PROTOBUF_FIELD_OFFSET(::pb::Subscription, author_id_bytes_), + PROTOBUF_FIELD_OFFSET(::pb::Subscription, remove_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::ReplicationStatus, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::ReplicationStatus, ok_), + PROTOBUF_FIELD_OFFSET(::pb::ReplicationStatus, is_active_), + PROTOBUF_FIELD_OFFSET(::pb::ReplicationStatus, current_version_), + PROTOBUF_FIELD_OFFSET(::pb::ReplicationStatus, target_version_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::SubscriptionUpdate, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::SubscriptionUpdate, version_), + PROTOBUF_FIELD_OFFSET(::pb::SubscriptionUpdate, replication_bytes_), + PROTOBUF_FIELD_OFFSET(::pb::SubscriptionUpdate, signature_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::SignedSubscription, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::SignedSubscription, sub_part_), + PROTOBUF_FIELD_OFFSET(::pb::SignedSubscription, update_part_), +}; +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(::pb::Replication)}, + { 11, -1, sizeof(::pb::ServerSource)}, + { 17, -1, sizeof(::pb::AddrInfo)}, + { 25, -1, sizeof(::pb::Subscription)}, + { 33, -1, sizeof(::pb::ReplicationStatus)}, + { 42, -1, sizeof(::pb::SubscriptionUpdate)}, + { 50, -1, sizeof(::pb::SignedSubscription)}, +}; + +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&::pb::_Replication_default_instance_), + reinterpret_cast(&::pb::_ServerSource_default_instance_), + reinterpret_cast(&::pb::_AddrInfo_default_instance_), + reinterpret_cast(&::pb::_Subscription_default_instance_), + reinterpret_cast(&::pb::_ReplicationStatus_default_instance_), + reinterpret_cast(&::pb::_SubscriptionUpdate_default_instance_), + reinterpret_cast(&::pb::_SignedSubscription_default_instance_), +}; + +const char descriptor_table_protodef_replication_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\021replication.proto\022\002pb\"\265\001\n\013Replication\022" + "\016\n\006header\030\001 \001(\t\022\022\n\ncids_bytes\030\002 \003(\014\022!\n\007s" + "ervers\030\003 \003(\0132\020.pb.ServerSource\022\032\n\022replic" + "ation_factor\030\004 \001(\005\022 \n\030refresh_interval_s" + "econds\030\005 \001(\005\022!\n\031server_down_delay_second" + "s\030\006 \001(\005\"/\n\014ServerSource\022\037\n\taddr_info\030\001 \001" + "(\0132\014.pb.AddrInfo\"D\n\010AddrInfo\022\020\n\010id_bytes" + "\030\001 \001(\014\022\023\n\013addrs_bytes\030\002 \003(\014\022\021\n\tgrpc_port" + "\030\003 \001(\005\"F\n\014Subscription\022\r\n\005topic\030\001 \001(\t\022\027\n" + "\017author_id_bytes\030\002 \001(\014\022\016\n\006remove\030\003 \001(\010\"c" + "\n\021ReplicationStatus\022\n\n\002ok\030\001 \001(\010\022\021\n\tis_ac" + "tive\030\002 \001(\010\022\027\n\017current_version\030\003 \001(\003\022\026\n\016t" + "arget_version\030\004 \001(\003\"S\n\022SubscriptionUpdat" + "e\022\017\n\007version\030\001 \001(\003\022\031\n\021replication_bytes\030" + "\002 \001(\014\022\021\n\tsignature\030\003 \001(\014\"e\n\022SignedSubscr" + "iption\022\"\n\010sub_part\030\001 \001(\0132\020.pb.Subscripti" + "on\022+\n\013update_part\030\002 \001(\0132\026.pb.Subscriptio" + "nUpdate2\374\001\n\nreplicator\0220\n\003Add\022\020.pb.Subsc" + "ription\032\025.pb.ReplicationStatus0\001\0223\n\006Stat" + "us\022\020.pb.Subscription\032\025.pb.ReplicationSta" + "tus0\001\022A\n\025GetSubscriptionUpdate\022\020.pb.Subs" + "cription\032\026.pb.SubscriptionUpdate\022D\n\021Subm" + "itReplication\022\026.pb.SignedSubscription\032\025." + "pb.ReplicationStatus0\001b\006proto3" + ; +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_replication_2eproto_deps[1] = { +}; +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_replication_2eproto_sccs[7] = { + &scc_info_AddrInfo_replication_2eproto.base, + &scc_info_Replication_replication_2eproto.base, + &scc_info_ReplicationStatus_replication_2eproto.base, + &scc_info_ServerSource_replication_2eproto.base, + &scc_info_SignedSubscription_replication_2eproto.base, + &scc_info_Subscription_replication_2eproto.base, + &scc_info_SubscriptionUpdate_replication_2eproto.base, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_replication_2eproto_once; +static bool descriptor_table_replication_2eproto_initialized = false; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_replication_2eproto = { + &descriptor_table_replication_2eproto_initialized, descriptor_table_protodef_replication_2eproto, "replication.proto", 950, + &descriptor_table_replication_2eproto_once, descriptor_table_replication_2eproto_sccs, descriptor_table_replication_2eproto_deps, 7, 0, + schemas, file_default_instances, TableStruct_replication_2eproto::offsets, + file_level_metadata_replication_2eproto, 7, file_level_enum_descriptors_replication_2eproto, file_level_service_descriptors_replication_2eproto, +}; + +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_replication_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_replication_2eproto), true); +namespace pb { + +// =================================================================== + +void Replication::InitAsDefaultInstance() { +} +class Replication::_Internal { + public: +}; + +Replication::Replication() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.Replication) +} +Replication::Replication(const Replication& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr), + cids_bytes_(from.cids_bytes_), + servers_(from.servers_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + header_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_header().empty()) { + header_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.header_); + } + ::memcpy(&replication_factor_, &from.replication_factor_, + static_cast(reinterpret_cast(&server_down_delay_seconds_) - + reinterpret_cast(&replication_factor_)) + sizeof(server_down_delay_seconds_)); + // @@protoc_insertion_point(copy_constructor:pb.Replication) +} + +void Replication::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Replication_replication_2eproto.base); + header_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&replication_factor_, 0, static_cast( + reinterpret_cast(&server_down_delay_seconds_) - + reinterpret_cast(&replication_factor_)) + sizeof(server_down_delay_seconds_)); +} + +Replication::~Replication() { + // @@protoc_insertion_point(destructor:pb.Replication) + SharedDtor(); +} + +void Replication::SharedDtor() { + header_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void Replication::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Replication& Replication::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Replication_replication_2eproto.base); + return *internal_default_instance(); +} + + +void Replication::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.Replication) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cids_bytes_.Clear(); + servers_.Clear(); + header_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&replication_factor_, 0, static_cast( + reinterpret_cast(&server_down_delay_seconds_) - + reinterpret_cast(&replication_factor_)) + sizeof(server_down_delay_seconds_)); + _internal_metadata_.Clear(); +} + +const char* Replication::_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 header = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_header(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.Replication.header")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // repeated bytes cids_bytes = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_cids_bytes(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else goto handle_unusual; + continue; + // repeated .pb.ServerSource servers = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_servers(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else goto handle_unusual; + continue; + // int32 replication_factor = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + replication_factor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // int32 refresh_interval_seconds = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { + refresh_interval_seconds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // int32 server_down_delay_seconds = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { + server_down_delay_seconds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Replication::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.Replication) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string header = 1; + if (this->header().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_header().data(), static_cast(this->_internal_header().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.Replication.header"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_header(), target); + } + + // repeated bytes cids_bytes = 2; + for (int i = 0, n = this->_internal_cids_bytes_size(); i < n; i++) { + const auto& s = this->_internal_cids_bytes(i); + target = stream->WriteBytes(2, s, target); + } + + // repeated .pb.ServerSource servers = 3; + for (unsigned int i = 0, + n = static_cast(this->_internal_servers_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, this->_internal_servers(i), target, stream); + } + + // int32 replication_factor = 4; + if (this->replication_factor() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_replication_factor(), target); + } + + // int32 refresh_interval_seconds = 5; + if (this->refresh_interval_seconds() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->_internal_refresh_interval_seconds(), target); + } + + // int32 server_down_delay_seconds = 6; + if (this->server_down_delay_seconds() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(6, this->_internal_server_down_delay_seconds(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.Replication) + return target; +} + +size_t Replication::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.Replication) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated bytes cids_bytes = 2; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(cids_bytes_.size()); + for (int i = 0, n = cids_bytes_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + cids_bytes_.Get(i)); + } + + // repeated .pb.ServerSource servers = 3; + total_size += 1UL * this->_internal_servers_size(); + for (const auto& msg : this->servers_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // string header = 1; + if (this->header().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_header()); + } + + // int32 replication_factor = 4; + if (this->replication_factor() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_replication_factor()); + } + + // int32 refresh_interval_seconds = 5; + if (this->refresh_interval_seconds() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_refresh_interval_seconds()); + } + + // int32 server_down_delay_seconds = 6; + if (this->server_down_delay_seconds() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_server_down_delay_seconds()); + } + + 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 Replication::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.Replication) + GOOGLE_DCHECK_NE(&from, this); + const Replication* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.Replication) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.Replication) + MergeFrom(*source); + } +} + +void Replication::MergeFrom(const Replication& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.Replication) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + cids_bytes_.MergeFrom(from.cids_bytes_); + servers_.MergeFrom(from.servers_); + if (from.header().size() > 0) { + + header_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.header_); + } + if (from.replication_factor() != 0) { + _internal_set_replication_factor(from._internal_replication_factor()); + } + if (from.refresh_interval_seconds() != 0) { + _internal_set_refresh_interval_seconds(from._internal_refresh_interval_seconds()); + } + if (from.server_down_delay_seconds() != 0) { + _internal_set_server_down_delay_seconds(from._internal_server_down_delay_seconds()); + } +} + +void Replication::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.Replication) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Replication::CopyFrom(const Replication& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.Replication) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Replication::IsInitialized() const { + return true; +} + +void Replication::InternalSwap(Replication* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + cids_bytes_.InternalSwap(&other->cids_bytes_); + servers_.InternalSwap(&other->servers_); + header_.Swap(&other->header_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(replication_factor_, other->replication_factor_); + swap(refresh_interval_seconds_, other->refresh_interval_seconds_); + swap(server_down_delay_seconds_, other->server_down_delay_seconds_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Replication::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void ServerSource::InitAsDefaultInstance() { + ::pb::_ServerSource_default_instance_._instance.get_mutable()->addr_info_ = const_cast< ::pb::AddrInfo*>( + ::pb::AddrInfo::internal_default_instance()); +} +class ServerSource::_Internal { + public: + static const ::pb::AddrInfo& addr_info(const ServerSource* msg); +}; + +const ::pb::AddrInfo& +ServerSource::_Internal::addr_info(const ServerSource* msg) { + return *msg->addr_info_; +} +ServerSource::ServerSource() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.ServerSource) +} +ServerSource::ServerSource(const ServerSource& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_addr_info()) { + addr_info_ = new ::pb::AddrInfo(*from.addr_info_); + } else { + addr_info_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:pb.ServerSource) +} + +void ServerSource::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ServerSource_replication_2eproto.base); + addr_info_ = nullptr; +} + +ServerSource::~ServerSource() { + // @@protoc_insertion_point(destructor:pb.ServerSource) + SharedDtor(); +} + +void ServerSource::SharedDtor() { + if (this != internal_default_instance()) delete addr_info_; +} + +void ServerSource::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ServerSource& ServerSource::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ServerSource_replication_2eproto.base); + return *internal_default_instance(); +} + + +void ServerSource::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.ServerSource) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaNoVirtual() == nullptr && addr_info_ != nullptr) { + delete addr_info_; + } + addr_info_ = nullptr; + _internal_metadata_.Clear(); +} + +const char* ServerSource::_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) { + // .pb.AddrInfo addr_info = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_addr_info(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* ServerSource::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.ServerSource) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .pb.AddrInfo addr_info = 1; + if (this->has_addr_info()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 1, _Internal::addr_info(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.ServerSource) + return target; +} + +size_t ServerSource::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.ServerSource) + 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; + + // .pb.AddrInfo addr_info = 1; + if (this->has_addr_info()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *addr_info_); + } + + 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 ServerSource::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.ServerSource) + GOOGLE_DCHECK_NE(&from, this); + const ServerSource* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.ServerSource) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.ServerSource) + MergeFrom(*source); + } +} + +void ServerSource::MergeFrom(const ServerSource& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.ServerSource) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.has_addr_info()) { + _internal_mutable_addr_info()->::pb::AddrInfo::MergeFrom(from._internal_addr_info()); + } +} + +void ServerSource::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.ServerSource) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ServerSource::CopyFrom(const ServerSource& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.ServerSource) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ServerSource::IsInitialized() const { + return true; +} + +void ServerSource::InternalSwap(ServerSource* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(addr_info_, other->addr_info_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ServerSource::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void AddrInfo::InitAsDefaultInstance() { +} +class AddrInfo::_Internal { + public: +}; + +AddrInfo::AddrInfo() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.AddrInfo) +} +AddrInfo::AddrInfo(const AddrInfo& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr), + addrs_bytes_(from.addrs_bytes_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + id_bytes_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_id_bytes().empty()) { + id_bytes_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.id_bytes_); + } + grpc_port_ = from.grpc_port_; + // @@protoc_insertion_point(copy_constructor:pb.AddrInfo) +} + +void AddrInfo::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_AddrInfo_replication_2eproto.base); + id_bytes_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + grpc_port_ = 0; +} + +AddrInfo::~AddrInfo() { + // @@protoc_insertion_point(destructor:pb.AddrInfo) + SharedDtor(); +} + +void AddrInfo::SharedDtor() { + id_bytes_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void AddrInfo::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const AddrInfo& AddrInfo::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_AddrInfo_replication_2eproto.base); + return *internal_default_instance(); +} + + +void AddrInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.AddrInfo) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + addrs_bytes_.Clear(); + id_bytes_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + grpc_port_ = 0; + _internal_metadata_.Clear(); +} + +const char* AddrInfo::_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) { + // bytes id_bytes = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_id_bytes(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else goto handle_unusual; + continue; + // repeated bytes addrs_bytes = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_addrs_bytes(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else goto handle_unusual; + continue; + // int32 grpc_port = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + grpc_port_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* AddrInfo::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.AddrInfo) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bytes id_bytes = 1; + if (this->id_bytes().size() > 0) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_id_bytes(), target); + } + + // repeated bytes addrs_bytes = 2; + for (int i = 0, n = this->_internal_addrs_bytes_size(); i < n; i++) { + const auto& s = this->_internal_addrs_bytes(i); + target = stream->WriteBytes(2, s, target); + } + + // int32 grpc_port = 3; + if (this->grpc_port() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_grpc_port(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.AddrInfo) + return target; +} + +size_t AddrInfo::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.AddrInfo) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated bytes addrs_bytes = 2; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(addrs_bytes_.size()); + for (int i = 0, n = addrs_bytes_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + addrs_bytes_.Get(i)); + } + + // bytes id_bytes = 1; + if (this->id_bytes().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_id_bytes()); + } + + // int32 grpc_port = 3; + if (this->grpc_port() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_grpc_port()); + } + + 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 AddrInfo::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.AddrInfo) + GOOGLE_DCHECK_NE(&from, this); + const AddrInfo* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.AddrInfo) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.AddrInfo) + MergeFrom(*source); + } +} + +void AddrInfo::MergeFrom(const AddrInfo& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.AddrInfo) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + addrs_bytes_.MergeFrom(from.addrs_bytes_); + if (from.id_bytes().size() > 0) { + + id_bytes_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.id_bytes_); + } + if (from.grpc_port() != 0) { + _internal_set_grpc_port(from._internal_grpc_port()); + } +} + +void AddrInfo::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.AddrInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void AddrInfo::CopyFrom(const AddrInfo& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.AddrInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AddrInfo::IsInitialized() const { + return true; +} + +void AddrInfo::InternalSwap(AddrInfo* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + addrs_bytes_.InternalSwap(&other->addrs_bytes_); + id_bytes_.Swap(&other->id_bytes_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(grpc_port_, other->grpc_port_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AddrInfo::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void Subscription::InitAsDefaultInstance() { +} +class Subscription::_Internal { + public: +}; + +Subscription::Subscription() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.Subscription) +} +Subscription::Subscription(const Subscription& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + topic_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_topic().empty()) { + topic_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.topic_); + } + author_id_bytes_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_author_id_bytes().empty()) { + author_id_bytes_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.author_id_bytes_); + } + remove_ = from.remove_; + // @@protoc_insertion_point(copy_constructor:pb.Subscription) +} + +void Subscription::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Subscription_replication_2eproto.base); + topic_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + author_id_bytes_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + remove_ = false; +} + +Subscription::~Subscription() { + // @@protoc_insertion_point(destructor:pb.Subscription) + SharedDtor(); +} + +void Subscription::SharedDtor() { + topic_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + author_id_bytes_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void Subscription::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Subscription& Subscription::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Subscription_replication_2eproto.base); + return *internal_default_instance(); +} + + +void Subscription::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.Subscription) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + topic_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + author_id_bytes_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + remove_ = false; + _internal_metadata_.Clear(); +} + +const char* Subscription::_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 topic = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_topic(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.Subscription.topic")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bytes author_id_bytes = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_author_id_bytes(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool remove = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + remove_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Subscription::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.Subscription) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string topic = 1; + if (this->topic().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_topic().data(), static_cast(this->_internal_topic().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.Subscription.topic"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_topic(), target); + } + + // bytes author_id_bytes = 2; + if (this->author_id_bytes().size() > 0) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_author_id_bytes(), target); + } + + // bool remove = 3; + if (this->remove() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_remove(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.Subscription) + return target; +} + +size_t Subscription::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.Subscription) + 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 topic = 1; + if (this->topic().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_topic()); + } + + // bytes author_id_bytes = 2; + if (this->author_id_bytes().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_author_id_bytes()); + } + + // bool remove = 3; + if (this->remove() != 0) { + total_size += 1 + 1; + } + + 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 Subscription::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.Subscription) + GOOGLE_DCHECK_NE(&from, this); + const Subscription* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.Subscription) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.Subscription) + MergeFrom(*source); + } +} + +void Subscription::MergeFrom(const Subscription& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.Subscription) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.topic().size() > 0) { + + topic_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.topic_); + } + if (from.author_id_bytes().size() > 0) { + + author_id_bytes_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.author_id_bytes_); + } + if (from.remove() != 0) { + _internal_set_remove(from._internal_remove()); + } +} + +void Subscription::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.Subscription) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Subscription::CopyFrom(const Subscription& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.Subscription) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Subscription::IsInitialized() const { + return true; +} + +void Subscription::InternalSwap(Subscription* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + topic_.Swap(&other->topic_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + author_id_bytes_.Swap(&other->author_id_bytes_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(remove_, other->remove_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Subscription::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void ReplicationStatus::InitAsDefaultInstance() { +} +class ReplicationStatus::_Internal { + public: +}; + +ReplicationStatus::ReplicationStatus() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.ReplicationStatus) +} +ReplicationStatus::ReplicationStatus(const ReplicationStatus& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(¤t_version_, &from.current_version_, + static_cast(reinterpret_cast(&is_active_) - + reinterpret_cast(¤t_version_)) + sizeof(is_active_)); + // @@protoc_insertion_point(copy_constructor:pb.ReplicationStatus) +} + +void ReplicationStatus::SharedCtor() { + ::memset(¤t_version_, 0, static_cast( + reinterpret_cast(&is_active_) - + reinterpret_cast(¤t_version_)) + sizeof(is_active_)); +} + +ReplicationStatus::~ReplicationStatus() { + // @@protoc_insertion_point(destructor:pb.ReplicationStatus) + SharedDtor(); +} + +void ReplicationStatus::SharedDtor() { +} + +void ReplicationStatus::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ReplicationStatus& ReplicationStatus::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ReplicationStatus_replication_2eproto.base); + return *internal_default_instance(); +} + + +void ReplicationStatus::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.ReplicationStatus) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(¤t_version_, 0, static_cast( + reinterpret_cast(&is_active_) - + reinterpret_cast(¤t_version_)) + sizeof(is_active_)); + _internal_metadata_.Clear(); +} + +const char* ReplicationStatus::_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) { + // bool ok = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ok_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool is_active = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + is_active_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // int64 current_version = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + current_version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // int64 target_version = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + target_version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* ReplicationStatus::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.ReplicationStatus) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bool ok = 1; + if (this->ok() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_ok(), target); + } + + // bool is_active = 2; + if (this->is_active() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_is_active(), target); + } + + // int64 current_version = 3; + if (this->current_version() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->_internal_current_version(), target); + } + + // int64 target_version = 4; + if (this->target_version() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->_internal_target_version(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.ReplicationStatus) + return target; +} + +size_t ReplicationStatus::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.ReplicationStatus) + 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; + + // int64 current_version = 3; + if (this->current_version() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( + this->_internal_current_version()); + } + + // int64 target_version = 4; + if (this->target_version() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( + this->_internal_target_version()); + } + + // bool ok = 1; + if (this->ok() != 0) { + total_size += 1 + 1; + } + + // bool is_active = 2; + if (this->is_active() != 0) { + total_size += 1 + 1; + } + + 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 ReplicationStatus::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.ReplicationStatus) + GOOGLE_DCHECK_NE(&from, this); + const ReplicationStatus* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.ReplicationStatus) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.ReplicationStatus) + MergeFrom(*source); + } +} + +void ReplicationStatus::MergeFrom(const ReplicationStatus& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.ReplicationStatus) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.current_version() != 0) { + _internal_set_current_version(from._internal_current_version()); + } + if (from.target_version() != 0) { + _internal_set_target_version(from._internal_target_version()); + } + if (from.ok() != 0) { + _internal_set_ok(from._internal_ok()); + } + if (from.is_active() != 0) { + _internal_set_is_active(from._internal_is_active()); + } +} + +void ReplicationStatus::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.ReplicationStatus) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ReplicationStatus::CopyFrom(const ReplicationStatus& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.ReplicationStatus) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ReplicationStatus::IsInitialized() const { + return true; +} + +void ReplicationStatus::InternalSwap(ReplicationStatus* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(current_version_, other->current_version_); + swap(target_version_, other->target_version_); + swap(ok_, other->ok_); + swap(is_active_, other->is_active_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ReplicationStatus::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void SubscriptionUpdate::InitAsDefaultInstance() { +} +class SubscriptionUpdate::_Internal { + public: +}; + +SubscriptionUpdate::SubscriptionUpdate() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.SubscriptionUpdate) +} +SubscriptionUpdate::SubscriptionUpdate(const SubscriptionUpdate& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + replication_bytes_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_replication_bytes().empty()) { + replication_bytes_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.replication_bytes_); + } + signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_signature().empty()) { + signature_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.signature_); + } + version_ = from.version_; + // @@protoc_insertion_point(copy_constructor:pb.SubscriptionUpdate) +} + +void SubscriptionUpdate::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_SubscriptionUpdate_replication_2eproto.base); + replication_bytes_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + version_ = PROTOBUF_LONGLONG(0); +} + +SubscriptionUpdate::~SubscriptionUpdate() { + // @@protoc_insertion_point(destructor:pb.SubscriptionUpdate) + SharedDtor(); +} + +void SubscriptionUpdate::SharedDtor() { + replication_bytes_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + signature_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void SubscriptionUpdate::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const SubscriptionUpdate& SubscriptionUpdate::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SubscriptionUpdate_replication_2eproto.base); + return *internal_default_instance(); +} + + +void SubscriptionUpdate::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.SubscriptionUpdate) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + replication_bytes_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + signature_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + version_ = PROTOBUF_LONGLONG(0); + _internal_metadata_.Clear(); +} + +const char* SubscriptionUpdate::_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) { + // int64 version = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bytes replication_bytes = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_replication_bytes(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bytes signature = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + auto str = _internal_mutable_signature(); + 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_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* SubscriptionUpdate::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.SubscriptionUpdate) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int64 version = 1; + if (this->version() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_version(), target); + } + + // bytes replication_bytes = 2; + if (this->replication_bytes().size() > 0) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_replication_bytes(), target); + } + + // bytes signature = 3; + if (this->signature().size() > 0) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_signature(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.SubscriptionUpdate) + return target; +} + +size_t SubscriptionUpdate::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.SubscriptionUpdate) + 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; + + // bytes replication_bytes = 2; + if (this->replication_bytes().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_replication_bytes()); + } + + // bytes signature = 3; + if (this->signature().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_signature()); + } + + // int64 version = 1; + if (this->version() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( + this->_internal_version()); + } + + 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 SubscriptionUpdate::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.SubscriptionUpdate) + GOOGLE_DCHECK_NE(&from, this); + const SubscriptionUpdate* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.SubscriptionUpdate) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.SubscriptionUpdate) + MergeFrom(*source); + } +} + +void SubscriptionUpdate::MergeFrom(const SubscriptionUpdate& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.SubscriptionUpdate) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.replication_bytes().size() > 0) { + + replication_bytes_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.replication_bytes_); + } + if (from.signature().size() > 0) { + + signature_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.signature_); + } + if (from.version() != 0) { + _internal_set_version(from._internal_version()); + } +} + +void SubscriptionUpdate::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.SubscriptionUpdate) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void SubscriptionUpdate::CopyFrom(const SubscriptionUpdate& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.SubscriptionUpdate) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool SubscriptionUpdate::IsInitialized() const { + return true; +} + +void SubscriptionUpdate::InternalSwap(SubscriptionUpdate* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + replication_bytes_.Swap(&other->replication_bytes_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + signature_.Swap(&other->signature_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(version_, other->version_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata SubscriptionUpdate::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void SignedSubscription::InitAsDefaultInstance() { + ::pb::_SignedSubscription_default_instance_._instance.get_mutable()->sub_part_ = const_cast< ::pb::Subscription*>( + ::pb::Subscription::internal_default_instance()); + ::pb::_SignedSubscription_default_instance_._instance.get_mutable()->update_part_ = const_cast< ::pb::SubscriptionUpdate*>( + ::pb::SubscriptionUpdate::internal_default_instance()); +} +class SignedSubscription::_Internal { + public: + static const ::pb::Subscription& sub_part(const SignedSubscription* msg); + static const ::pb::SubscriptionUpdate& update_part(const SignedSubscription* msg); +}; + +const ::pb::Subscription& +SignedSubscription::_Internal::sub_part(const SignedSubscription* msg) { + return *msg->sub_part_; +} +const ::pb::SubscriptionUpdate& +SignedSubscription::_Internal::update_part(const SignedSubscription* msg) { + return *msg->update_part_; +} +SignedSubscription::SignedSubscription() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.SignedSubscription) +} +SignedSubscription::SignedSubscription(const SignedSubscription& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_sub_part()) { + sub_part_ = new ::pb::Subscription(*from.sub_part_); + } else { + sub_part_ = nullptr; + } + if (from._internal_has_update_part()) { + update_part_ = new ::pb::SubscriptionUpdate(*from.update_part_); + } else { + update_part_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:pb.SignedSubscription) +} + +void SignedSubscription::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_SignedSubscription_replication_2eproto.base); + ::memset(&sub_part_, 0, static_cast( + reinterpret_cast(&update_part_) - + reinterpret_cast(&sub_part_)) + sizeof(update_part_)); +} + +SignedSubscription::~SignedSubscription() { + // @@protoc_insertion_point(destructor:pb.SignedSubscription) + SharedDtor(); +} + +void SignedSubscription::SharedDtor() { + if (this != internal_default_instance()) delete sub_part_; + if (this != internal_default_instance()) delete update_part_; +} + +void SignedSubscription::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const SignedSubscription& SignedSubscription::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SignedSubscription_replication_2eproto.base); + return *internal_default_instance(); +} + + +void SignedSubscription::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.SignedSubscription) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaNoVirtual() == nullptr && sub_part_ != nullptr) { + delete sub_part_; + } + sub_part_ = nullptr; + if (GetArenaNoVirtual() == nullptr && update_part_ != nullptr) { + delete update_part_; + } + update_part_ = nullptr; + _internal_metadata_.Clear(); +} + +const char* SignedSubscription::_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) { + // .pb.Subscription sub_part = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_sub_part(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .pb.SubscriptionUpdate update_part = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_update_part(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* SignedSubscription::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.SignedSubscription) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .pb.Subscription sub_part = 1; + if (this->has_sub_part()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 1, _Internal::sub_part(this), target, stream); + } + + // .pb.SubscriptionUpdate update_part = 2; + if (this->has_update_part()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 2, _Internal::update_part(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.SignedSubscription) + return target; +} + +size_t SignedSubscription::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.SignedSubscription) + 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; + + // .pb.Subscription sub_part = 1; + if (this->has_sub_part()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *sub_part_); + } + + // .pb.SubscriptionUpdate update_part = 2; + if (this->has_update_part()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *update_part_); + } + + 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 SignedSubscription::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.SignedSubscription) + GOOGLE_DCHECK_NE(&from, this); + const SignedSubscription* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.SignedSubscription) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.SignedSubscription) + MergeFrom(*source); + } +} + +void SignedSubscription::MergeFrom(const SignedSubscription& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.SignedSubscription) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.has_sub_part()) { + _internal_mutable_sub_part()->::pb::Subscription::MergeFrom(from._internal_sub_part()); + } + if (from.has_update_part()) { + _internal_mutable_update_part()->::pb::SubscriptionUpdate::MergeFrom(from._internal_update_part()); + } +} + +void SignedSubscription::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.SignedSubscription) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void SignedSubscription::CopyFrom(const SignedSubscription& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.SignedSubscription) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool SignedSubscription::IsInitialized() const { + return true; +} + +void SignedSubscription::InternalSwap(SignedSubscription* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(sub_part_, other->sub_part_); + swap(update_part_, other->update_part_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata SignedSubscription::GetMetadata() const { + return GetMetadataStatic(); +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace pb +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::pb::Replication* Arena::CreateMaybeMessage< ::pb::Replication >(Arena* arena) { + return Arena::CreateInternal< ::pb::Replication >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::ServerSource* Arena::CreateMaybeMessage< ::pb::ServerSource >(Arena* arena) { + return Arena::CreateInternal< ::pb::ServerSource >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::AddrInfo* Arena::CreateMaybeMessage< ::pb::AddrInfo >(Arena* arena) { + return Arena::CreateInternal< ::pb::AddrInfo >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::Subscription* Arena::CreateMaybeMessage< ::pb::Subscription >(Arena* arena) { + return Arena::CreateInternal< ::pb::Subscription >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::ReplicationStatus* Arena::CreateMaybeMessage< ::pb::ReplicationStatus >(Arena* arena) { + return Arena::CreateInternal< ::pb::ReplicationStatus >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::SubscriptionUpdate* Arena::CreateMaybeMessage< ::pb::SubscriptionUpdate >(Arena* arena) { + return Arena::CreateInternal< ::pb::SubscriptionUpdate >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::SignedSubscription* Arena::CreateMaybeMessage< ::pb::SignedSubscription >(Arena* arena) { + return Arena::CreateInternal< ::pb::SignedSubscription >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/cpp/replication.pb.h b/cpp/replication.pb.h new file mode 100644 index 0000000..eaea391 --- /dev/null +++ b/cpp/replication.pb.h @@ -0,0 +1,2236 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: replication.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_replication_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_replication_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3011000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3011002 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_replication_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_replication_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[7] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_replication_2eproto; +namespace pb { +class AddrInfo; +class AddrInfoDefaultTypeInternal; +extern AddrInfoDefaultTypeInternal _AddrInfo_default_instance_; +class Replication; +class ReplicationDefaultTypeInternal; +extern ReplicationDefaultTypeInternal _Replication_default_instance_; +class ReplicationStatus; +class ReplicationStatusDefaultTypeInternal; +extern ReplicationStatusDefaultTypeInternal _ReplicationStatus_default_instance_; +class ServerSource; +class ServerSourceDefaultTypeInternal; +extern ServerSourceDefaultTypeInternal _ServerSource_default_instance_; +class SignedSubscription; +class SignedSubscriptionDefaultTypeInternal; +extern SignedSubscriptionDefaultTypeInternal _SignedSubscription_default_instance_; +class Subscription; +class SubscriptionDefaultTypeInternal; +extern SubscriptionDefaultTypeInternal _Subscription_default_instance_; +class SubscriptionUpdate; +class SubscriptionUpdateDefaultTypeInternal; +extern SubscriptionUpdateDefaultTypeInternal _SubscriptionUpdate_default_instance_; +} // namespace pb +PROTOBUF_NAMESPACE_OPEN +template<> ::pb::AddrInfo* Arena::CreateMaybeMessage<::pb::AddrInfo>(Arena*); +template<> ::pb::Replication* Arena::CreateMaybeMessage<::pb::Replication>(Arena*); +template<> ::pb::ReplicationStatus* Arena::CreateMaybeMessage<::pb::ReplicationStatus>(Arena*); +template<> ::pb::ServerSource* Arena::CreateMaybeMessage<::pb::ServerSource>(Arena*); +template<> ::pb::SignedSubscription* Arena::CreateMaybeMessage<::pb::SignedSubscription>(Arena*); +template<> ::pb::Subscription* Arena::CreateMaybeMessage<::pb::Subscription>(Arena*); +template<> ::pb::SubscriptionUpdate* Arena::CreateMaybeMessage<::pb::SubscriptionUpdate>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace pb { + +// =================================================================== + +class Replication : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.Replication) */ { + public: + Replication(); + virtual ~Replication(); + + Replication(const Replication& from); + Replication(Replication&& from) noexcept + : Replication() { + *this = ::std::move(from); + } + + inline Replication& operator=(const Replication& from) { + CopyFrom(from); + return *this; + } + inline Replication& operator=(Replication&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 Replication& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Replication* internal_default_instance() { + return reinterpret_cast( + &_Replication_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(Replication& a, Replication& b) { + a.Swap(&b); + } + inline void Swap(Replication* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Replication* New() const final { + return CreateMaybeMessage(nullptr); + } + + Replication* 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 Replication& from); + void MergeFrom(const Replication& 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(Replication* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.Replication"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_replication_2eproto); + return ::descriptor_table_replication_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kCidsBytesFieldNumber = 2, + kServersFieldNumber = 3, + kHeaderFieldNumber = 1, + kReplicationFactorFieldNumber = 4, + kRefreshIntervalSecondsFieldNumber = 5, + kServerDownDelaySecondsFieldNumber = 6, + }; + // repeated bytes cids_bytes = 2; + int cids_bytes_size() const; + private: + int _internal_cids_bytes_size() const; + public: + void clear_cids_bytes(); + const std::string& cids_bytes(int index) const; + std::string* mutable_cids_bytes(int index); + void set_cids_bytes(int index, const std::string& value); + void set_cids_bytes(int index, std::string&& value); + void set_cids_bytes(int index, const char* value); + void set_cids_bytes(int index, const void* value, size_t size); + std::string* add_cids_bytes(); + void add_cids_bytes(const std::string& value); + void add_cids_bytes(std::string&& value); + void add_cids_bytes(const char* value); + void add_cids_bytes(const void* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& cids_bytes() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_cids_bytes(); + private: + const std::string& _internal_cids_bytes(int index) const; + std::string* _internal_add_cids_bytes(); + public: + + // repeated .pb.ServerSource servers = 3; + int servers_size() const; + private: + int _internal_servers_size() const; + public: + void clear_servers(); + ::pb::ServerSource* mutable_servers(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::ServerSource >* + mutable_servers(); + private: + const ::pb::ServerSource& _internal_servers(int index) const; + ::pb::ServerSource* _internal_add_servers(); + public: + const ::pb::ServerSource& servers(int index) const; + ::pb::ServerSource* add_servers(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::ServerSource >& + servers() const; + + // string header = 1; + void clear_header(); + const std::string& header() const; + void set_header(const std::string& value); + void set_header(std::string&& value); + void set_header(const char* value); + void set_header(const char* value, size_t size); + std::string* mutable_header(); + std::string* release_header(); + void set_allocated_header(std::string* header); + private: + const std::string& _internal_header() const; + void _internal_set_header(const std::string& value); + std::string* _internal_mutable_header(); + public: + + // int32 replication_factor = 4; + void clear_replication_factor(); + ::PROTOBUF_NAMESPACE_ID::int32 replication_factor() const; + void set_replication_factor(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_replication_factor() const; + void _internal_set_replication_factor(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // int32 refresh_interval_seconds = 5; + void clear_refresh_interval_seconds(); + ::PROTOBUF_NAMESPACE_ID::int32 refresh_interval_seconds() const; + void set_refresh_interval_seconds(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_refresh_interval_seconds() const; + void _internal_set_refresh_interval_seconds(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // int32 server_down_delay_seconds = 6; + void clear_server_down_delay_seconds(); + ::PROTOBUF_NAMESPACE_ID::int32 server_down_delay_seconds() const; + void set_server_down_delay_seconds(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_server_down_delay_seconds() const; + void _internal_set_server_down_delay_seconds(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // @@protoc_insertion_point(class_scope:pb.Replication) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField cids_bytes_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::ServerSource > servers_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr header_; + ::PROTOBUF_NAMESPACE_ID::int32 replication_factor_; + ::PROTOBUF_NAMESPACE_ID::int32 refresh_interval_seconds_; + ::PROTOBUF_NAMESPACE_ID::int32 server_down_delay_seconds_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_replication_2eproto; +}; +// ------------------------------------------------------------------- + +class ServerSource : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.ServerSource) */ { + public: + ServerSource(); + virtual ~ServerSource(); + + ServerSource(const ServerSource& from); + ServerSource(ServerSource&& from) noexcept + : ServerSource() { + *this = ::std::move(from); + } + + inline ServerSource& operator=(const ServerSource& from) { + CopyFrom(from); + return *this; + } + inline ServerSource& operator=(ServerSource&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 ServerSource& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const ServerSource* internal_default_instance() { + return reinterpret_cast( + &_ServerSource_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(ServerSource& a, ServerSource& b) { + a.Swap(&b); + } + inline void Swap(ServerSource* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline ServerSource* New() const final { + return CreateMaybeMessage(nullptr); + } + + ServerSource* 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 ServerSource& from); + void MergeFrom(const ServerSource& 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(ServerSource* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.ServerSource"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_replication_2eproto); + return ::descriptor_table_replication_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kAddrInfoFieldNumber = 1, + }; + // .pb.AddrInfo addr_info = 1; + bool has_addr_info() const; + private: + bool _internal_has_addr_info() const; + public: + void clear_addr_info(); + const ::pb::AddrInfo& addr_info() const; + ::pb::AddrInfo* release_addr_info(); + ::pb::AddrInfo* mutable_addr_info(); + void set_allocated_addr_info(::pb::AddrInfo* addr_info); + private: + const ::pb::AddrInfo& _internal_addr_info() const; + ::pb::AddrInfo* _internal_mutable_addr_info(); + public: + + // @@protoc_insertion_point(class_scope:pb.ServerSource) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::pb::AddrInfo* addr_info_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_replication_2eproto; +}; +// ------------------------------------------------------------------- + +class AddrInfo : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.AddrInfo) */ { + public: + AddrInfo(); + virtual ~AddrInfo(); + + AddrInfo(const AddrInfo& from); + AddrInfo(AddrInfo&& from) noexcept + : AddrInfo() { + *this = ::std::move(from); + } + + inline AddrInfo& operator=(const AddrInfo& from) { + CopyFrom(from); + return *this; + } + inline AddrInfo& operator=(AddrInfo&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 AddrInfo& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const AddrInfo* internal_default_instance() { + return reinterpret_cast( + &_AddrInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(AddrInfo& a, AddrInfo& b) { + a.Swap(&b); + } + inline void Swap(AddrInfo* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline AddrInfo* New() const final { + return CreateMaybeMessage(nullptr); + } + + AddrInfo* 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 AddrInfo& from); + void MergeFrom(const AddrInfo& 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(AddrInfo* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.AddrInfo"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_replication_2eproto); + return ::descriptor_table_replication_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kAddrsBytesFieldNumber = 2, + kIdBytesFieldNumber = 1, + kGrpcPortFieldNumber = 3, + }; + // repeated bytes addrs_bytes = 2; + int addrs_bytes_size() const; + private: + int _internal_addrs_bytes_size() const; + public: + void clear_addrs_bytes(); + const std::string& addrs_bytes(int index) const; + std::string* mutable_addrs_bytes(int index); + void set_addrs_bytes(int index, const std::string& value); + void set_addrs_bytes(int index, std::string&& value); + void set_addrs_bytes(int index, const char* value); + void set_addrs_bytes(int index, const void* value, size_t size); + std::string* add_addrs_bytes(); + void add_addrs_bytes(const std::string& value); + void add_addrs_bytes(std::string&& value); + void add_addrs_bytes(const char* value); + void add_addrs_bytes(const void* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& addrs_bytes() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_addrs_bytes(); + private: + const std::string& _internal_addrs_bytes(int index) const; + std::string* _internal_add_addrs_bytes(); + public: + + // bytes id_bytes = 1; + void clear_id_bytes(); + const std::string& id_bytes() const; + void set_id_bytes(const std::string& value); + void set_id_bytes(std::string&& value); + void set_id_bytes(const char* value); + void set_id_bytes(const void* value, size_t size); + std::string* mutable_id_bytes(); + std::string* release_id_bytes(); + void set_allocated_id_bytes(std::string* id_bytes); + private: + const std::string& _internal_id_bytes() const; + void _internal_set_id_bytes(const std::string& value); + std::string* _internal_mutable_id_bytes(); + public: + + // int32 grpc_port = 3; + void clear_grpc_port(); + ::PROTOBUF_NAMESPACE_ID::int32 grpc_port() const; + void set_grpc_port(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_grpc_port() const; + void _internal_set_grpc_port(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // @@protoc_insertion_point(class_scope:pb.AddrInfo) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField addrs_bytes_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr id_bytes_; + ::PROTOBUF_NAMESPACE_ID::int32 grpc_port_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_replication_2eproto; +}; +// ------------------------------------------------------------------- + +class Subscription : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.Subscription) */ { + public: + Subscription(); + virtual ~Subscription(); + + Subscription(const Subscription& from); + Subscription(Subscription&& from) noexcept + : Subscription() { + *this = ::std::move(from); + } + + inline Subscription& operator=(const Subscription& from) { + CopyFrom(from); + return *this; + } + inline Subscription& operator=(Subscription&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 Subscription& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Subscription* internal_default_instance() { + return reinterpret_cast( + &_Subscription_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(Subscription& a, Subscription& b) { + a.Swap(&b); + } + inline void Swap(Subscription* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Subscription* New() const final { + return CreateMaybeMessage(nullptr); + } + + Subscription* 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 Subscription& from); + void MergeFrom(const Subscription& 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(Subscription* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.Subscription"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_replication_2eproto); + return ::descriptor_table_replication_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTopicFieldNumber = 1, + kAuthorIdBytesFieldNumber = 2, + kRemoveFieldNumber = 3, + }; + // string topic = 1; + void clear_topic(); + const std::string& topic() const; + void set_topic(const std::string& value); + void set_topic(std::string&& value); + void set_topic(const char* value); + void set_topic(const char* value, size_t size); + std::string* mutable_topic(); + std::string* release_topic(); + void set_allocated_topic(std::string* topic); + private: + const std::string& _internal_topic() const; + void _internal_set_topic(const std::string& value); + std::string* _internal_mutable_topic(); + public: + + // bytes author_id_bytes = 2; + void clear_author_id_bytes(); + const std::string& author_id_bytes() const; + void set_author_id_bytes(const std::string& value); + void set_author_id_bytes(std::string&& value); + void set_author_id_bytes(const char* value); + void set_author_id_bytes(const void* value, size_t size); + std::string* mutable_author_id_bytes(); + std::string* release_author_id_bytes(); + void set_allocated_author_id_bytes(std::string* author_id_bytes); + private: + const std::string& _internal_author_id_bytes() const; + void _internal_set_author_id_bytes(const std::string& value); + std::string* _internal_mutable_author_id_bytes(); + public: + + // bool remove = 3; + void clear_remove(); + bool remove() const; + void set_remove(bool value); + private: + bool _internal_remove() const; + void _internal_set_remove(bool value); + public: + + // @@protoc_insertion_point(class_scope:pb.Subscription) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr topic_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr author_id_bytes_; + bool remove_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_replication_2eproto; +}; +// ------------------------------------------------------------------- + +class ReplicationStatus : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.ReplicationStatus) */ { + public: + ReplicationStatus(); + virtual ~ReplicationStatus(); + + ReplicationStatus(const ReplicationStatus& from); + ReplicationStatus(ReplicationStatus&& from) noexcept + : ReplicationStatus() { + *this = ::std::move(from); + } + + inline ReplicationStatus& operator=(const ReplicationStatus& from) { + CopyFrom(from); + return *this; + } + inline ReplicationStatus& operator=(ReplicationStatus&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 ReplicationStatus& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const ReplicationStatus* internal_default_instance() { + return reinterpret_cast( + &_ReplicationStatus_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(ReplicationStatus& a, ReplicationStatus& b) { + a.Swap(&b); + } + inline void Swap(ReplicationStatus* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline ReplicationStatus* New() const final { + return CreateMaybeMessage(nullptr); + } + + ReplicationStatus* 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 ReplicationStatus& from); + void MergeFrom(const ReplicationStatus& 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(ReplicationStatus* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.ReplicationStatus"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_replication_2eproto); + return ::descriptor_table_replication_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kCurrentVersionFieldNumber = 3, + kTargetVersionFieldNumber = 4, + kOkFieldNumber = 1, + kIsActiveFieldNumber = 2, + }; + // int64 current_version = 3; + void clear_current_version(); + ::PROTOBUF_NAMESPACE_ID::int64 current_version() const; + void set_current_version(::PROTOBUF_NAMESPACE_ID::int64 value); + private: + ::PROTOBUF_NAMESPACE_ID::int64 _internal_current_version() const; + void _internal_set_current_version(::PROTOBUF_NAMESPACE_ID::int64 value); + public: + + // int64 target_version = 4; + void clear_target_version(); + ::PROTOBUF_NAMESPACE_ID::int64 target_version() const; + void set_target_version(::PROTOBUF_NAMESPACE_ID::int64 value); + private: + ::PROTOBUF_NAMESPACE_ID::int64 _internal_target_version() const; + void _internal_set_target_version(::PROTOBUF_NAMESPACE_ID::int64 value); + public: + + // bool ok = 1; + void clear_ok(); + bool ok() const; + void set_ok(bool value); + private: + bool _internal_ok() const; + void _internal_set_ok(bool value); + public: + + // bool is_active = 2; + void clear_is_active(); + bool is_active() const; + void set_is_active(bool value); + private: + bool _internal_is_active() const; + void _internal_set_is_active(bool value); + public: + + // @@protoc_insertion_point(class_scope:pb.ReplicationStatus) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::int64 current_version_; + ::PROTOBUF_NAMESPACE_ID::int64 target_version_; + bool ok_; + bool is_active_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_replication_2eproto; +}; +// ------------------------------------------------------------------- + +class SubscriptionUpdate : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.SubscriptionUpdate) */ { + public: + SubscriptionUpdate(); + virtual ~SubscriptionUpdate(); + + SubscriptionUpdate(const SubscriptionUpdate& from); + SubscriptionUpdate(SubscriptionUpdate&& from) noexcept + : SubscriptionUpdate() { + *this = ::std::move(from); + } + + inline SubscriptionUpdate& operator=(const SubscriptionUpdate& from) { + CopyFrom(from); + return *this; + } + inline SubscriptionUpdate& operator=(SubscriptionUpdate&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 SubscriptionUpdate& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const SubscriptionUpdate* internal_default_instance() { + return reinterpret_cast( + &_SubscriptionUpdate_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(SubscriptionUpdate& a, SubscriptionUpdate& b) { + a.Swap(&b); + } + inline void Swap(SubscriptionUpdate* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline SubscriptionUpdate* New() const final { + return CreateMaybeMessage(nullptr); + } + + SubscriptionUpdate* 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 SubscriptionUpdate& from); + void MergeFrom(const SubscriptionUpdate& 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(SubscriptionUpdate* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.SubscriptionUpdate"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_replication_2eproto); + return ::descriptor_table_replication_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kReplicationBytesFieldNumber = 2, + kSignatureFieldNumber = 3, + kVersionFieldNumber = 1, + }; + // bytes replication_bytes = 2; + void clear_replication_bytes(); + const std::string& replication_bytes() const; + void set_replication_bytes(const std::string& value); + void set_replication_bytes(std::string&& value); + void set_replication_bytes(const char* value); + void set_replication_bytes(const void* value, size_t size); + std::string* mutable_replication_bytes(); + std::string* release_replication_bytes(); + void set_allocated_replication_bytes(std::string* replication_bytes); + private: + const std::string& _internal_replication_bytes() const; + void _internal_set_replication_bytes(const std::string& value); + std::string* _internal_mutable_replication_bytes(); + public: + + // bytes signature = 3; + void clear_signature(); + const std::string& signature() const; + void set_signature(const std::string& value); + void set_signature(std::string&& value); + void set_signature(const char* value); + void set_signature(const void* value, size_t size); + std::string* mutable_signature(); + std::string* release_signature(); + void set_allocated_signature(std::string* signature); + private: + const std::string& _internal_signature() const; + void _internal_set_signature(const std::string& value); + std::string* _internal_mutable_signature(); + public: + + // int64 version = 1; + void clear_version(); + ::PROTOBUF_NAMESPACE_ID::int64 version() const; + void set_version(::PROTOBUF_NAMESPACE_ID::int64 value); + private: + ::PROTOBUF_NAMESPACE_ID::int64 _internal_version() const; + void _internal_set_version(::PROTOBUF_NAMESPACE_ID::int64 value); + public: + + // @@protoc_insertion_point(class_scope:pb.SubscriptionUpdate) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr replication_bytes_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr signature_; + ::PROTOBUF_NAMESPACE_ID::int64 version_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_replication_2eproto; +}; +// ------------------------------------------------------------------- + +class SignedSubscription : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.SignedSubscription) */ { + public: + SignedSubscription(); + virtual ~SignedSubscription(); + + SignedSubscription(const SignedSubscription& from); + SignedSubscription(SignedSubscription&& from) noexcept + : SignedSubscription() { + *this = ::std::move(from); + } + + inline SignedSubscription& operator=(const SignedSubscription& from) { + CopyFrom(from); + return *this; + } + inline SignedSubscription& operator=(SignedSubscription&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 SignedSubscription& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const SignedSubscription* internal_default_instance() { + return reinterpret_cast( + &_SignedSubscription_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(SignedSubscription& a, SignedSubscription& b) { + a.Swap(&b); + } + inline void Swap(SignedSubscription* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline SignedSubscription* New() const final { + return CreateMaybeMessage(nullptr); + } + + SignedSubscription* 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 SignedSubscription& from); + void MergeFrom(const SignedSubscription& 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(SignedSubscription* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.SignedSubscription"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_replication_2eproto); + return ::descriptor_table_replication_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSubPartFieldNumber = 1, + kUpdatePartFieldNumber = 2, + }; + // .pb.Subscription sub_part = 1; + bool has_sub_part() const; + private: + bool _internal_has_sub_part() const; + public: + void clear_sub_part(); + const ::pb::Subscription& sub_part() const; + ::pb::Subscription* release_sub_part(); + ::pb::Subscription* mutable_sub_part(); + void set_allocated_sub_part(::pb::Subscription* sub_part); + private: + const ::pb::Subscription& _internal_sub_part() const; + ::pb::Subscription* _internal_mutable_sub_part(); + public: + + // .pb.SubscriptionUpdate update_part = 2; + bool has_update_part() const; + private: + bool _internal_has_update_part() const; + public: + void clear_update_part(); + const ::pb::SubscriptionUpdate& update_part() const; + ::pb::SubscriptionUpdate* release_update_part(); + ::pb::SubscriptionUpdate* mutable_update_part(); + void set_allocated_update_part(::pb::SubscriptionUpdate* update_part); + private: + const ::pb::SubscriptionUpdate& _internal_update_part() const; + ::pb::SubscriptionUpdate* _internal_mutable_update_part(); + public: + + // @@protoc_insertion_point(class_scope:pb.SignedSubscription) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::pb::Subscription* sub_part_; + ::pb::SubscriptionUpdate* update_part_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_replication_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// Replication + +// string header = 1; +inline void Replication::clear_header() { + header_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& Replication::header() const { + // @@protoc_insertion_point(field_get:pb.Replication.header) + return _internal_header(); +} +inline void Replication::set_header(const std::string& value) { + _internal_set_header(value); + // @@protoc_insertion_point(field_set:pb.Replication.header) +} +inline std::string* Replication::mutable_header() { + // @@protoc_insertion_point(field_mutable:pb.Replication.header) + return _internal_mutable_header(); +} +inline const std::string& Replication::_internal_header() const { + return header_.GetNoArena(); +} +inline void Replication::_internal_set_header(const std::string& value) { + + header_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void Replication::set_header(std::string&& value) { + + header_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.Replication.header) +} +inline void Replication::set_header(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + header_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.Replication.header) +} +inline void Replication::set_header(const char* value, size_t size) { + + header_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.Replication.header) +} +inline std::string* Replication::_internal_mutable_header() { + + return header_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* Replication::release_header() { + // @@protoc_insertion_point(field_release:pb.Replication.header) + + return header_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void Replication::set_allocated_header(std::string* header) { + if (header != nullptr) { + + } else { + + } + header_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), header); + // @@protoc_insertion_point(field_set_allocated:pb.Replication.header) +} + +// repeated bytes cids_bytes = 2; +inline int Replication::_internal_cids_bytes_size() const { + return cids_bytes_.size(); +} +inline int Replication::cids_bytes_size() const { + return _internal_cids_bytes_size(); +} +inline void Replication::clear_cids_bytes() { + cids_bytes_.Clear(); +} +inline std::string* Replication::add_cids_bytes() { + // @@protoc_insertion_point(field_add_mutable:pb.Replication.cids_bytes) + return _internal_add_cids_bytes(); +} +inline const std::string& Replication::_internal_cids_bytes(int index) const { + return cids_bytes_.Get(index); +} +inline const std::string& Replication::cids_bytes(int index) const { + // @@protoc_insertion_point(field_get:pb.Replication.cids_bytes) + return _internal_cids_bytes(index); +} +inline std::string* Replication::mutable_cids_bytes(int index) { + // @@protoc_insertion_point(field_mutable:pb.Replication.cids_bytes) + return cids_bytes_.Mutable(index); +} +inline void Replication::set_cids_bytes(int index, const std::string& value) { + // @@protoc_insertion_point(field_set:pb.Replication.cids_bytes) + cids_bytes_.Mutable(index)->assign(value); +} +inline void Replication::set_cids_bytes(int index, std::string&& value) { + // @@protoc_insertion_point(field_set:pb.Replication.cids_bytes) + cids_bytes_.Mutable(index)->assign(std::move(value)); +} +inline void Replication::set_cids_bytes(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + cids_bytes_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:pb.Replication.cids_bytes) +} +inline void Replication::set_cids_bytes(int index, const void* value, size_t size) { + cids_bytes_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:pb.Replication.cids_bytes) +} +inline std::string* Replication::_internal_add_cids_bytes() { + return cids_bytes_.Add(); +} +inline void Replication::add_cids_bytes(const std::string& value) { + cids_bytes_.Add()->assign(value); + // @@protoc_insertion_point(field_add:pb.Replication.cids_bytes) +} +inline void Replication::add_cids_bytes(std::string&& value) { + cids_bytes_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:pb.Replication.cids_bytes) +} +inline void Replication::add_cids_bytes(const char* value) { + GOOGLE_DCHECK(value != nullptr); + cids_bytes_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:pb.Replication.cids_bytes) +} +inline void Replication::add_cids_bytes(const void* value, size_t size) { + cids_bytes_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:pb.Replication.cids_bytes) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +Replication::cids_bytes() const { + // @@protoc_insertion_point(field_list:pb.Replication.cids_bytes) + return cids_bytes_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +Replication::mutable_cids_bytes() { + // @@protoc_insertion_point(field_mutable_list:pb.Replication.cids_bytes) + return &cids_bytes_; +} + +// repeated .pb.ServerSource servers = 3; +inline int Replication::_internal_servers_size() const { + return servers_.size(); +} +inline int Replication::servers_size() const { + return _internal_servers_size(); +} +inline void Replication::clear_servers() { + servers_.Clear(); +} +inline ::pb::ServerSource* Replication::mutable_servers(int index) { + // @@protoc_insertion_point(field_mutable:pb.Replication.servers) + return servers_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::ServerSource >* +Replication::mutable_servers() { + // @@protoc_insertion_point(field_mutable_list:pb.Replication.servers) + return &servers_; +} +inline const ::pb::ServerSource& Replication::_internal_servers(int index) const { + return servers_.Get(index); +} +inline const ::pb::ServerSource& Replication::servers(int index) const { + // @@protoc_insertion_point(field_get:pb.Replication.servers) + return _internal_servers(index); +} +inline ::pb::ServerSource* Replication::_internal_add_servers() { + return servers_.Add(); +} +inline ::pb::ServerSource* Replication::add_servers() { + // @@protoc_insertion_point(field_add:pb.Replication.servers) + return _internal_add_servers(); +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pb::ServerSource >& +Replication::servers() const { + // @@protoc_insertion_point(field_list:pb.Replication.servers) + return servers_; +} + +// int32 replication_factor = 4; +inline void Replication::clear_replication_factor() { + replication_factor_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Replication::_internal_replication_factor() const { + return replication_factor_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Replication::replication_factor() const { + // @@protoc_insertion_point(field_get:pb.Replication.replication_factor) + return _internal_replication_factor(); +} +inline void Replication::_internal_set_replication_factor(::PROTOBUF_NAMESPACE_ID::int32 value) { + + replication_factor_ = value; +} +inline void Replication::set_replication_factor(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_replication_factor(value); + // @@protoc_insertion_point(field_set:pb.Replication.replication_factor) +} + +// int32 refresh_interval_seconds = 5; +inline void Replication::clear_refresh_interval_seconds() { + refresh_interval_seconds_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Replication::_internal_refresh_interval_seconds() const { + return refresh_interval_seconds_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Replication::refresh_interval_seconds() const { + // @@protoc_insertion_point(field_get:pb.Replication.refresh_interval_seconds) + return _internal_refresh_interval_seconds(); +} +inline void Replication::_internal_set_refresh_interval_seconds(::PROTOBUF_NAMESPACE_ID::int32 value) { + + refresh_interval_seconds_ = value; +} +inline void Replication::set_refresh_interval_seconds(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_refresh_interval_seconds(value); + // @@protoc_insertion_point(field_set:pb.Replication.refresh_interval_seconds) +} + +// int32 server_down_delay_seconds = 6; +inline void Replication::clear_server_down_delay_seconds() { + server_down_delay_seconds_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Replication::_internal_server_down_delay_seconds() const { + return server_down_delay_seconds_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Replication::server_down_delay_seconds() const { + // @@protoc_insertion_point(field_get:pb.Replication.server_down_delay_seconds) + return _internal_server_down_delay_seconds(); +} +inline void Replication::_internal_set_server_down_delay_seconds(::PROTOBUF_NAMESPACE_ID::int32 value) { + + server_down_delay_seconds_ = value; +} +inline void Replication::set_server_down_delay_seconds(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_server_down_delay_seconds(value); + // @@protoc_insertion_point(field_set:pb.Replication.server_down_delay_seconds) +} + +// ------------------------------------------------------------------- + +// ServerSource + +// .pb.AddrInfo addr_info = 1; +inline bool ServerSource::_internal_has_addr_info() const { + return this != internal_default_instance() && addr_info_ != nullptr; +} +inline bool ServerSource::has_addr_info() const { + return _internal_has_addr_info(); +} +inline void ServerSource::clear_addr_info() { + if (GetArenaNoVirtual() == nullptr && addr_info_ != nullptr) { + delete addr_info_; + } + addr_info_ = nullptr; +} +inline const ::pb::AddrInfo& ServerSource::_internal_addr_info() const { + const ::pb::AddrInfo* p = addr_info_; + return p != nullptr ? *p : *reinterpret_cast( + &::pb::_AddrInfo_default_instance_); +} +inline const ::pb::AddrInfo& ServerSource::addr_info() const { + // @@protoc_insertion_point(field_get:pb.ServerSource.addr_info) + return _internal_addr_info(); +} +inline ::pb::AddrInfo* ServerSource::release_addr_info() { + // @@protoc_insertion_point(field_release:pb.ServerSource.addr_info) + + ::pb::AddrInfo* temp = addr_info_; + addr_info_ = nullptr; + return temp; +} +inline ::pb::AddrInfo* ServerSource::_internal_mutable_addr_info() { + + if (addr_info_ == nullptr) { + auto* p = CreateMaybeMessage<::pb::AddrInfo>(GetArenaNoVirtual()); + addr_info_ = p; + } + return addr_info_; +} +inline ::pb::AddrInfo* ServerSource::mutable_addr_info() { + // @@protoc_insertion_point(field_mutable:pb.ServerSource.addr_info) + return _internal_mutable_addr_info(); +} +inline void ServerSource::set_allocated_addr_info(::pb::AddrInfo* addr_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete addr_info_; + } + if (addr_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + addr_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, addr_info, submessage_arena); + } + + } else { + + } + addr_info_ = addr_info; + // @@protoc_insertion_point(field_set_allocated:pb.ServerSource.addr_info) +} + +// ------------------------------------------------------------------- + +// AddrInfo + +// bytes id_bytes = 1; +inline void AddrInfo::clear_id_bytes() { + id_bytes_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& AddrInfo::id_bytes() const { + // @@protoc_insertion_point(field_get:pb.AddrInfo.id_bytes) + return _internal_id_bytes(); +} +inline void AddrInfo::set_id_bytes(const std::string& value) { + _internal_set_id_bytes(value); + // @@protoc_insertion_point(field_set:pb.AddrInfo.id_bytes) +} +inline std::string* AddrInfo::mutable_id_bytes() { + // @@protoc_insertion_point(field_mutable:pb.AddrInfo.id_bytes) + return _internal_mutable_id_bytes(); +} +inline const std::string& AddrInfo::_internal_id_bytes() const { + return id_bytes_.GetNoArena(); +} +inline void AddrInfo::_internal_set_id_bytes(const std::string& value) { + + id_bytes_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void AddrInfo::set_id_bytes(std::string&& value) { + + id_bytes_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.AddrInfo.id_bytes) +} +inline void AddrInfo::set_id_bytes(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + id_bytes_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.AddrInfo.id_bytes) +} +inline void AddrInfo::set_id_bytes(const void* value, size_t size) { + + id_bytes_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.AddrInfo.id_bytes) +} +inline std::string* AddrInfo::_internal_mutable_id_bytes() { + + return id_bytes_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* AddrInfo::release_id_bytes() { + // @@protoc_insertion_point(field_release:pb.AddrInfo.id_bytes) + + return id_bytes_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void AddrInfo::set_allocated_id_bytes(std::string* id_bytes) { + if (id_bytes != nullptr) { + + } else { + + } + id_bytes_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), id_bytes); + // @@protoc_insertion_point(field_set_allocated:pb.AddrInfo.id_bytes) +} + +// repeated bytes addrs_bytes = 2; +inline int AddrInfo::_internal_addrs_bytes_size() const { + return addrs_bytes_.size(); +} +inline int AddrInfo::addrs_bytes_size() const { + return _internal_addrs_bytes_size(); +} +inline void AddrInfo::clear_addrs_bytes() { + addrs_bytes_.Clear(); +} +inline std::string* AddrInfo::add_addrs_bytes() { + // @@protoc_insertion_point(field_add_mutable:pb.AddrInfo.addrs_bytes) + return _internal_add_addrs_bytes(); +} +inline const std::string& AddrInfo::_internal_addrs_bytes(int index) const { + return addrs_bytes_.Get(index); +} +inline const std::string& AddrInfo::addrs_bytes(int index) const { + // @@protoc_insertion_point(field_get:pb.AddrInfo.addrs_bytes) + return _internal_addrs_bytes(index); +} +inline std::string* AddrInfo::mutable_addrs_bytes(int index) { + // @@protoc_insertion_point(field_mutable:pb.AddrInfo.addrs_bytes) + return addrs_bytes_.Mutable(index); +} +inline void AddrInfo::set_addrs_bytes(int index, const std::string& value) { + // @@protoc_insertion_point(field_set:pb.AddrInfo.addrs_bytes) + addrs_bytes_.Mutable(index)->assign(value); +} +inline void AddrInfo::set_addrs_bytes(int index, std::string&& value) { + // @@protoc_insertion_point(field_set:pb.AddrInfo.addrs_bytes) + addrs_bytes_.Mutable(index)->assign(std::move(value)); +} +inline void AddrInfo::set_addrs_bytes(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + addrs_bytes_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:pb.AddrInfo.addrs_bytes) +} +inline void AddrInfo::set_addrs_bytes(int index, const void* value, size_t size) { + addrs_bytes_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:pb.AddrInfo.addrs_bytes) +} +inline std::string* AddrInfo::_internal_add_addrs_bytes() { + return addrs_bytes_.Add(); +} +inline void AddrInfo::add_addrs_bytes(const std::string& value) { + addrs_bytes_.Add()->assign(value); + // @@protoc_insertion_point(field_add:pb.AddrInfo.addrs_bytes) +} +inline void AddrInfo::add_addrs_bytes(std::string&& value) { + addrs_bytes_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:pb.AddrInfo.addrs_bytes) +} +inline void AddrInfo::add_addrs_bytes(const char* value) { + GOOGLE_DCHECK(value != nullptr); + addrs_bytes_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:pb.AddrInfo.addrs_bytes) +} +inline void AddrInfo::add_addrs_bytes(const void* value, size_t size) { + addrs_bytes_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:pb.AddrInfo.addrs_bytes) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +AddrInfo::addrs_bytes() const { + // @@protoc_insertion_point(field_list:pb.AddrInfo.addrs_bytes) + return addrs_bytes_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +AddrInfo::mutable_addrs_bytes() { + // @@protoc_insertion_point(field_mutable_list:pb.AddrInfo.addrs_bytes) + return &addrs_bytes_; +} + +// int32 grpc_port = 3; +inline void AddrInfo::clear_grpc_port() { + grpc_port_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 AddrInfo::_internal_grpc_port() const { + return grpc_port_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 AddrInfo::grpc_port() const { + // @@protoc_insertion_point(field_get:pb.AddrInfo.grpc_port) + return _internal_grpc_port(); +} +inline void AddrInfo::_internal_set_grpc_port(::PROTOBUF_NAMESPACE_ID::int32 value) { + + grpc_port_ = value; +} +inline void AddrInfo::set_grpc_port(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_grpc_port(value); + // @@protoc_insertion_point(field_set:pb.AddrInfo.grpc_port) +} + +// ------------------------------------------------------------------- + +// Subscription + +// string topic = 1; +inline void Subscription::clear_topic() { + topic_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& Subscription::topic() const { + // @@protoc_insertion_point(field_get:pb.Subscription.topic) + return _internal_topic(); +} +inline void Subscription::set_topic(const std::string& value) { + _internal_set_topic(value); + // @@protoc_insertion_point(field_set:pb.Subscription.topic) +} +inline std::string* Subscription::mutable_topic() { + // @@protoc_insertion_point(field_mutable:pb.Subscription.topic) + return _internal_mutable_topic(); +} +inline const std::string& Subscription::_internal_topic() const { + return topic_.GetNoArena(); +} +inline void Subscription::_internal_set_topic(const std::string& value) { + + topic_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void Subscription::set_topic(std::string&& value) { + + topic_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.Subscription.topic) +} +inline void Subscription::set_topic(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + topic_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.Subscription.topic) +} +inline void Subscription::set_topic(const char* value, size_t size) { + + topic_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.Subscription.topic) +} +inline std::string* Subscription::_internal_mutable_topic() { + + return topic_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* Subscription::release_topic() { + // @@protoc_insertion_point(field_release:pb.Subscription.topic) + + return topic_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void Subscription::set_allocated_topic(std::string* topic) { + if (topic != nullptr) { + + } else { + + } + topic_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), topic); + // @@protoc_insertion_point(field_set_allocated:pb.Subscription.topic) +} + +// bytes author_id_bytes = 2; +inline void Subscription::clear_author_id_bytes() { + author_id_bytes_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& Subscription::author_id_bytes() const { + // @@protoc_insertion_point(field_get:pb.Subscription.author_id_bytes) + return _internal_author_id_bytes(); +} +inline void Subscription::set_author_id_bytes(const std::string& value) { + _internal_set_author_id_bytes(value); + // @@protoc_insertion_point(field_set:pb.Subscription.author_id_bytes) +} +inline std::string* Subscription::mutable_author_id_bytes() { + // @@protoc_insertion_point(field_mutable:pb.Subscription.author_id_bytes) + return _internal_mutable_author_id_bytes(); +} +inline const std::string& Subscription::_internal_author_id_bytes() const { + return author_id_bytes_.GetNoArena(); +} +inline void Subscription::_internal_set_author_id_bytes(const std::string& value) { + + author_id_bytes_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void Subscription::set_author_id_bytes(std::string&& value) { + + author_id_bytes_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.Subscription.author_id_bytes) +} +inline void Subscription::set_author_id_bytes(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + author_id_bytes_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.Subscription.author_id_bytes) +} +inline void Subscription::set_author_id_bytes(const void* value, size_t size) { + + author_id_bytes_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.Subscription.author_id_bytes) +} +inline std::string* Subscription::_internal_mutable_author_id_bytes() { + + return author_id_bytes_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* Subscription::release_author_id_bytes() { + // @@protoc_insertion_point(field_release:pb.Subscription.author_id_bytes) + + return author_id_bytes_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void Subscription::set_allocated_author_id_bytes(std::string* author_id_bytes) { + if (author_id_bytes != nullptr) { + + } else { + + } + author_id_bytes_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), author_id_bytes); + // @@protoc_insertion_point(field_set_allocated:pb.Subscription.author_id_bytes) +} + +// bool remove = 3; +inline void Subscription::clear_remove() { + remove_ = false; +} +inline bool Subscription::_internal_remove() const { + return remove_; +} +inline bool Subscription::remove() const { + // @@protoc_insertion_point(field_get:pb.Subscription.remove) + return _internal_remove(); +} +inline void Subscription::_internal_set_remove(bool value) { + + remove_ = value; +} +inline void Subscription::set_remove(bool value) { + _internal_set_remove(value); + // @@protoc_insertion_point(field_set:pb.Subscription.remove) +} + +// ------------------------------------------------------------------- + +// ReplicationStatus + +// bool ok = 1; +inline void ReplicationStatus::clear_ok() { + ok_ = false; +} +inline bool ReplicationStatus::_internal_ok() const { + return ok_; +} +inline bool ReplicationStatus::ok() const { + // @@protoc_insertion_point(field_get:pb.ReplicationStatus.ok) + return _internal_ok(); +} +inline void ReplicationStatus::_internal_set_ok(bool value) { + + ok_ = value; +} +inline void ReplicationStatus::set_ok(bool value) { + _internal_set_ok(value); + // @@protoc_insertion_point(field_set:pb.ReplicationStatus.ok) +} + +// bool is_active = 2; +inline void ReplicationStatus::clear_is_active() { + is_active_ = false; +} +inline bool ReplicationStatus::_internal_is_active() const { + return is_active_; +} +inline bool ReplicationStatus::is_active() const { + // @@protoc_insertion_point(field_get:pb.ReplicationStatus.is_active) + return _internal_is_active(); +} +inline void ReplicationStatus::_internal_set_is_active(bool value) { + + is_active_ = value; +} +inline void ReplicationStatus::set_is_active(bool value) { + _internal_set_is_active(value); + // @@protoc_insertion_point(field_set:pb.ReplicationStatus.is_active) +} + +// int64 current_version = 3; +inline void ReplicationStatus::clear_current_version() { + current_version_ = PROTOBUF_LONGLONG(0); +} +inline ::PROTOBUF_NAMESPACE_ID::int64 ReplicationStatus::_internal_current_version() const { + return current_version_; +} +inline ::PROTOBUF_NAMESPACE_ID::int64 ReplicationStatus::current_version() const { + // @@protoc_insertion_point(field_get:pb.ReplicationStatus.current_version) + return _internal_current_version(); +} +inline void ReplicationStatus::_internal_set_current_version(::PROTOBUF_NAMESPACE_ID::int64 value) { + + current_version_ = value; +} +inline void ReplicationStatus::set_current_version(::PROTOBUF_NAMESPACE_ID::int64 value) { + _internal_set_current_version(value); + // @@protoc_insertion_point(field_set:pb.ReplicationStatus.current_version) +} + +// int64 target_version = 4; +inline void ReplicationStatus::clear_target_version() { + target_version_ = PROTOBUF_LONGLONG(0); +} +inline ::PROTOBUF_NAMESPACE_ID::int64 ReplicationStatus::_internal_target_version() const { + return target_version_; +} +inline ::PROTOBUF_NAMESPACE_ID::int64 ReplicationStatus::target_version() const { + // @@protoc_insertion_point(field_get:pb.ReplicationStatus.target_version) + return _internal_target_version(); +} +inline void ReplicationStatus::_internal_set_target_version(::PROTOBUF_NAMESPACE_ID::int64 value) { + + target_version_ = value; +} +inline void ReplicationStatus::set_target_version(::PROTOBUF_NAMESPACE_ID::int64 value) { + _internal_set_target_version(value); + // @@protoc_insertion_point(field_set:pb.ReplicationStatus.target_version) +} + +// ------------------------------------------------------------------- + +// SubscriptionUpdate + +// int64 version = 1; +inline void SubscriptionUpdate::clear_version() { + version_ = PROTOBUF_LONGLONG(0); +} +inline ::PROTOBUF_NAMESPACE_ID::int64 SubscriptionUpdate::_internal_version() const { + return version_; +} +inline ::PROTOBUF_NAMESPACE_ID::int64 SubscriptionUpdate::version() const { + // @@protoc_insertion_point(field_get:pb.SubscriptionUpdate.version) + return _internal_version(); +} +inline void SubscriptionUpdate::_internal_set_version(::PROTOBUF_NAMESPACE_ID::int64 value) { + + version_ = value; +} +inline void SubscriptionUpdate::set_version(::PROTOBUF_NAMESPACE_ID::int64 value) { + _internal_set_version(value); + // @@protoc_insertion_point(field_set:pb.SubscriptionUpdate.version) +} + +// bytes replication_bytes = 2; +inline void SubscriptionUpdate::clear_replication_bytes() { + replication_bytes_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& SubscriptionUpdate::replication_bytes() const { + // @@protoc_insertion_point(field_get:pb.SubscriptionUpdate.replication_bytes) + return _internal_replication_bytes(); +} +inline void SubscriptionUpdate::set_replication_bytes(const std::string& value) { + _internal_set_replication_bytes(value); + // @@protoc_insertion_point(field_set:pb.SubscriptionUpdate.replication_bytes) +} +inline std::string* SubscriptionUpdate::mutable_replication_bytes() { + // @@protoc_insertion_point(field_mutable:pb.SubscriptionUpdate.replication_bytes) + return _internal_mutable_replication_bytes(); +} +inline const std::string& SubscriptionUpdate::_internal_replication_bytes() const { + return replication_bytes_.GetNoArena(); +} +inline void SubscriptionUpdate::_internal_set_replication_bytes(const std::string& value) { + + replication_bytes_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void SubscriptionUpdate::set_replication_bytes(std::string&& value) { + + replication_bytes_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.SubscriptionUpdate.replication_bytes) +} +inline void SubscriptionUpdate::set_replication_bytes(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + replication_bytes_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.SubscriptionUpdate.replication_bytes) +} +inline void SubscriptionUpdate::set_replication_bytes(const void* value, size_t size) { + + replication_bytes_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.SubscriptionUpdate.replication_bytes) +} +inline std::string* SubscriptionUpdate::_internal_mutable_replication_bytes() { + + return replication_bytes_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* SubscriptionUpdate::release_replication_bytes() { + // @@protoc_insertion_point(field_release:pb.SubscriptionUpdate.replication_bytes) + + return replication_bytes_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void SubscriptionUpdate::set_allocated_replication_bytes(std::string* replication_bytes) { + if (replication_bytes != nullptr) { + + } else { + + } + replication_bytes_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), replication_bytes); + // @@protoc_insertion_point(field_set_allocated:pb.SubscriptionUpdate.replication_bytes) +} + +// bytes signature = 3; +inline void SubscriptionUpdate::clear_signature() { + signature_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& SubscriptionUpdate::signature() const { + // @@protoc_insertion_point(field_get:pb.SubscriptionUpdate.signature) + return _internal_signature(); +} +inline void SubscriptionUpdate::set_signature(const std::string& value) { + _internal_set_signature(value); + // @@protoc_insertion_point(field_set:pb.SubscriptionUpdate.signature) +} +inline std::string* SubscriptionUpdate::mutable_signature() { + // @@protoc_insertion_point(field_mutable:pb.SubscriptionUpdate.signature) + return _internal_mutable_signature(); +} +inline const std::string& SubscriptionUpdate::_internal_signature() const { + return signature_.GetNoArena(); +} +inline void SubscriptionUpdate::_internal_set_signature(const std::string& value) { + + signature_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void SubscriptionUpdate::set_signature(std::string&& value) { + + signature_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.SubscriptionUpdate.signature) +} +inline void SubscriptionUpdate::set_signature(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + signature_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.SubscriptionUpdate.signature) +} +inline void SubscriptionUpdate::set_signature(const void* value, size_t size) { + + signature_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.SubscriptionUpdate.signature) +} +inline std::string* SubscriptionUpdate::_internal_mutable_signature() { + + return signature_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* SubscriptionUpdate::release_signature() { + // @@protoc_insertion_point(field_release:pb.SubscriptionUpdate.signature) + + return signature_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void SubscriptionUpdate::set_allocated_signature(std::string* signature) { + if (signature != nullptr) { + + } else { + + } + signature_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), signature); + // @@protoc_insertion_point(field_set_allocated:pb.SubscriptionUpdate.signature) +} + +// ------------------------------------------------------------------- + +// SignedSubscription + +// .pb.Subscription sub_part = 1; +inline bool SignedSubscription::_internal_has_sub_part() const { + return this != internal_default_instance() && sub_part_ != nullptr; +} +inline bool SignedSubscription::has_sub_part() const { + return _internal_has_sub_part(); +} +inline void SignedSubscription::clear_sub_part() { + if (GetArenaNoVirtual() == nullptr && sub_part_ != nullptr) { + delete sub_part_; + } + sub_part_ = nullptr; +} +inline const ::pb::Subscription& SignedSubscription::_internal_sub_part() const { + const ::pb::Subscription* p = sub_part_; + return p != nullptr ? *p : *reinterpret_cast( + &::pb::_Subscription_default_instance_); +} +inline const ::pb::Subscription& SignedSubscription::sub_part() const { + // @@protoc_insertion_point(field_get:pb.SignedSubscription.sub_part) + return _internal_sub_part(); +} +inline ::pb::Subscription* SignedSubscription::release_sub_part() { + // @@protoc_insertion_point(field_release:pb.SignedSubscription.sub_part) + + ::pb::Subscription* temp = sub_part_; + sub_part_ = nullptr; + return temp; +} +inline ::pb::Subscription* SignedSubscription::_internal_mutable_sub_part() { + + if (sub_part_ == nullptr) { + auto* p = CreateMaybeMessage<::pb::Subscription>(GetArenaNoVirtual()); + sub_part_ = p; + } + return sub_part_; +} +inline ::pb::Subscription* SignedSubscription::mutable_sub_part() { + // @@protoc_insertion_point(field_mutable:pb.SignedSubscription.sub_part) + return _internal_mutable_sub_part(); +} +inline void SignedSubscription::set_allocated_sub_part(::pb::Subscription* sub_part) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete sub_part_; + } + if (sub_part) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + sub_part = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, sub_part, submessage_arena); + } + + } else { + + } + sub_part_ = sub_part; + // @@protoc_insertion_point(field_set_allocated:pb.SignedSubscription.sub_part) +} + +// .pb.SubscriptionUpdate update_part = 2; +inline bool SignedSubscription::_internal_has_update_part() const { + return this != internal_default_instance() && update_part_ != nullptr; +} +inline bool SignedSubscription::has_update_part() const { + return _internal_has_update_part(); +} +inline void SignedSubscription::clear_update_part() { + if (GetArenaNoVirtual() == nullptr && update_part_ != nullptr) { + delete update_part_; + } + update_part_ = nullptr; +} +inline const ::pb::SubscriptionUpdate& SignedSubscription::_internal_update_part() const { + const ::pb::SubscriptionUpdate* p = update_part_; + return p != nullptr ? *p : *reinterpret_cast( + &::pb::_SubscriptionUpdate_default_instance_); +} +inline const ::pb::SubscriptionUpdate& SignedSubscription::update_part() const { + // @@protoc_insertion_point(field_get:pb.SignedSubscription.update_part) + return _internal_update_part(); +} +inline ::pb::SubscriptionUpdate* SignedSubscription::release_update_part() { + // @@protoc_insertion_point(field_release:pb.SignedSubscription.update_part) + + ::pb::SubscriptionUpdate* temp = update_part_; + update_part_ = nullptr; + return temp; +} +inline ::pb::SubscriptionUpdate* SignedSubscription::_internal_mutable_update_part() { + + if (update_part_ == nullptr) { + auto* p = CreateMaybeMessage<::pb::SubscriptionUpdate>(GetArenaNoVirtual()); + update_part_ = p; + } + return update_part_; +} +inline ::pb::SubscriptionUpdate* SignedSubscription::mutable_update_part() { + // @@protoc_insertion_point(field_mutable:pb.SignedSubscription.update_part) + return _internal_mutable_update_part(); +} +inline void SignedSubscription::set_allocated_update_part(::pb::SubscriptionUpdate* update_part) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete update_part_; + } + if (update_part) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + update_part = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, update_part, submessage_arena); + } + + } else { + + } + update_part_ = update_part; + // @@protoc_insertion_point(field_set_allocated:pb.SignedSubscription.update_part) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace pb + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_replication_2eproto diff --git a/cpp/status.grpc.pb.cc b/cpp/status.grpc.pb.cc new file mode 100644 index 0000000..f7a00c8 --- /dev/null +++ b/cpp/status.grpc.pb.cc @@ -0,0 +1,128 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: status.proto + +#include "status.pb.h" +#include "status.grpc.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace pb { + +static const char* StatusAPI_method_names[] = { + "/pb.StatusAPI/Version", + "/pb.StatusAPI/Status", +}; + +std::unique_ptr< StatusAPI::Stub> StatusAPI::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< StatusAPI::Stub> stub(new StatusAPI::Stub(channel)); + return stub; +} + +StatusAPI::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel) + : channel_(channel), rpcmethod_Version_(StatusAPI_method_names[0], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_Status_(StatusAPI_method_names[1], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::Status StatusAPI::Stub::Version(::grpc::ClientContext* context, const ::pb::Empty& request, ::pb::VersionResponse* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_Version_, context, request, response); +} + +void StatusAPI::Stub::experimental_async::Version(::grpc::ClientContext* context, const ::pb::Empty* request, ::pb::VersionResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_Version_, context, request, response, std::move(f)); +} + +void StatusAPI::Stub::experimental_async::Version(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::VersionResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_Version_, context, request, response, std::move(f)); +} + +void StatusAPI::Stub::experimental_async::Version(::grpc::ClientContext* context, const ::pb::Empty* request, ::pb::VersionResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_Version_, context, request, response, reactor); +} + +void StatusAPI::Stub::experimental_async::Version(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::VersionResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_Version_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::pb::VersionResponse>* StatusAPI::Stub::AsyncVersionRaw(::grpc::ClientContext* context, const ::pb::Empty& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::VersionResponse>::Create(channel_.get(), cq, rpcmethod_Version_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::pb::VersionResponse>* StatusAPI::Stub::PrepareAsyncVersionRaw(::grpc::ClientContext* context, const ::pb::Empty& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::VersionResponse>::Create(channel_.get(), cq, rpcmethod_Version_, context, request, false); +} + +::grpc::Status StatusAPI::Stub::Status(::grpc::ClientContext* context, const ::pb::Empty& request, ::pb::StatusResponse* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_Status_, context, request, response); +} + +void StatusAPI::Stub::experimental_async::Status(::grpc::ClientContext* context, const ::pb::Empty* request, ::pb::StatusResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_Status_, context, request, response, std::move(f)); +} + +void StatusAPI::Stub::experimental_async::Status(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::StatusResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_Status_, context, request, response, std::move(f)); +} + +void StatusAPI::Stub::experimental_async::Status(::grpc::ClientContext* context, const ::pb::Empty* request, ::pb::StatusResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_Status_, context, request, response, reactor); +} + +void StatusAPI::Stub::experimental_async::Status(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::StatusResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_Status_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::pb::StatusResponse>* StatusAPI::Stub::AsyncStatusRaw(::grpc::ClientContext* context, const ::pb::Empty& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::StatusResponse>::Create(channel_.get(), cq, rpcmethod_Status_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::pb::StatusResponse>* StatusAPI::Stub::PrepareAsyncStatusRaw(::grpc::ClientContext* context, const ::pb::Empty& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::pb::StatusResponse>::Create(channel_.get(), cq, rpcmethod_Status_, context, request, false); +} + +StatusAPI::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + StatusAPI_method_names[0], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< StatusAPI::Service, ::pb::Empty, ::pb::VersionResponse>( + std::mem_fn(&StatusAPI::Service::Version), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + StatusAPI_method_names[1], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< StatusAPI::Service, ::pb::Empty, ::pb::StatusResponse>( + std::mem_fn(&StatusAPI::Service::Status), this))); +} + +StatusAPI::Service::~Service() { +} + +::grpc::Status StatusAPI::Service::Version(::grpc::ServerContext* context, const ::pb::Empty* request, ::pb::VersionResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status StatusAPI::Service::Status(::grpc::ServerContext* context, const ::pb::Empty* request, ::pb::StatusResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +} // namespace pb + diff --git a/cpp/status.grpc.pb.h b/cpp/status.grpc.pb.h new file mode 100644 index 0000000..a1496e0 --- /dev/null +++ b/cpp/status.grpc.pb.h @@ -0,0 +1,510 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: status.proto +#ifndef GRPC_status_2eproto__INCLUDED +#define GRPC_status_2eproto__INCLUDED + +#include "status.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace pb { + +// provides utilities to retrieve api status information from +class StatusAPI final { + public: + static constexpr char const* service_full_name() { + return "pb.StatusAPI"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + // Version is used to retrieve api version information + virtual ::grpc::Status Version(::grpc::ClientContext* context, const ::pb::Empty& request, ::pb::VersionResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::VersionResponse>> AsyncVersion(::grpc::ClientContext* context, const ::pb::Empty& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::VersionResponse>>(AsyncVersionRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::VersionResponse>> PrepareAsyncVersion(::grpc::ClientContext* context, const ::pb::Empty& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::VersionResponse>>(PrepareAsyncVersionRaw(context, request, cq)); + } + // Status is used to retrieve api status information. + virtual ::grpc::Status Status(::grpc::ClientContext* context, const ::pb::Empty& request, ::pb::StatusResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::StatusResponse>> AsyncStatus(::grpc::ClientContext* context, const ::pb::Empty& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::StatusResponse>>(AsyncStatusRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::StatusResponse>> PrepareAsyncStatus(::grpc::ClientContext* context, const ::pb::Empty& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::pb::StatusResponse>>(PrepareAsyncStatusRaw(context, request, cq)); + } + class experimental_async_interface { + public: + virtual ~experimental_async_interface() {} + // Version is used to retrieve api version information + virtual void Version(::grpc::ClientContext* context, const ::pb::Empty* request, ::pb::VersionResponse* response, std::function) = 0; + virtual void Version(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::VersionResponse* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void Version(::grpc::ClientContext* context, const ::pb::Empty* request, ::pb::VersionResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void Version(::grpc::ClientContext* context, const ::pb::Empty* request, ::pb::VersionResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void Version(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::VersionResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void Version(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::VersionResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + // Status is used to retrieve api status information. + virtual void Status(::grpc::ClientContext* context, const ::pb::Empty* request, ::pb::StatusResponse* response, std::function) = 0; + virtual void Status(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::StatusResponse* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void Status(::grpc::ClientContext* context, const ::pb::Empty* request, ::pb::StatusResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void Status(::grpc::ClientContext* context, const ::pb::Empty* request, ::pb::StatusResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void Status(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::StatusResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void Status(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::StatusResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + }; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + typedef class experimental_async_interface async_interface; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + async_interface* async() { return experimental_async(); } + #endif + virtual class experimental_async_interface* experimental_async() { return nullptr; } + private: + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::VersionResponse>* AsyncVersionRaw(::grpc::ClientContext* context, const ::pb::Empty& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::VersionResponse>* PrepareAsyncVersionRaw(::grpc::ClientContext* context, const ::pb::Empty& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::StatusResponse>* AsyncStatusRaw(::grpc::ClientContext* context, const ::pb::Empty& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::pb::StatusResponse>* PrepareAsyncStatusRaw(::grpc::ClientContext* context, const ::pb::Empty& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel); + ::grpc::Status Version(::grpc::ClientContext* context, const ::pb::Empty& request, ::pb::VersionResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::VersionResponse>> AsyncVersion(::grpc::ClientContext* context, const ::pb::Empty& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::VersionResponse>>(AsyncVersionRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::VersionResponse>> PrepareAsyncVersion(::grpc::ClientContext* context, const ::pb::Empty& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::VersionResponse>>(PrepareAsyncVersionRaw(context, request, cq)); + } + ::grpc::Status Status(::grpc::ClientContext* context, const ::pb::Empty& request, ::pb::StatusResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::StatusResponse>> AsyncStatus(::grpc::ClientContext* context, const ::pb::Empty& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::StatusResponse>>(AsyncStatusRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::StatusResponse>> PrepareAsyncStatus(::grpc::ClientContext* context, const ::pb::Empty& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::pb::StatusResponse>>(PrepareAsyncStatusRaw(context, request, cq)); + } + class experimental_async final : + public StubInterface::experimental_async_interface { + public: + void Version(::grpc::ClientContext* context, const ::pb::Empty* request, ::pb::VersionResponse* response, std::function) override; + void Version(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::VersionResponse* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void Version(::grpc::ClientContext* context, const ::pb::Empty* request, ::pb::VersionResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void Version(::grpc::ClientContext* context, const ::pb::Empty* request, ::pb::VersionResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void Version(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::VersionResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void Version(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::VersionResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + void Status(::grpc::ClientContext* context, const ::pb::Empty* request, ::pb::StatusResponse* response, std::function) override; + void Status(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::StatusResponse* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void Status(::grpc::ClientContext* context, const ::pb::Empty* request, ::pb::StatusResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void Status(::grpc::ClientContext* context, const ::pb::Empty* request, ::pb::StatusResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void Status(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::StatusResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void Status(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::pb::StatusResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + private: + friend class Stub; + explicit experimental_async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class experimental_async_interface* experimental_async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class experimental_async async_stub_{this}; + ::grpc::ClientAsyncResponseReader< ::pb::VersionResponse>* AsyncVersionRaw(::grpc::ClientContext* context, const ::pb::Empty& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::pb::VersionResponse>* PrepareAsyncVersionRaw(::grpc::ClientContext* context, const ::pb::Empty& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::pb::StatusResponse>* AsyncStatusRaw(::grpc::ClientContext* context, const ::pb::Empty& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::pb::StatusResponse>* PrepareAsyncStatusRaw(::grpc::ClientContext* context, const ::pb::Empty& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_Version_; + const ::grpc::internal::RpcMethod rpcmethod_Status_; + }; + static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + + class Service : public ::grpc::Service { + public: + Service(); + virtual ~Service(); + // Version is used to retrieve api version information + virtual ::grpc::Status Version(::grpc::ServerContext* context, const ::pb::Empty* request, ::pb::VersionResponse* response); + // Status is used to retrieve api status information. + virtual ::grpc::Status Status(::grpc::ServerContext* context, const ::pb::Empty* request, ::pb::StatusResponse* response); + }; + template + class WithAsyncMethod_Version : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_Version() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_Version() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Version(::grpc::ServerContext* /*context*/, const ::pb::Empty* /*request*/, ::pb::VersionResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestVersion(::grpc::ServerContext* context, ::pb::Empty* request, ::grpc::ServerAsyncResponseWriter< ::pb::VersionResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_Status : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_Status() { + ::grpc::Service::MarkMethodAsync(1); + } + ~WithAsyncMethod_Status() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Status(::grpc::ServerContext* /*context*/, const ::pb::Empty* /*request*/, ::pb::StatusResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestStatus(::grpc::ServerContext* context, ::pb::Empty* request, ::grpc::ServerAsyncResponseWriter< ::pb::StatusResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); + } + }; + typedef WithAsyncMethod_Version > AsyncService; + template + class ExperimentalWithCallbackMethod_Version : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_Version() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(0, + new ::grpc_impl::internal::CallbackUnaryHandler< ::pb::Empty, ::pb::VersionResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::pb::Empty* request, ::pb::VersionResponse* response) { return this->Version(context, request, response); }));} + void SetMessageAllocatorFor_Version( + ::grpc::experimental::MessageAllocator< ::pb::Empty, ::pb::VersionResponse>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(0); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::pb::Empty, ::pb::VersionResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_Version() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Version(::grpc::ServerContext* /*context*/, const ::pb::Empty* /*request*/, ::pb::VersionResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* Version( + ::grpc::CallbackServerContext* /*context*/, const ::pb::Empty* /*request*/, ::pb::VersionResponse* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* Version( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::pb::Empty* /*request*/, ::pb::VersionResponse* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_Status : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_Status() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(1, + new ::grpc_impl::internal::CallbackUnaryHandler< ::pb::Empty, ::pb::StatusResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::pb::Empty* request, ::pb::StatusResponse* response) { return this->Status(context, request, response); }));} + void SetMessageAllocatorFor_Status( + ::grpc::experimental::MessageAllocator< ::pb::Empty, ::pb::StatusResponse>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(1); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::pb::Empty, ::pb::StatusResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_Status() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Status(::grpc::ServerContext* /*context*/, const ::pb::Empty* /*request*/, ::pb::StatusResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* Status( + ::grpc::CallbackServerContext* /*context*/, const ::pb::Empty* /*request*/, ::pb::StatusResponse* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* Status( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::pb::Empty* /*request*/, ::pb::StatusResponse* /*response*/) + #endif + { return nullptr; } + }; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + typedef ExperimentalWithCallbackMethod_Version > CallbackService; + #endif + + typedef ExperimentalWithCallbackMethod_Version > ExperimentalCallbackService; + template + class WithGenericMethod_Version : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_Version() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_Version() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Version(::grpc::ServerContext* /*context*/, const ::pb::Empty* /*request*/, ::pb::VersionResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_Status : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_Status() { + ::grpc::Service::MarkMethodGeneric(1); + } + ~WithGenericMethod_Status() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Status(::grpc::ServerContext* /*context*/, const ::pb::Empty* /*request*/, ::pb::StatusResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_Version : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_Version() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_Version() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Version(::grpc::ServerContext* /*context*/, const ::pb::Empty* /*request*/, ::pb::VersionResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestVersion(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_Status : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_Status() { + ::grpc::Service::MarkMethodRaw(1); + } + ~WithRawMethod_Status() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Status(::grpc::ServerContext* /*context*/, const ::pb::Empty* /*request*/, ::pb::StatusResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestStatus(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class ExperimentalWithRawCallbackMethod_Version : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_Version() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(0, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Version(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_Version() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Version(::grpc::ServerContext* /*context*/, const ::pb::Empty* /*request*/, ::pb::VersionResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* Version( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* Version( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_Status : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_Status() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(1, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Status(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_Status() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Status(::grpc::ServerContext* /*context*/, const ::pb::Empty* /*request*/, ::pb::StatusResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* Status( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* Status( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class WithStreamedUnaryMethod_Version : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_Version() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::StreamedUnaryHandler< ::pb::Empty, ::pb::VersionResponse>(std::bind(&WithStreamedUnaryMethod_Version::StreamedVersion, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_Version() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status Version(::grpc::ServerContext* /*context*/, const ::pb::Empty* /*request*/, ::pb::VersionResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedVersion(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::pb::Empty,::pb::VersionResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_Status : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_Status() { + ::grpc::Service::MarkMethodStreamed(1, + new ::grpc::internal::StreamedUnaryHandler< ::pb::Empty, ::pb::StatusResponse>(std::bind(&WithStreamedUnaryMethod_Status::StreamedStatus, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_Status() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status Status(::grpc::ServerContext* /*context*/, const ::pb::Empty* /*request*/, ::pb::StatusResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedStatus(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::pb::Empty,::pb::StatusResponse>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_Version > StreamedUnaryService; + typedef Service SplitStreamedService; + typedef WithStreamedUnaryMethod_Version > StreamedService; +}; + +} // namespace pb + + +#endif // GRPC_status_2eproto__INCLUDED diff --git a/cpp/status.pb.cc b/cpp/status.pb.cc new file mode 100644 index 0000000..95ba69a --- /dev/null +++ b/cpp/status.pb.cc @@ -0,0 +1,568 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: status.proto + +#include "status.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include +namespace pb { +class VersionResponseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _VersionResponse_default_instance_; +class StatusResponseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _StatusResponse_default_instance_; +} // namespace pb +static void InitDefaultsscc_info_StatusResponse_status_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_StatusResponse_default_instance_; + new (ptr) ::pb::StatusResponse(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::StatusResponse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_StatusResponse_status_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_StatusResponse_status_2eproto}, {}}; + +static void InitDefaultsscc_info_VersionResponse_status_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_VersionResponse_default_instance_; + new (ptr) ::pb::VersionResponse(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::VersionResponse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_VersionResponse_status_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_VersionResponse_status_2eproto}, {}}; + +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_status_2eproto[2]; +static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_status_2eproto[1]; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_status_2eproto = nullptr; + +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_status_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::VersionResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::VersionResponse, version_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::StatusResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::StatusResponse, host_), + PROTOBUF_FIELD_OFFSET(::pb::StatusResponse, status_), +}; +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(::pb::VersionResponse)}, + { 6, -1, sizeof(::pb::StatusResponse)}, +}; + +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&::pb::_VersionResponse_default_instance_), + reinterpret_cast(&::pb::_StatusResponse_default_instance_), +}; + +const char descriptor_table_protodef_status_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\014status.proto\022\002pb\032\nutil.proto\"\"\n\017Versio" + "nResponse\022\017\n\007version\030\001 \001(\t\"=\n\016StatusResp" + "onse\022\014\n\004host\030\001 \001(\t\022\035\n\006status\030\002 \001(\0162\r.pb." + "APISTATUS*I\n\tAPISTATUS\022\n\n\006ONLINE\020\000\022\013\n\007PU" + "RGING\020\001\022\030\n\024DEGRADED_PERFORMANCE\020\002\022\t\n\005ERR" + "OR\020\0032c\n\tStatusAPI\022+\n\007Version\022\t.pb.Empty\032" + "\023.pb.VersionResponse\"\000\022)\n\006Status\022\t.pb.Em" + "pty\032\022.pb.StatusResponse\"\000b\006proto3" + ; +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_status_2eproto_deps[1] = { + &::descriptor_table_util_2eproto, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_status_2eproto_sccs[2] = { + &scc_info_StatusResponse_status_2eproto.base, + &scc_info_VersionResponse_status_2eproto.base, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_status_2eproto_once; +static bool descriptor_table_status_2eproto_initialized = false; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_status_2eproto = { + &descriptor_table_status_2eproto_initialized, descriptor_table_protodef_status_2eproto, "status.proto", 313, + &descriptor_table_status_2eproto_once, descriptor_table_status_2eproto_sccs, descriptor_table_status_2eproto_deps, 2, 1, + schemas, file_default_instances, TableStruct_status_2eproto::offsets, + file_level_metadata_status_2eproto, 2, file_level_enum_descriptors_status_2eproto, file_level_service_descriptors_status_2eproto, +}; + +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_status_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_status_2eproto), true); +namespace pb { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* APISTATUS_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_status_2eproto); + return file_level_enum_descriptors_status_2eproto[0]; +} +bool APISTATUS_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + + +// =================================================================== + +void VersionResponse::InitAsDefaultInstance() { +} +class VersionResponse::_Internal { + public: +}; + +VersionResponse::VersionResponse() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.VersionResponse) +} +VersionResponse::VersionResponse(const VersionResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_version().empty()) { + version_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.version_); + } + // @@protoc_insertion_point(copy_constructor:pb.VersionResponse) +} + +void VersionResponse::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_VersionResponse_status_2eproto.base); + version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +VersionResponse::~VersionResponse() { + // @@protoc_insertion_point(destructor:pb.VersionResponse) + SharedDtor(); +} + +void VersionResponse::SharedDtor() { + version_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void VersionResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const VersionResponse& VersionResponse::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_VersionResponse_status_2eproto.base); + return *internal_default_instance(); +} + + +void VersionResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.VersionResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + version_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + _internal_metadata_.Clear(); +} + +const char* VersionResponse::_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 version = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_version(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.VersionResponse.version")); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* VersionResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.VersionResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string version = 1; + if (this->version().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_version().data(), static_cast(this->_internal_version().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.VersionResponse.version"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_version(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.VersionResponse) + return target; +} + +size_t VersionResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.VersionResponse) + 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 version = 1; + if (this->version().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_version()); + } + + 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 VersionResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.VersionResponse) + GOOGLE_DCHECK_NE(&from, this); + const VersionResponse* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.VersionResponse) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.VersionResponse) + MergeFrom(*source); + } +} + +void VersionResponse::MergeFrom(const VersionResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.VersionResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.version().size() > 0) { + + version_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.version_); + } +} + +void VersionResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.VersionResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void VersionResponse::CopyFrom(const VersionResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.VersionResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool VersionResponse::IsInitialized() const { + return true; +} + +void VersionResponse::InternalSwap(VersionResponse* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + version_.Swap(&other->version_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} + +::PROTOBUF_NAMESPACE_ID::Metadata VersionResponse::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void StatusResponse::InitAsDefaultInstance() { +} +class StatusResponse::_Internal { + public: +}; + +StatusResponse::StatusResponse() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.StatusResponse) +} +StatusResponse::StatusResponse(const StatusResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + host_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_host().empty()) { + host_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.host_); + } + status_ = from.status_; + // @@protoc_insertion_point(copy_constructor:pb.StatusResponse) +} + +void StatusResponse::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_StatusResponse_status_2eproto.base); + host_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + status_ = 0; +} + +StatusResponse::~StatusResponse() { + // @@protoc_insertion_point(destructor:pb.StatusResponse) + SharedDtor(); +} + +void StatusResponse::SharedDtor() { + host_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void StatusResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const StatusResponse& StatusResponse::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_StatusResponse_status_2eproto.base); + return *internal_default_instance(); +} + + +void StatusResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.StatusResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + host_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + status_ = 0; + _internal_metadata_.Clear(); +} + +const char* StatusResponse::_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 host = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_host(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.StatusResponse.host")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .pb.APISTATUS status = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + _internal_set_status(static_cast<::pb::APISTATUS>(val)); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* StatusResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.StatusResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string host = 1; + if (this->host().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_host().data(), static_cast(this->_internal_host().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.StatusResponse.host"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_host(), target); + } + + // .pb.APISTATUS status = 2; + if (this->status() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 2, this->_internal_status(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.StatusResponse) + return target; +} + +size_t StatusResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.StatusResponse) + 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 host = 1; + if (this->host().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_host()); + } + + // .pb.APISTATUS status = 2; + if (this->status() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_status()); + } + + 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 StatusResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.StatusResponse) + GOOGLE_DCHECK_NE(&from, this); + const StatusResponse* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.StatusResponse) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.StatusResponse) + MergeFrom(*source); + } +} + +void StatusResponse::MergeFrom(const StatusResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.StatusResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.host().size() > 0) { + + host_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.host_); + } + if (from.status() != 0) { + _internal_set_status(from._internal_status()); + } +} + +void StatusResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.StatusResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void StatusResponse::CopyFrom(const StatusResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.StatusResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool StatusResponse::IsInitialized() const { + return true; +} + +void StatusResponse::InternalSwap(StatusResponse* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + host_.Swap(&other->host_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(status_, other->status_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata StatusResponse::GetMetadata() const { + return GetMetadataStatic(); +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace pb +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::pb::VersionResponse* Arena::CreateMaybeMessage< ::pb::VersionResponse >(Arena* arena) { + return Arena::CreateInternal< ::pb::VersionResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::StatusResponse* Arena::CreateMaybeMessage< ::pb::StatusResponse >(Arena* arena) { + return Arena::CreateInternal< ::pb::StatusResponse >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/cpp/status.pb.h b/cpp/status.pb.h new file mode 100644 index 0000000..0a65524 --- /dev/null +++ b/cpp/status.pb.h @@ -0,0 +1,559 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: status.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_status_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_status_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3011000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3011002 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include "util.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_status_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_status_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[2] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_status_2eproto; +namespace pb { +class StatusResponse; +class StatusResponseDefaultTypeInternal; +extern StatusResponseDefaultTypeInternal _StatusResponse_default_instance_; +class VersionResponse; +class VersionResponseDefaultTypeInternal; +extern VersionResponseDefaultTypeInternal _VersionResponse_default_instance_; +} // namespace pb +PROTOBUF_NAMESPACE_OPEN +template<> ::pb::StatusResponse* Arena::CreateMaybeMessage<::pb::StatusResponse>(Arena*); +template<> ::pb::VersionResponse* Arena::CreateMaybeMessage<::pb::VersionResponse>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace pb { + +enum APISTATUS : int { + ONLINE = 0, + PURGING = 1, + DEGRADED_PERFORMANCE = 2, + ERROR = 3, + APISTATUS_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + APISTATUS_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() +}; +bool APISTATUS_IsValid(int value); +constexpr APISTATUS APISTATUS_MIN = ONLINE; +constexpr APISTATUS APISTATUS_MAX = ERROR; +constexpr int APISTATUS_ARRAYSIZE = APISTATUS_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* APISTATUS_descriptor(); +template +inline const std::string& APISTATUS_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function APISTATUS_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + APISTATUS_descriptor(), enum_t_value); +} +inline bool APISTATUS_Parse( + const std::string& name, APISTATUS* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + APISTATUS_descriptor(), name, value); +} +// =================================================================== + +class VersionResponse : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.VersionResponse) */ { + public: + VersionResponse(); + virtual ~VersionResponse(); + + VersionResponse(const VersionResponse& from); + VersionResponse(VersionResponse&& from) noexcept + : VersionResponse() { + *this = ::std::move(from); + } + + inline VersionResponse& operator=(const VersionResponse& from) { + CopyFrom(from); + return *this; + } + inline VersionResponse& operator=(VersionResponse&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 VersionResponse& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const VersionResponse* internal_default_instance() { + return reinterpret_cast( + &_VersionResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(VersionResponse& a, VersionResponse& b) { + a.Swap(&b); + } + inline void Swap(VersionResponse* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline VersionResponse* New() const final { + return CreateMaybeMessage(nullptr); + } + + VersionResponse* 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 VersionResponse& from); + void MergeFrom(const VersionResponse& 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(VersionResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.VersionResponse"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_status_2eproto); + return ::descriptor_table_status_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kVersionFieldNumber = 1, + }; + // string version = 1; + void clear_version(); + const std::string& version() const; + void set_version(const std::string& value); + void set_version(std::string&& value); + void set_version(const char* value); + void set_version(const char* value, size_t size); + std::string* mutable_version(); + std::string* release_version(); + void set_allocated_version(std::string* version); + private: + const std::string& _internal_version() const; + void _internal_set_version(const std::string& value); + std::string* _internal_mutable_version(); + public: + + // @@protoc_insertion_point(class_scope:pb.VersionResponse) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr version_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_status_2eproto; +}; +// ------------------------------------------------------------------- + +class StatusResponse : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.StatusResponse) */ { + public: + StatusResponse(); + virtual ~StatusResponse(); + + StatusResponse(const StatusResponse& from); + StatusResponse(StatusResponse&& from) noexcept + : StatusResponse() { + *this = ::std::move(from); + } + + inline StatusResponse& operator=(const StatusResponse& from) { + CopyFrom(from); + return *this; + } + inline StatusResponse& operator=(StatusResponse&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 StatusResponse& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const StatusResponse* internal_default_instance() { + return reinterpret_cast( + &_StatusResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(StatusResponse& a, StatusResponse& b) { + a.Swap(&b); + } + inline void Swap(StatusResponse* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline StatusResponse* New() const final { + return CreateMaybeMessage(nullptr); + } + + StatusResponse* 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 StatusResponse& from); + void MergeFrom(const StatusResponse& 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(StatusResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.StatusResponse"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_status_2eproto); + return ::descriptor_table_status_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kHostFieldNumber = 1, + kStatusFieldNumber = 2, + }; + // string host = 1; + void clear_host(); + const std::string& host() const; + void set_host(const std::string& value); + void set_host(std::string&& value); + void set_host(const char* value); + void set_host(const char* value, size_t size); + std::string* mutable_host(); + std::string* release_host(); + void set_allocated_host(std::string* host); + private: + const std::string& _internal_host() const; + void _internal_set_host(const std::string& value); + std::string* _internal_mutable_host(); + public: + + // .pb.APISTATUS status = 2; + void clear_status(); + ::pb::APISTATUS status() const; + void set_status(::pb::APISTATUS value); + private: + ::pb::APISTATUS _internal_status() const; + void _internal_set_status(::pb::APISTATUS value); + public: + + // @@protoc_insertion_point(class_scope:pb.StatusResponse) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr host_; + int status_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_status_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// VersionResponse + +// string version = 1; +inline void VersionResponse::clear_version() { + version_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& VersionResponse::version() const { + // @@protoc_insertion_point(field_get:pb.VersionResponse.version) + return _internal_version(); +} +inline void VersionResponse::set_version(const std::string& value) { + _internal_set_version(value); + // @@protoc_insertion_point(field_set:pb.VersionResponse.version) +} +inline std::string* VersionResponse::mutable_version() { + // @@protoc_insertion_point(field_mutable:pb.VersionResponse.version) + return _internal_mutable_version(); +} +inline const std::string& VersionResponse::_internal_version() const { + return version_.GetNoArena(); +} +inline void VersionResponse::_internal_set_version(const std::string& value) { + + version_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void VersionResponse::set_version(std::string&& value) { + + version_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.VersionResponse.version) +} +inline void VersionResponse::set_version(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + version_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.VersionResponse.version) +} +inline void VersionResponse::set_version(const char* value, size_t size) { + + version_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.VersionResponse.version) +} +inline std::string* VersionResponse::_internal_mutable_version() { + + return version_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* VersionResponse::release_version() { + // @@protoc_insertion_point(field_release:pb.VersionResponse.version) + + return version_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void VersionResponse::set_allocated_version(std::string* version) { + if (version != nullptr) { + + } else { + + } + version_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), version); + // @@protoc_insertion_point(field_set_allocated:pb.VersionResponse.version) +} + +// ------------------------------------------------------------------- + +// StatusResponse + +// string host = 1; +inline void StatusResponse::clear_host() { + host_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& StatusResponse::host() const { + // @@protoc_insertion_point(field_get:pb.StatusResponse.host) + return _internal_host(); +} +inline void StatusResponse::set_host(const std::string& value) { + _internal_set_host(value); + // @@protoc_insertion_point(field_set:pb.StatusResponse.host) +} +inline std::string* StatusResponse::mutable_host() { + // @@protoc_insertion_point(field_mutable:pb.StatusResponse.host) + return _internal_mutable_host(); +} +inline const std::string& StatusResponse::_internal_host() const { + return host_.GetNoArena(); +} +inline void StatusResponse::_internal_set_host(const std::string& value) { + + host_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void StatusResponse::set_host(std::string&& value) { + + host_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.StatusResponse.host) +} +inline void StatusResponse::set_host(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + host_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.StatusResponse.host) +} +inline void StatusResponse::set_host(const char* value, size_t size) { + + host_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.StatusResponse.host) +} +inline std::string* StatusResponse::_internal_mutable_host() { + + return host_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* StatusResponse::release_host() { + // @@protoc_insertion_point(field_release:pb.StatusResponse.host) + + return host_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void StatusResponse::set_allocated_host(std::string* host) { + if (host != nullptr) { + + } else { + + } + host_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), host); + // @@protoc_insertion_point(field_set_allocated:pb.StatusResponse.host) +} + +// .pb.APISTATUS status = 2; +inline void StatusResponse::clear_status() { + status_ = 0; +} +inline ::pb::APISTATUS StatusResponse::_internal_status() const { + return static_cast< ::pb::APISTATUS >(status_); +} +inline ::pb::APISTATUS StatusResponse::status() const { + // @@protoc_insertion_point(field_get:pb.StatusResponse.status) + return _internal_status(); +} +inline void StatusResponse::_internal_set_status(::pb::APISTATUS value) { + + status_ = value; +} +inline void StatusResponse::set_status(::pb::APISTATUS value) { + _internal_set_status(value); + // @@protoc_insertion_point(field_set:pb.StatusResponse.status) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace pb + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::pb::APISTATUS> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::pb::APISTATUS>() { + return ::pb::APISTATUS_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_status_2eproto diff --git a/cpp/util.grpc.pb.cc b/cpp/util.grpc.pb.cc new file mode 100644 index 0000000..1c2151f --- /dev/null +++ b/cpp/util.grpc.pb.cc @@ -0,0 +1,25 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: util.proto + +#include "util.pb.h" +#include "util.grpc.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace pb { + +} // namespace pb + diff --git a/cpp/util.grpc.pb.h b/cpp/util.grpc.pb.h new file mode 100644 index 0000000..33ff055 --- /dev/null +++ b/cpp/util.grpc.pb.h @@ -0,0 +1,34 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: util.proto +#ifndef GRPC_util_2eproto__INCLUDED +#define GRPC_util_2eproto__INCLUDED + +#include "util.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace pb { + +} // namespace pb + + +#endif // GRPC_util_2eproto__INCLUDED diff --git a/cpp/util.pb.cc b/cpp/util.pb.cc new file mode 100644 index 0000000..a134556 --- /dev/null +++ b/cpp/util.pb.cc @@ -0,0 +1,470 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: util.proto + +#include "util.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include +namespace pb { +class PutResponseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _PutResponse_default_instance_; +class EmptyDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Empty_default_instance_; +} // namespace pb +static void InitDefaultsscc_info_Empty_util_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_Empty_default_instance_; + new (ptr) ::pb::Empty(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::Empty::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Empty_util_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Empty_util_2eproto}, {}}; + +static void InitDefaultsscc_info_PutResponse_util_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::pb::_PutResponse_default_instance_; + new (ptr) ::pb::PutResponse(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::pb::PutResponse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_PutResponse_util_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_PutResponse_util_2eproto}, {}}; + +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_util_2eproto[2]; +static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_util_2eproto = nullptr; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_util_2eproto = nullptr; + +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_util_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::PutResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pb::PutResponse, hash_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pb::Empty, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ +}; +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(::pb::PutResponse)}, + { 6, -1, sizeof(::pb::Empty)}, +}; + +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&::pb::_PutResponse_default_instance_), + reinterpret_cast(&::pb::_Empty_default_instance_), +}; + +const char descriptor_table_protodef_util_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\nutil.proto\022\002pb\"\033\n\013PutResponse\022\014\n\004hash\030" + "\001 \001(\t\"\007\n\005Emptyb\006proto3" + ; +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_util_2eproto_deps[1] = { +}; +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_util_2eproto_sccs[2] = { + &scc_info_Empty_util_2eproto.base, + &scc_info_PutResponse_util_2eproto.base, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_util_2eproto_once; +static bool descriptor_table_util_2eproto_initialized = false; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_util_2eproto = { + &descriptor_table_util_2eproto_initialized, descriptor_table_protodef_util_2eproto, "util.proto", 62, + &descriptor_table_util_2eproto_once, descriptor_table_util_2eproto_sccs, descriptor_table_util_2eproto_deps, 2, 0, + schemas, file_default_instances, TableStruct_util_2eproto::offsets, + file_level_metadata_util_2eproto, 2, file_level_enum_descriptors_util_2eproto, file_level_service_descriptors_util_2eproto, +}; + +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_util_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_util_2eproto), true); +namespace pb { + +// =================================================================== + +void PutResponse::InitAsDefaultInstance() { +} +class PutResponse::_Internal { + public: +}; + +PutResponse::PutResponse() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.PutResponse) +} +PutResponse::PutResponse(const PutResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_hash().empty()) { + hash_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.hash_); + } + // @@protoc_insertion_point(copy_constructor:pb.PutResponse) +} + +void PutResponse::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_PutResponse_util_2eproto.base); + hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +PutResponse::~PutResponse() { + // @@protoc_insertion_point(destructor:pb.PutResponse) + SharedDtor(); +} + +void PutResponse::SharedDtor() { + hash_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void PutResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const PutResponse& PutResponse::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_PutResponse_util_2eproto.base); + return *internal_default_instance(); +} + + +void PutResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.PutResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + hash_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + _internal_metadata_.Clear(); +} + +const char* PutResponse::_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 hash = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_hash(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pb.PutResponse.hash")); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* PutResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.PutResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string hash = 1; + if (this->hash().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_hash().data(), static_cast(this->_internal_hash().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pb.PutResponse.hash"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_hash(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.PutResponse) + return target; +} + +size_t PutResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.PutResponse) + 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 hash = 1; + if (this->hash().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_hash()); + } + + 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 PutResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.PutResponse) + GOOGLE_DCHECK_NE(&from, this); + const PutResponse* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.PutResponse) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.PutResponse) + MergeFrom(*source); + } +} + +void PutResponse::MergeFrom(const PutResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.PutResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.hash().size() > 0) { + + hash_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.hash_); + } +} + +void PutResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.PutResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void PutResponse::CopyFrom(const PutResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.PutResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool PutResponse::IsInitialized() const { + return true; +} + +void PutResponse::InternalSwap(PutResponse* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + hash_.Swap(&other->hash_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} + +::PROTOBUF_NAMESPACE_ID::Metadata PutResponse::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void Empty::InitAsDefaultInstance() { +} +class Empty::_Internal { + public: +}; + +Empty::Empty() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.Empty) +} +Empty::Empty(const Empty& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:pb.Empty) +} + +void Empty::SharedCtor() { +} + +Empty::~Empty() { + // @@protoc_insertion_point(destructor:pb.Empty) + SharedDtor(); +} + +void Empty::SharedDtor() { +} + +void Empty::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Empty& Empty::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Empty_util_2eproto.base); + return *internal_default_instance(); +} + + +void Empty::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.Empty) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _internal_metadata_.Clear(); +} + +const char* Empty::_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); + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Empty::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.Empty) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:pb.Empty) + return target; +} + +size_t Empty::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pb.Empty) + 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; + + 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 Empty::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.Empty) + GOOGLE_DCHECK_NE(&from, this); + const Empty* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.Empty) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.Empty) + MergeFrom(*source); + } +} + +void Empty::MergeFrom(const Empty& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.Empty) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + +} + +void Empty::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.Empty) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Empty::CopyFrom(const Empty& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.Empty) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Empty::IsInitialized() const { + return true; +} + +void Empty::InternalSwap(Empty* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Empty::GetMetadata() const { + return GetMetadataStatic(); +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace pb +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::pb::PutResponse* Arena::CreateMaybeMessage< ::pb::PutResponse >(Arena* arena) { + return Arena::CreateInternal< ::pb::PutResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::pb::Empty* Arena::CreateMaybeMessage< ::pb::Empty >(Arena* arena) { + return Arena::CreateInternal< ::pb::Empty >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/cpp/util.pb.h b/cpp/util.pb.h new file mode 100644 index 0000000..0d75bd0 --- /dev/null +++ b/cpp/util.pb.h @@ -0,0 +1,409 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: util.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_util_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_util_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3011000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3011002 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_util_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_util_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[2] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_util_2eproto; +namespace pb { +class Empty; +class EmptyDefaultTypeInternal; +extern EmptyDefaultTypeInternal _Empty_default_instance_; +class PutResponse; +class PutResponseDefaultTypeInternal; +extern PutResponseDefaultTypeInternal _PutResponse_default_instance_; +} // namespace pb +PROTOBUF_NAMESPACE_OPEN +template<> ::pb::Empty* Arena::CreateMaybeMessage<::pb::Empty>(Arena*); +template<> ::pb::PutResponse* Arena::CreateMaybeMessage<::pb::PutResponse>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace pb { + +// =================================================================== + +class PutResponse : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.PutResponse) */ { + public: + PutResponse(); + virtual ~PutResponse(); + + PutResponse(const PutResponse& from); + PutResponse(PutResponse&& from) noexcept + : PutResponse() { + *this = ::std::move(from); + } + + inline PutResponse& operator=(const PutResponse& from) { + CopyFrom(from); + return *this; + } + inline PutResponse& operator=(PutResponse&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 PutResponse& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const PutResponse* internal_default_instance() { + return reinterpret_cast( + &_PutResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(PutResponse& a, PutResponse& b) { + a.Swap(&b); + } + inline void Swap(PutResponse* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline PutResponse* New() const final { + return CreateMaybeMessage(nullptr); + } + + PutResponse* 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 PutResponse& from); + void MergeFrom(const PutResponse& 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(PutResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.PutResponse"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_util_2eproto); + return ::descriptor_table_util_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kHashFieldNumber = 1, + }; + // string hash = 1; + void clear_hash(); + const std::string& hash() const; + void set_hash(const std::string& value); + void set_hash(std::string&& value); + void set_hash(const char* value); + void set_hash(const char* value, size_t size); + std::string* mutable_hash(); + std::string* release_hash(); + void set_allocated_hash(std::string* hash); + private: + const std::string& _internal_hash() const; + void _internal_set_hash(const std::string& value); + std::string* _internal_mutable_hash(); + public: + + // @@protoc_insertion_point(class_scope:pb.PutResponse) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr hash_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_util_2eproto; +}; +// ------------------------------------------------------------------- + +class Empty : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pb.Empty) */ { + public: + Empty(); + virtual ~Empty(); + + Empty(const Empty& from); + Empty(Empty&& from) noexcept + : Empty() { + *this = ::std::move(from); + } + + inline Empty& operator=(const Empty& from) { + CopyFrom(from); + return *this; + } + inline Empty& operator=(Empty&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + 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 Empty& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Empty* internal_default_instance() { + return reinterpret_cast( + &_Empty_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(Empty& a, Empty& b) { + a.Swap(&b); + } + inline void Swap(Empty* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Empty* New() const final { + return CreateMaybeMessage(nullptr); + } + + Empty* 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 Empty& from); + void MergeFrom(const Empty& 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(Empty* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pb.Empty"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_util_2eproto); + return ::descriptor_table_util_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:pb.Empty) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_util_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// PutResponse + +// string hash = 1; +inline void PutResponse::clear_hash() { + hash_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& PutResponse::hash() const { + // @@protoc_insertion_point(field_get:pb.PutResponse.hash) + return _internal_hash(); +} +inline void PutResponse::set_hash(const std::string& value) { + _internal_set_hash(value); + // @@protoc_insertion_point(field_set:pb.PutResponse.hash) +} +inline std::string* PutResponse::mutable_hash() { + // @@protoc_insertion_point(field_mutable:pb.PutResponse.hash) + return _internal_mutable_hash(); +} +inline const std::string& PutResponse::_internal_hash() const { + return hash_.GetNoArena(); +} +inline void PutResponse::_internal_set_hash(const std::string& value) { + + hash_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); +} +inline void PutResponse::set_hash(std::string&& value) { + + hash_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:pb.PutResponse.hash) +} +inline void PutResponse::set_hash(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + hash_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.PutResponse.hash) +} +inline void PutResponse::set_hash(const char* value, size_t size) { + + hash_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.PutResponse.hash) +} +inline std::string* PutResponse::_internal_mutable_hash() { + + return hash_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* PutResponse::release_hash() { + // @@protoc_insertion_point(field_release:pb.PutResponse.hash) + + return hash_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void PutResponse::set_allocated_hash(std::string* hash) { + if (hash != nullptr) { + + } else { + + } + hash_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), hash); + // @@protoc_insertion_point(field_set_allocated:pb.PutResponse.hash) +} + +// ------------------------------------------------------------------- + +// Empty + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace pb + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_util_2eproto diff --git a/doc/PROTO.md b/doc/PROTO.md index ce6008f..39fb937 100644 --- a/doc/PROTO.md +++ b/doc/PROTO.md @@ -14,10 +14,8 @@ - [REFREQOPTS](#pb.REFREQOPTS) - [REFREQTYPE](#pb.REFREQTYPE) - - [AdminAPI](#pb.AdminAPI) - - [file.proto](#file.proto) - [Blob](#pb.Blob) - [DownloadRequest](#pb.DownloadRequest) @@ -25,21 +23,15 @@ - [UploadOptions](#pb.UploadOptions) - [UploadRequest](#pb.UploadRequest) - - - [FileAPI](#pb.FileAPI) - - [namesys.proto](#namesys.proto) - [NameSysPublishRequest](#pb.NameSysPublishRequest) - [NameSysResolveRequest](#pb.NameSysResolveRequest) - [NameSysResolveResult](#pb.NameSysResolveResult) - - - [NameSysAPI](#pb.NameSysAPI) - - [node.proto](#node.proto) - [Block](#pb.Block) - [BlockstoreRequest](#pb.BlockstoreRequest) @@ -75,10 +67,8 @@ - [KSREQTYPE](#pb.KSREQTYPE) - [P2PREQTYPE](#pb.P2PREQTYPE) - - [NodeAPI](#pb.NodeAPI) - - [pubsub.proto](#pubsub.proto) - [PubSubMessage](#pb.PubSubMessage) - [PubSubPeer](#pb.PubSubPeer) @@ -87,10 +77,8 @@ - [PSREQTYPE](#pb.PSREQTYPE) - - [PubSubAPI](#pb.PubSubAPI) - - [replication.proto](#replication.proto) - [AddrInfo](#pb.AddrInfo) - [Replication](#pb.Replication) @@ -100,29 +88,20 @@ - [Subscription](#pb.Subscription) - [SubscriptionUpdate](#pb.SubscriptionUpdate) - - - [replicator](#pb.replicator) - - [status.proto](#status.proto) - [StatusResponse](#pb.StatusResponse) - [VersionResponse](#pb.VersionResponse) - [APISTATUS](#pb.APISTATUS) - - [StatusAPI](#pb.StatusAPI) - - [util.proto](#util.proto) - [Empty](#pb.Empty) - [PutResponse](#pb.PutResponse) - - - - - [Scalar Value Types](#scalar-value-types) @@ -1394,21 +1373,21 @@ PutResponse is a response to any data storage (put) requests ## Scalar Value Types -| .proto Type | Notes | C++ Type | Java Type | Python Type | -| ----------- | ----- | -------- | --------- | ----------- | -| double | | double | double | float | -| float | | float | float | float | -| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | -| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | -| uint32 | Uses variable-length encoding. | uint32 | int | int/long | -| uint64 | Uses variable-length encoding. | uint64 | long | int/long | -| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | -| sfixed32 | Always four bytes. | int32 | int | int | -| sfixed64 | Always eight bytes. | int64 | long | int/long | -| bool | | bool | boolean | boolean | -| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | -| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | +| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | +| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | +| double | | double | double | float | float64 | double | float | Float | +| float | | float | float | float | float32 | float | float | Float | +| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | +| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | +| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | +| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | +| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | +| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | +| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |