diff --git a/.gitignore b/.gitignore index 401292e0ef..d4bd3ae744 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ - - *~ *.iml *.ipr @@ -58,3 +56,5 @@ test/tracetesting/tracetesting-vars.yaml # Android *.apk + +!src/currency/build diff --git a/.licenserc.json b/.licenserc.json index 350f284092..ce5eb313ba 100644 --- a/.licenserc.json +++ b/.licenserc.json @@ -41,6 +41,7 @@ "/src/accounting/src/protos/", "src/cart/src/obj/", "src/cart/tests/obj/", + "src/currency/build/", "src/checkoutservice/genproto/", "src/featureflagservice/assets/vendor/", "src/featureflagservice/priv/", diff --git a/docker-gen-proto.sh b/docker-gen-proto.sh index f29fdcfcdb..8a9a7364b7 100755 --- a/docker-gen-proto.sh +++ b/docker-gen-proto.sh @@ -7,6 +7,8 @@ set -x # Print commands and their arguments as they are executed # This script is used to generate protobuf files for all services with Docker. +. ./.env + gen_proto_go() { echo "Generating Go protobuf files for $1" docker build -f "src/$1/genproto/Dockerfile" -t "$1-genproto" . @@ -14,6 +16,13 @@ gen_proto_go() { protoc -I /build/pb /build/pb/demo.proto --go_out="./src/$1/" --go-grpc_out="./src/$1/" } +gen_proto_cpp() { + echo "Generating Cpp protobuf files for $1" + docker build --build-arg OPENTELEMETRY_CPP_VERSION=${OPENTELEMETRY_CPP_VERSION} -f "src/$1/genproto/Dockerfile" -t "$1-genproto" . + docker run --rm -v $(pwd):/build "$1-genproto" \ + cp -r "/$1/build/generated" "/build/src/$1/build/" +} + gen_proto_python() { echo "Generating Python protobuf files for $1" docker build -f "src/$1/genproto/Dockerfile" -t "$1-genproto" . @@ -21,15 +30,19 @@ gen_proto_python() { python -m grpc_tools.protoc -I /build/pb/ --python_out="./src/$1/" --grpc_python_out="./src/$1/" /build/pb/demo.proto } -#gen_proto_dotnet accounting -#gen_proto_java ad -#gen_proto_dotnet cart -gen_proto_go checkoutservice -#gen_proto_cpp currency -#gen_proto_ruby email -#gen_proto_ts frontend -#gen_proto_js payment -gen_proto_go productcatalogservice -#gen_proto_php quote -gen_proto_python recommendation -#gen_proto_rust shipping +if [ -z "$1" ]; then + #gen_proto_dotnet accounting + #gen_proto_java ad + #gen_proto_dotnet cart + gen_proto_go checkoutservice + gen_proto_cpp currency + #gen_proto_ruby email + #gen_proto_ts frontend + #gen_proto_js payment + gen_proto_go productcatalogservice + #gen_proto_php quote + gen_proto_python recommendation + #gen_proto_rust shipping +else + "gen_proto_$1" "$2" +fi diff --git a/src/currency/.dockerignore b/src/currency/.dockerignore index 5957e52fe4..98de4bf9ef 100644 --- a/src/currency/.dockerignore +++ b/src/currency/.dockerignore @@ -1,4 +1,3 @@ client.js node_modules/ -build/ out/ diff --git a/src/currency/CMakeLists.txt b/src/currency/CMakeLists.txt index 7b249e80f0..3bf13c25bc 100644 --- a/src/currency/CMakeLists.txt +++ b/src/currency/CMakeLists.txt @@ -5,58 +5,10 @@ find_package(Protobuf REQUIRED) find_package(gRPC CONFIG REQUIRED) find_package(opentelemetry-cpp CONFIG REQUIRED) -set(PROTO_PATH "${CMAKE_CURRENT_SOURCE_DIR}/proto") set(GENERATED_PROTOBUF_PATH "${CMAKE_BINARY_DIR}/generated/proto") -set(GENERATED_HEALTH_PROTOBUF_PATH "${GENERATED_PROTOBUF_PATH}/grpc/health/v1") -file(MAKE_DIRECTORY "${GENERATED_PROTOBUF_PATH}") +add_subdirectory(genproto) -set(DEMO_PROTO "${PROTO_PATH}/demo.proto") -set(DEMO_PB_CPP_FILE "${GENERATED_PROTOBUF_PATH}/demo.pb.cc") -set(DEMO_PB_H_FILE "${GENERATED_PROTOBUF_PATH}/demo.pb.h") -set(DEMO_GRPC_PB_CPP_FILE "${GENERATED_PROTOBUF_PATH}/demo.grpc.pb.cc") -set(DEMO_GRPC_PB_H_FILE "${GENERATED_PROTOBUF_PATH}/demo.grpc.pb.h") -set(HEALTH_PROTO "${PROTO_PATH}/grpc/health/v1/health.proto") -set(HEALTH_PB_CPP_FILE "${GENERATED_HEALTH_PROTOBUF_PATH}/health.pb.cc") -set(HEALTH_PB_H_FILE "${GENERATED_HEALTH_PROTOBUF_PATH}/health.pb.h") -set(HEALTH_GRPC_PB_CPP_FILE "${GENERATED_HEALTH_PROTOBUF_PATH}/health.grpc.pb.cc") -set(HEALTH_GRPC_PB_H_FILE "${GENERATED_HEALTH_PROTOBUF_PATH}/health.grpc.pb.h") - -foreach(IMPORT_DIR ${PROTOBUF_IMPORT_DIRS}) - list(APPEND PROTOBUF_INCLUDE_FLAGS "-I${IMPORT_DIR}") -endforeach() - -find_program(gRPC_CPP_PLUGIN_EXECUTABLE grpc_cpp_plugin) - -add_custom_command( - OUTPUT ${DEMO_PB_H_FILE} - ${DEMO_PB_CPP_FILE} - ${DEMO_GRPC_PB_CPP_FILE} - ${DEMO_GRPC_PB_H_FILE} - ${HEALTH_PB_H_FILE} - ${HEALTH_PB_CPP_FILE} - ${HEALTH_GRPC_PB_CPP_FILE} - ${HEALTH_GRPC_PB_H_FILE} - - COMMAND - ${PROTOBUF_PROTOC_EXECUTABLE} ARGS "--experimental_allow_proto3_optional" - "--proto_path=${PROTO_PATH}" ${PROTOBUF_INCLUDE_FLAGS} - "--cpp_out=${GENERATED_PROTOBUF_PATH}" - "--grpc_out=generate_mock_code=true:${GENERATED_PROTOBUF_PATH}" - --plugin=protoc-gen-grpc="${gRPC_CPP_PLUGIN_EXECUTABLE}" ${DEMO_PROTO} ${HEALTH_PROTO}) - -message(STATUS "gRPC_CPP_PLUGIN_EXECUTABLE=${gRPC_CPP_PLUGIN_EXECUTABLE}") - -add_library(demo-proto ${DEMO_PB_H_FILE} - ${DEMO_PB_CPP_FILE} - ${DEMO_GRPC_PB_CPP_FILE} - ${DEMO_GRPC_PB_H_FILE} - ${HEALTH_PB_H_FILE} - ${HEALTH_PB_CPP_FILE} - ${HEALTH_GRPC_PB_CPP_FILE} - ${HEALTH_GRPC_PB_H_FILE}) - -target_link_libraries(demo-proto gRPC::grpc++ protobuf::libprotobuf) include_directories("${GENERATED_PROTOBUF_PATH}" "${OPENTELEMETRY_CPP_INCLUDE_DIRS}") add_executable(currency src/server.cpp) diff --git a/src/currency/Dockerfile b/src/currency/Dockerfile index 5a5da589c7..f092bee2a2 100644 --- a/src/currency/Dockerfile +++ b/src/currency/Dockerfile @@ -20,9 +20,8 @@ RUN apk update && apk add git cmake make g++ grpc-dev protobuf-dev linux-headers ARG OPENTELEMETRY_CPP_VERSION -RUN git clone https://github.com/open-telemetry/opentelemetry-cpp \ - && cd opentelemetry-cpp/ \ - && git checkout tags/v${OPENTELEMETRY_CPP_VERSION} -b v${OPENTELEMETRY_CPP_VERSION} \ +RUN git clone --depth 1 --branch v${OPENTELEMETRY_CPP_VERSION} https://github.com/open-telemetry/opentelemetry-cpp \ + && cd opentelemetry-cpp/ \ && mkdir build \ && cd build \ && cmake .. -DCMAKE_CXX_STANDARD=17 -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ diff --git a/src/currency/build/generated/proto/demo.grpc.pb.cc b/src/currency/build/generated/proto/demo.grpc.pb.cc new file mode 100644 index 0000000000..b02a92ab4e --- /dev/null +++ b/src/currency/build/generated/proto/demo.grpc.pb.cc @@ -0,0 +1,1055 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: demo.proto + +#include "demo.pb.h" +#include "demo.grpc.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace oteldemo { + +static const char* CartService_method_names[] = { + "/oteldemo.CartService/AddItem", + "/oteldemo.CartService/GetCart", + "/oteldemo.CartService/EmptyCart", +}; + +std::unique_ptr< CartService::Stub> CartService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< CartService::Stub> stub(new CartService::Stub(channel, options)); + return stub; +} + +CartService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) + : channel_(channel), rpcmethod_AddItem_(CartService_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_GetCart_(CartService_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_EmptyCart_(CartService_method_names[2], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::Status CartService::Stub::AddItem(::grpc::ClientContext* context, const ::oteldemo::AddItemRequest& request, ::oteldemo::Empty* response) { + return ::grpc::internal::BlockingUnaryCall< ::oteldemo::AddItemRequest, ::oteldemo::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_AddItem_, context, request, response); +} + +void CartService::Stub::async::AddItem(::grpc::ClientContext* context, const ::oteldemo::AddItemRequest* request, ::oteldemo::Empty* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::oteldemo::AddItemRequest, ::oteldemo::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_AddItem_, context, request, response, std::move(f)); +} + +void CartService::Stub::async::AddItem(::grpc::ClientContext* context, const ::oteldemo::AddItemRequest* request, ::oteldemo::Empty* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_AddItem_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::Empty>* CartService::Stub::PrepareAsyncAddItemRaw(::grpc::ClientContext* context, const ::oteldemo::AddItemRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::oteldemo::Empty, ::oteldemo::AddItemRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_AddItem_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::Empty>* CartService::Stub::AsyncAddItemRaw(::grpc::ClientContext* context, const ::oteldemo::AddItemRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncAddItemRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CartService::Stub::GetCart(::grpc::ClientContext* context, const ::oteldemo::GetCartRequest& request, ::oteldemo::Cart* response) { + return ::grpc::internal::BlockingUnaryCall< ::oteldemo::GetCartRequest, ::oteldemo::Cart, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_GetCart_, context, request, response); +} + +void CartService::Stub::async::GetCart(::grpc::ClientContext* context, const ::oteldemo::GetCartRequest* request, ::oteldemo::Cart* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::oteldemo::GetCartRequest, ::oteldemo::Cart, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetCart_, context, request, response, std::move(f)); +} + +void CartService::Stub::async::GetCart(::grpc::ClientContext* context, const ::oteldemo::GetCartRequest* request, ::oteldemo::Cart* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetCart_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::Cart>* CartService::Stub::PrepareAsyncGetCartRaw(::grpc::ClientContext* context, const ::oteldemo::GetCartRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::oteldemo::Cart, ::oteldemo::GetCartRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_GetCart_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::Cart>* CartService::Stub::AsyncGetCartRaw(::grpc::ClientContext* context, const ::oteldemo::GetCartRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncGetCartRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CartService::Stub::EmptyCart(::grpc::ClientContext* context, const ::oteldemo::EmptyCartRequest& request, ::oteldemo::Empty* response) { + return ::grpc::internal::BlockingUnaryCall< ::oteldemo::EmptyCartRequest, ::oteldemo::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_EmptyCart_, context, request, response); +} + +void CartService::Stub::async::EmptyCart(::grpc::ClientContext* context, const ::oteldemo::EmptyCartRequest* request, ::oteldemo::Empty* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::oteldemo::EmptyCartRequest, ::oteldemo::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_EmptyCart_, context, request, response, std::move(f)); +} + +void CartService::Stub::async::EmptyCart(::grpc::ClientContext* context, const ::oteldemo::EmptyCartRequest* request, ::oteldemo::Empty* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_EmptyCart_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::Empty>* CartService::Stub::PrepareAsyncEmptyCartRaw(::grpc::ClientContext* context, const ::oteldemo::EmptyCartRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::oteldemo::Empty, ::oteldemo::EmptyCartRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_EmptyCart_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::Empty>* CartService::Stub::AsyncEmptyCartRaw(::grpc::ClientContext* context, const ::oteldemo::EmptyCartRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncEmptyCartRaw(context, request, cq); + result->StartCall(); + return result; +} + +CartService::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + CartService_method_names[0], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CartService::Service, ::oteldemo::AddItemRequest, ::oteldemo::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CartService::Service* service, + ::grpc::ServerContext* ctx, + const ::oteldemo::AddItemRequest* req, + ::oteldemo::Empty* resp) { + return service->AddItem(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CartService_method_names[1], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CartService::Service, ::oteldemo::GetCartRequest, ::oteldemo::Cart, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CartService::Service* service, + ::grpc::ServerContext* ctx, + const ::oteldemo::GetCartRequest* req, + ::oteldemo::Cart* resp) { + return service->GetCart(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CartService_method_names[2], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CartService::Service, ::oteldemo::EmptyCartRequest, ::oteldemo::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CartService::Service* service, + ::grpc::ServerContext* ctx, + const ::oteldemo::EmptyCartRequest* req, + ::oteldemo::Empty* resp) { + return service->EmptyCart(ctx, req, resp); + }, this))); +} + +CartService::Service::~Service() { +} + +::grpc::Status CartService::Service::AddItem(::grpc::ServerContext* context, const ::oteldemo::AddItemRequest* request, ::oteldemo::Empty* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CartService::Service::GetCart(::grpc::ServerContext* context, const ::oteldemo::GetCartRequest* request, ::oteldemo::Cart* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CartService::Service::EmptyCart(::grpc::ServerContext* context, const ::oteldemo::EmptyCartRequest* request, ::oteldemo::Empty* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +static const char* RecommendationService_method_names[] = { + "/oteldemo.RecommendationService/ListRecommendations", +}; + +std::unique_ptr< RecommendationService::Stub> RecommendationService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< RecommendationService::Stub> stub(new RecommendationService::Stub(channel, options)); + return stub; +} + +RecommendationService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) + : channel_(channel), rpcmethod_ListRecommendations_(RecommendationService_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::Status RecommendationService::Stub::ListRecommendations(::grpc::ClientContext* context, const ::oteldemo::ListRecommendationsRequest& request, ::oteldemo::ListRecommendationsResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::oteldemo::ListRecommendationsRequest, ::oteldemo::ListRecommendationsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_ListRecommendations_, context, request, response); +} + +void RecommendationService::Stub::async::ListRecommendations(::grpc::ClientContext* context, const ::oteldemo::ListRecommendationsRequest* request, ::oteldemo::ListRecommendationsResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::oteldemo::ListRecommendationsRequest, ::oteldemo::ListRecommendationsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ListRecommendations_, context, request, response, std::move(f)); +} + +void RecommendationService::Stub::async::ListRecommendations(::grpc::ClientContext* context, const ::oteldemo::ListRecommendationsRequest* request, ::oteldemo::ListRecommendationsResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ListRecommendations_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::ListRecommendationsResponse>* RecommendationService::Stub::PrepareAsyncListRecommendationsRaw(::grpc::ClientContext* context, const ::oteldemo::ListRecommendationsRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::oteldemo::ListRecommendationsResponse, ::oteldemo::ListRecommendationsRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_ListRecommendations_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::ListRecommendationsResponse>* RecommendationService::Stub::AsyncListRecommendationsRaw(::grpc::ClientContext* context, const ::oteldemo::ListRecommendationsRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncListRecommendationsRaw(context, request, cq); + result->StartCall(); + return result; +} + +RecommendationService::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + RecommendationService_method_names[0], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< RecommendationService::Service, ::oteldemo::ListRecommendationsRequest, ::oteldemo::ListRecommendationsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](RecommendationService::Service* service, + ::grpc::ServerContext* ctx, + const ::oteldemo::ListRecommendationsRequest* req, + ::oteldemo::ListRecommendationsResponse* resp) { + return service->ListRecommendations(ctx, req, resp); + }, this))); +} + +RecommendationService::Service::~Service() { +} + +::grpc::Status RecommendationService::Service::ListRecommendations(::grpc::ServerContext* context, const ::oteldemo::ListRecommendationsRequest* request, ::oteldemo::ListRecommendationsResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +static const char* ProductCatalogService_method_names[] = { + "/oteldemo.ProductCatalogService/ListProducts", + "/oteldemo.ProductCatalogService/GetProduct", + "/oteldemo.ProductCatalogService/SearchProducts", +}; + +std::unique_ptr< ProductCatalogService::Stub> ProductCatalogService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< ProductCatalogService::Stub> stub(new ProductCatalogService::Stub(channel, options)); + return stub; +} + +ProductCatalogService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) + : channel_(channel), rpcmethod_ListProducts_(ProductCatalogService_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_GetProduct_(ProductCatalogService_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_SearchProducts_(ProductCatalogService_method_names[2], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::Status ProductCatalogService::Stub::ListProducts(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::oteldemo::ListProductsResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::oteldemo::Empty, ::oteldemo::ListProductsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_ListProducts_, context, request, response); +} + +void ProductCatalogService::Stub::async::ListProducts(::grpc::ClientContext* context, const ::oteldemo::Empty* request, ::oteldemo::ListProductsResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::oteldemo::Empty, ::oteldemo::ListProductsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ListProducts_, context, request, response, std::move(f)); +} + +void ProductCatalogService::Stub::async::ListProducts(::grpc::ClientContext* context, const ::oteldemo::Empty* request, ::oteldemo::ListProductsResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ListProducts_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::ListProductsResponse>* ProductCatalogService::Stub::PrepareAsyncListProductsRaw(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::oteldemo::ListProductsResponse, ::oteldemo::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_ListProducts_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::ListProductsResponse>* ProductCatalogService::Stub::AsyncListProductsRaw(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncListProductsRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status ProductCatalogService::Stub::GetProduct(::grpc::ClientContext* context, const ::oteldemo::GetProductRequest& request, ::oteldemo::Product* response) { + return ::grpc::internal::BlockingUnaryCall< ::oteldemo::GetProductRequest, ::oteldemo::Product, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_GetProduct_, context, request, response); +} + +void ProductCatalogService::Stub::async::GetProduct(::grpc::ClientContext* context, const ::oteldemo::GetProductRequest* request, ::oteldemo::Product* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::oteldemo::GetProductRequest, ::oteldemo::Product, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetProduct_, context, request, response, std::move(f)); +} + +void ProductCatalogService::Stub::async::GetProduct(::grpc::ClientContext* context, const ::oteldemo::GetProductRequest* request, ::oteldemo::Product* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetProduct_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::Product>* ProductCatalogService::Stub::PrepareAsyncGetProductRaw(::grpc::ClientContext* context, const ::oteldemo::GetProductRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::oteldemo::Product, ::oteldemo::GetProductRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_GetProduct_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::Product>* ProductCatalogService::Stub::AsyncGetProductRaw(::grpc::ClientContext* context, const ::oteldemo::GetProductRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncGetProductRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status ProductCatalogService::Stub::SearchProducts(::grpc::ClientContext* context, const ::oteldemo::SearchProductsRequest& request, ::oteldemo::SearchProductsResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::oteldemo::SearchProductsRequest, ::oteldemo::SearchProductsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_SearchProducts_, context, request, response); +} + +void ProductCatalogService::Stub::async::SearchProducts(::grpc::ClientContext* context, const ::oteldemo::SearchProductsRequest* request, ::oteldemo::SearchProductsResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::oteldemo::SearchProductsRequest, ::oteldemo::SearchProductsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SearchProducts_, context, request, response, std::move(f)); +} + +void ProductCatalogService::Stub::async::SearchProducts(::grpc::ClientContext* context, const ::oteldemo::SearchProductsRequest* request, ::oteldemo::SearchProductsResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SearchProducts_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::SearchProductsResponse>* ProductCatalogService::Stub::PrepareAsyncSearchProductsRaw(::grpc::ClientContext* context, const ::oteldemo::SearchProductsRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::oteldemo::SearchProductsResponse, ::oteldemo::SearchProductsRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_SearchProducts_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::SearchProductsResponse>* ProductCatalogService::Stub::AsyncSearchProductsRaw(::grpc::ClientContext* context, const ::oteldemo::SearchProductsRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncSearchProductsRaw(context, request, cq); + result->StartCall(); + return result; +} + +ProductCatalogService::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + ProductCatalogService_method_names[0], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< ProductCatalogService::Service, ::oteldemo::Empty, ::oteldemo::ListProductsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](ProductCatalogService::Service* service, + ::grpc::ServerContext* ctx, + const ::oteldemo::Empty* req, + ::oteldemo::ListProductsResponse* resp) { + return service->ListProducts(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + ProductCatalogService_method_names[1], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< ProductCatalogService::Service, ::oteldemo::GetProductRequest, ::oteldemo::Product, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](ProductCatalogService::Service* service, + ::grpc::ServerContext* ctx, + const ::oteldemo::GetProductRequest* req, + ::oteldemo::Product* resp) { + return service->GetProduct(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + ProductCatalogService_method_names[2], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< ProductCatalogService::Service, ::oteldemo::SearchProductsRequest, ::oteldemo::SearchProductsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](ProductCatalogService::Service* service, + ::grpc::ServerContext* ctx, + const ::oteldemo::SearchProductsRequest* req, + ::oteldemo::SearchProductsResponse* resp) { + return service->SearchProducts(ctx, req, resp); + }, this))); +} + +ProductCatalogService::Service::~Service() { +} + +::grpc::Status ProductCatalogService::Service::ListProducts(::grpc::ServerContext* context, const ::oteldemo::Empty* request, ::oteldemo::ListProductsResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status ProductCatalogService::Service::GetProduct(::grpc::ServerContext* context, const ::oteldemo::GetProductRequest* request, ::oteldemo::Product* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status ProductCatalogService::Service::SearchProducts(::grpc::ServerContext* context, const ::oteldemo::SearchProductsRequest* request, ::oteldemo::SearchProductsResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +static const char* ShippingService_method_names[] = { + "/oteldemo.ShippingService/GetQuote", + "/oteldemo.ShippingService/ShipOrder", +}; + +std::unique_ptr< ShippingService::Stub> ShippingService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< ShippingService::Stub> stub(new ShippingService::Stub(channel, options)); + return stub; +} + +ShippingService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) + : channel_(channel), rpcmethod_GetQuote_(ShippingService_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_ShipOrder_(ShippingService_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::Status ShippingService::Stub::GetQuote(::grpc::ClientContext* context, const ::oteldemo::GetQuoteRequest& request, ::oteldemo::GetQuoteResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::oteldemo::GetQuoteRequest, ::oteldemo::GetQuoteResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_GetQuote_, context, request, response); +} + +void ShippingService::Stub::async::GetQuote(::grpc::ClientContext* context, const ::oteldemo::GetQuoteRequest* request, ::oteldemo::GetQuoteResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::oteldemo::GetQuoteRequest, ::oteldemo::GetQuoteResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetQuote_, context, request, response, std::move(f)); +} + +void ShippingService::Stub::async::GetQuote(::grpc::ClientContext* context, const ::oteldemo::GetQuoteRequest* request, ::oteldemo::GetQuoteResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetQuote_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::GetQuoteResponse>* ShippingService::Stub::PrepareAsyncGetQuoteRaw(::grpc::ClientContext* context, const ::oteldemo::GetQuoteRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::oteldemo::GetQuoteResponse, ::oteldemo::GetQuoteRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_GetQuote_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::GetQuoteResponse>* ShippingService::Stub::AsyncGetQuoteRaw(::grpc::ClientContext* context, const ::oteldemo::GetQuoteRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncGetQuoteRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status ShippingService::Stub::ShipOrder(::grpc::ClientContext* context, const ::oteldemo::ShipOrderRequest& request, ::oteldemo::ShipOrderResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::oteldemo::ShipOrderRequest, ::oteldemo::ShipOrderResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_ShipOrder_, context, request, response); +} + +void ShippingService::Stub::async::ShipOrder(::grpc::ClientContext* context, const ::oteldemo::ShipOrderRequest* request, ::oteldemo::ShipOrderResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::oteldemo::ShipOrderRequest, ::oteldemo::ShipOrderResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ShipOrder_, context, request, response, std::move(f)); +} + +void ShippingService::Stub::async::ShipOrder(::grpc::ClientContext* context, const ::oteldemo::ShipOrderRequest* request, ::oteldemo::ShipOrderResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ShipOrder_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::ShipOrderResponse>* ShippingService::Stub::PrepareAsyncShipOrderRaw(::grpc::ClientContext* context, const ::oteldemo::ShipOrderRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::oteldemo::ShipOrderResponse, ::oteldemo::ShipOrderRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_ShipOrder_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::ShipOrderResponse>* ShippingService::Stub::AsyncShipOrderRaw(::grpc::ClientContext* context, const ::oteldemo::ShipOrderRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncShipOrderRaw(context, request, cq); + result->StartCall(); + return result; +} + +ShippingService::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + ShippingService_method_names[0], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< ShippingService::Service, ::oteldemo::GetQuoteRequest, ::oteldemo::GetQuoteResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](ShippingService::Service* service, + ::grpc::ServerContext* ctx, + const ::oteldemo::GetQuoteRequest* req, + ::oteldemo::GetQuoteResponse* resp) { + return service->GetQuote(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + ShippingService_method_names[1], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< ShippingService::Service, ::oteldemo::ShipOrderRequest, ::oteldemo::ShipOrderResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](ShippingService::Service* service, + ::grpc::ServerContext* ctx, + const ::oteldemo::ShipOrderRequest* req, + ::oteldemo::ShipOrderResponse* resp) { + return service->ShipOrder(ctx, req, resp); + }, this))); +} + +ShippingService::Service::~Service() { +} + +::grpc::Status ShippingService::Service::GetQuote(::grpc::ServerContext* context, const ::oteldemo::GetQuoteRequest* request, ::oteldemo::GetQuoteResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status ShippingService::Service::ShipOrder(::grpc::ServerContext* context, const ::oteldemo::ShipOrderRequest* request, ::oteldemo::ShipOrderResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +static const char* CurrencyService_method_names[] = { + "/oteldemo.CurrencyService/GetSupportedCurrencies", + "/oteldemo.CurrencyService/Convert", +}; + +std::unique_ptr< CurrencyService::Stub> CurrencyService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< CurrencyService::Stub> stub(new CurrencyService::Stub(channel, options)); + return stub; +} + +CurrencyService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) + : channel_(channel), rpcmethod_GetSupportedCurrencies_(CurrencyService_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_Convert_(CurrencyService_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::Status CurrencyService::Stub::GetSupportedCurrencies(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::oteldemo::GetSupportedCurrenciesResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::oteldemo::Empty, ::oteldemo::GetSupportedCurrenciesResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_GetSupportedCurrencies_, context, request, response); +} + +void CurrencyService::Stub::async::GetSupportedCurrencies(::grpc::ClientContext* context, const ::oteldemo::Empty* request, ::oteldemo::GetSupportedCurrenciesResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::oteldemo::Empty, ::oteldemo::GetSupportedCurrenciesResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetSupportedCurrencies_, context, request, response, std::move(f)); +} + +void CurrencyService::Stub::async::GetSupportedCurrencies(::grpc::ClientContext* context, const ::oteldemo::Empty* request, ::oteldemo::GetSupportedCurrenciesResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetSupportedCurrencies_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::GetSupportedCurrenciesResponse>* CurrencyService::Stub::PrepareAsyncGetSupportedCurrenciesRaw(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::oteldemo::GetSupportedCurrenciesResponse, ::oteldemo::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_GetSupportedCurrencies_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::GetSupportedCurrenciesResponse>* CurrencyService::Stub::AsyncGetSupportedCurrenciesRaw(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncGetSupportedCurrenciesRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CurrencyService::Stub::Convert(::grpc::ClientContext* context, const ::oteldemo::CurrencyConversionRequest& request, ::oteldemo::Money* response) { + return ::grpc::internal::BlockingUnaryCall< ::oteldemo::CurrencyConversionRequest, ::oteldemo::Money, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Convert_, context, request, response); +} + +void CurrencyService::Stub::async::Convert(::grpc::ClientContext* context, const ::oteldemo::CurrencyConversionRequest* request, ::oteldemo::Money* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::oteldemo::CurrencyConversionRequest, ::oteldemo::Money, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Convert_, context, request, response, std::move(f)); +} + +void CurrencyService::Stub::async::Convert(::grpc::ClientContext* context, const ::oteldemo::CurrencyConversionRequest* request, ::oteldemo::Money* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Convert_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::Money>* CurrencyService::Stub::PrepareAsyncConvertRaw(::grpc::ClientContext* context, const ::oteldemo::CurrencyConversionRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::oteldemo::Money, ::oteldemo::CurrencyConversionRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Convert_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::Money>* CurrencyService::Stub::AsyncConvertRaw(::grpc::ClientContext* context, const ::oteldemo::CurrencyConversionRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncConvertRaw(context, request, cq); + result->StartCall(); + return result; +} + +CurrencyService::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + CurrencyService_method_names[0], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CurrencyService::Service, ::oteldemo::Empty, ::oteldemo::GetSupportedCurrenciesResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CurrencyService::Service* service, + ::grpc::ServerContext* ctx, + const ::oteldemo::Empty* req, + ::oteldemo::GetSupportedCurrenciesResponse* resp) { + return service->GetSupportedCurrencies(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CurrencyService_method_names[1], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CurrencyService::Service, ::oteldemo::CurrencyConversionRequest, ::oteldemo::Money, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CurrencyService::Service* service, + ::grpc::ServerContext* ctx, + const ::oteldemo::CurrencyConversionRequest* req, + ::oteldemo::Money* resp) { + return service->Convert(ctx, req, resp); + }, this))); +} + +CurrencyService::Service::~Service() { +} + +::grpc::Status CurrencyService::Service::GetSupportedCurrencies(::grpc::ServerContext* context, const ::oteldemo::Empty* request, ::oteldemo::GetSupportedCurrenciesResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CurrencyService::Service::Convert(::grpc::ServerContext* context, const ::oteldemo::CurrencyConversionRequest* request, ::oteldemo::Money* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +static const char* PaymentService_method_names[] = { + "/oteldemo.PaymentService/Charge", +}; + +std::unique_ptr< PaymentService::Stub> PaymentService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< PaymentService::Stub> stub(new PaymentService::Stub(channel, options)); + return stub; +} + +PaymentService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) + : channel_(channel), rpcmethod_Charge_(PaymentService_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::Status PaymentService::Stub::Charge(::grpc::ClientContext* context, const ::oteldemo::ChargeRequest& request, ::oteldemo::ChargeResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::oteldemo::ChargeRequest, ::oteldemo::ChargeResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Charge_, context, request, response); +} + +void PaymentService::Stub::async::Charge(::grpc::ClientContext* context, const ::oteldemo::ChargeRequest* request, ::oteldemo::ChargeResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::oteldemo::ChargeRequest, ::oteldemo::ChargeResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Charge_, context, request, response, std::move(f)); +} + +void PaymentService::Stub::async::Charge(::grpc::ClientContext* context, const ::oteldemo::ChargeRequest* request, ::oteldemo::ChargeResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Charge_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::ChargeResponse>* PaymentService::Stub::PrepareAsyncChargeRaw(::grpc::ClientContext* context, const ::oteldemo::ChargeRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::oteldemo::ChargeResponse, ::oteldemo::ChargeRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Charge_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::ChargeResponse>* PaymentService::Stub::AsyncChargeRaw(::grpc::ClientContext* context, const ::oteldemo::ChargeRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncChargeRaw(context, request, cq); + result->StartCall(); + return result; +} + +PaymentService::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + PaymentService_method_names[0], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< PaymentService::Service, ::oteldemo::ChargeRequest, ::oteldemo::ChargeResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](PaymentService::Service* service, + ::grpc::ServerContext* ctx, + const ::oteldemo::ChargeRequest* req, + ::oteldemo::ChargeResponse* resp) { + return service->Charge(ctx, req, resp); + }, this))); +} + +PaymentService::Service::~Service() { +} + +::grpc::Status PaymentService::Service::Charge(::grpc::ServerContext* context, const ::oteldemo::ChargeRequest* request, ::oteldemo::ChargeResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +static const char* EmailService_method_names[] = { + "/oteldemo.EmailService/SendOrderConfirmation", +}; + +std::unique_ptr< EmailService::Stub> EmailService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< EmailService::Stub> stub(new EmailService::Stub(channel, options)); + return stub; +} + +EmailService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) + : channel_(channel), rpcmethod_SendOrderConfirmation_(EmailService_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::Status EmailService::Stub::SendOrderConfirmation(::grpc::ClientContext* context, const ::oteldemo::SendOrderConfirmationRequest& request, ::oteldemo::Empty* response) { + return ::grpc::internal::BlockingUnaryCall< ::oteldemo::SendOrderConfirmationRequest, ::oteldemo::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_SendOrderConfirmation_, context, request, response); +} + +void EmailService::Stub::async::SendOrderConfirmation(::grpc::ClientContext* context, const ::oteldemo::SendOrderConfirmationRequest* request, ::oteldemo::Empty* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::oteldemo::SendOrderConfirmationRequest, ::oteldemo::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SendOrderConfirmation_, context, request, response, std::move(f)); +} + +void EmailService::Stub::async::SendOrderConfirmation(::grpc::ClientContext* context, const ::oteldemo::SendOrderConfirmationRequest* request, ::oteldemo::Empty* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SendOrderConfirmation_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::Empty>* EmailService::Stub::PrepareAsyncSendOrderConfirmationRaw(::grpc::ClientContext* context, const ::oteldemo::SendOrderConfirmationRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::oteldemo::Empty, ::oteldemo::SendOrderConfirmationRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_SendOrderConfirmation_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::Empty>* EmailService::Stub::AsyncSendOrderConfirmationRaw(::grpc::ClientContext* context, const ::oteldemo::SendOrderConfirmationRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncSendOrderConfirmationRaw(context, request, cq); + result->StartCall(); + return result; +} + +EmailService::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + EmailService_method_names[0], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< EmailService::Service, ::oteldemo::SendOrderConfirmationRequest, ::oteldemo::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](EmailService::Service* service, + ::grpc::ServerContext* ctx, + const ::oteldemo::SendOrderConfirmationRequest* req, + ::oteldemo::Empty* resp) { + return service->SendOrderConfirmation(ctx, req, resp); + }, this))); +} + +EmailService::Service::~Service() { +} + +::grpc::Status EmailService::Service::SendOrderConfirmation(::grpc::ServerContext* context, const ::oteldemo::SendOrderConfirmationRequest* request, ::oteldemo::Empty* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +static const char* CheckoutService_method_names[] = { + "/oteldemo.CheckoutService/PlaceOrder", +}; + +std::unique_ptr< CheckoutService::Stub> CheckoutService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< CheckoutService::Stub> stub(new CheckoutService::Stub(channel, options)); + return stub; +} + +CheckoutService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) + : channel_(channel), rpcmethod_PlaceOrder_(CheckoutService_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::Status CheckoutService::Stub::PlaceOrder(::grpc::ClientContext* context, const ::oteldemo::PlaceOrderRequest& request, ::oteldemo::PlaceOrderResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::oteldemo::PlaceOrderRequest, ::oteldemo::PlaceOrderResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_PlaceOrder_, context, request, response); +} + +void CheckoutService::Stub::async::PlaceOrder(::grpc::ClientContext* context, const ::oteldemo::PlaceOrderRequest* request, ::oteldemo::PlaceOrderResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::oteldemo::PlaceOrderRequest, ::oteldemo::PlaceOrderResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_PlaceOrder_, context, request, response, std::move(f)); +} + +void CheckoutService::Stub::async::PlaceOrder(::grpc::ClientContext* context, const ::oteldemo::PlaceOrderRequest* request, ::oteldemo::PlaceOrderResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_PlaceOrder_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::PlaceOrderResponse>* CheckoutService::Stub::PrepareAsyncPlaceOrderRaw(::grpc::ClientContext* context, const ::oteldemo::PlaceOrderRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::oteldemo::PlaceOrderResponse, ::oteldemo::PlaceOrderRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_PlaceOrder_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::PlaceOrderResponse>* CheckoutService::Stub::AsyncPlaceOrderRaw(::grpc::ClientContext* context, const ::oteldemo::PlaceOrderRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncPlaceOrderRaw(context, request, cq); + result->StartCall(); + return result; +} + +CheckoutService::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + CheckoutService_method_names[0], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CheckoutService::Service, ::oteldemo::PlaceOrderRequest, ::oteldemo::PlaceOrderResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CheckoutService::Service* service, + ::grpc::ServerContext* ctx, + const ::oteldemo::PlaceOrderRequest* req, + ::oteldemo::PlaceOrderResponse* resp) { + return service->PlaceOrder(ctx, req, resp); + }, this))); +} + +CheckoutService::Service::~Service() { +} + +::grpc::Status CheckoutService::Service::PlaceOrder(::grpc::ServerContext* context, const ::oteldemo::PlaceOrderRequest* request, ::oteldemo::PlaceOrderResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +static const char* AdService_method_names[] = { + "/oteldemo.AdService/GetAds", +}; + +std::unique_ptr< AdService::Stub> AdService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< AdService::Stub> stub(new AdService::Stub(channel, options)); + return stub; +} + +AdService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) + : channel_(channel), rpcmethod_GetAds_(AdService_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::Status AdService::Stub::GetAds(::grpc::ClientContext* context, const ::oteldemo::AdRequest& request, ::oteldemo::AdResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::oteldemo::AdRequest, ::oteldemo::AdResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_GetAds_, context, request, response); +} + +void AdService::Stub::async::GetAds(::grpc::ClientContext* context, const ::oteldemo::AdRequest* request, ::oteldemo::AdResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::oteldemo::AdRequest, ::oteldemo::AdResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetAds_, context, request, response, std::move(f)); +} + +void AdService::Stub::async::GetAds(::grpc::ClientContext* context, const ::oteldemo::AdRequest* request, ::oteldemo::AdResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetAds_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::AdResponse>* AdService::Stub::PrepareAsyncGetAdsRaw(::grpc::ClientContext* context, const ::oteldemo::AdRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::oteldemo::AdResponse, ::oteldemo::AdRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_GetAds_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::AdResponse>* AdService::Stub::AsyncGetAdsRaw(::grpc::ClientContext* context, const ::oteldemo::AdRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncGetAdsRaw(context, request, cq); + result->StartCall(); + return result; +} + +AdService::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + AdService_method_names[0], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< AdService::Service, ::oteldemo::AdRequest, ::oteldemo::AdResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](AdService::Service* service, + ::grpc::ServerContext* ctx, + const ::oteldemo::AdRequest* req, + ::oteldemo::AdResponse* resp) { + return service->GetAds(ctx, req, resp); + }, this))); +} + +AdService::Service::~Service() { +} + +::grpc::Status AdService::Service::GetAds(::grpc::ServerContext* context, const ::oteldemo::AdRequest* request, ::oteldemo::AdResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +static const char* FeatureFlagService_method_names[] = { + "/oteldemo.FeatureFlagService/GetFlag", + "/oteldemo.FeatureFlagService/CreateFlag", + "/oteldemo.FeatureFlagService/UpdateFlag", + "/oteldemo.FeatureFlagService/ListFlags", + "/oteldemo.FeatureFlagService/DeleteFlag", +}; + +std::unique_ptr< FeatureFlagService::Stub> FeatureFlagService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< FeatureFlagService::Stub> stub(new FeatureFlagService::Stub(channel, options)); + return stub; +} + +FeatureFlagService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) + : channel_(channel), rpcmethod_GetFlag_(FeatureFlagService_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_CreateFlag_(FeatureFlagService_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_UpdateFlag_(FeatureFlagService_method_names[2], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_ListFlags_(FeatureFlagService_method_names[3], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_DeleteFlag_(FeatureFlagService_method_names[4], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::Status FeatureFlagService::Stub::GetFlag(::grpc::ClientContext* context, const ::oteldemo::GetFlagRequest& request, ::oteldemo::GetFlagResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::oteldemo::GetFlagRequest, ::oteldemo::GetFlagResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_GetFlag_, context, request, response); +} + +void FeatureFlagService::Stub::async::GetFlag(::grpc::ClientContext* context, const ::oteldemo::GetFlagRequest* request, ::oteldemo::GetFlagResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::oteldemo::GetFlagRequest, ::oteldemo::GetFlagResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetFlag_, context, request, response, std::move(f)); +} + +void FeatureFlagService::Stub::async::GetFlag(::grpc::ClientContext* context, const ::oteldemo::GetFlagRequest* request, ::oteldemo::GetFlagResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetFlag_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::GetFlagResponse>* FeatureFlagService::Stub::PrepareAsyncGetFlagRaw(::grpc::ClientContext* context, const ::oteldemo::GetFlagRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::oteldemo::GetFlagResponse, ::oteldemo::GetFlagRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_GetFlag_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::GetFlagResponse>* FeatureFlagService::Stub::AsyncGetFlagRaw(::grpc::ClientContext* context, const ::oteldemo::GetFlagRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncGetFlagRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status FeatureFlagService::Stub::CreateFlag(::grpc::ClientContext* context, const ::oteldemo::CreateFlagRequest& request, ::oteldemo::CreateFlagResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::oteldemo::CreateFlagRequest, ::oteldemo::CreateFlagResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_CreateFlag_, context, request, response); +} + +void FeatureFlagService::Stub::async::CreateFlag(::grpc::ClientContext* context, const ::oteldemo::CreateFlagRequest* request, ::oteldemo::CreateFlagResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::oteldemo::CreateFlagRequest, ::oteldemo::CreateFlagResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_CreateFlag_, context, request, response, std::move(f)); +} + +void FeatureFlagService::Stub::async::CreateFlag(::grpc::ClientContext* context, const ::oteldemo::CreateFlagRequest* request, ::oteldemo::CreateFlagResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_CreateFlag_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::CreateFlagResponse>* FeatureFlagService::Stub::PrepareAsyncCreateFlagRaw(::grpc::ClientContext* context, const ::oteldemo::CreateFlagRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::oteldemo::CreateFlagResponse, ::oteldemo::CreateFlagRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_CreateFlag_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::CreateFlagResponse>* FeatureFlagService::Stub::AsyncCreateFlagRaw(::grpc::ClientContext* context, const ::oteldemo::CreateFlagRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncCreateFlagRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status FeatureFlagService::Stub::UpdateFlag(::grpc::ClientContext* context, const ::oteldemo::UpdateFlagRequest& request, ::oteldemo::UpdateFlagResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::oteldemo::UpdateFlagRequest, ::oteldemo::UpdateFlagResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_UpdateFlag_, context, request, response); +} + +void FeatureFlagService::Stub::async::UpdateFlag(::grpc::ClientContext* context, const ::oteldemo::UpdateFlagRequest* request, ::oteldemo::UpdateFlagResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::oteldemo::UpdateFlagRequest, ::oteldemo::UpdateFlagResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_UpdateFlag_, context, request, response, std::move(f)); +} + +void FeatureFlagService::Stub::async::UpdateFlag(::grpc::ClientContext* context, const ::oteldemo::UpdateFlagRequest* request, ::oteldemo::UpdateFlagResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_UpdateFlag_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::UpdateFlagResponse>* FeatureFlagService::Stub::PrepareAsyncUpdateFlagRaw(::grpc::ClientContext* context, const ::oteldemo::UpdateFlagRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::oteldemo::UpdateFlagResponse, ::oteldemo::UpdateFlagRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_UpdateFlag_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::UpdateFlagResponse>* FeatureFlagService::Stub::AsyncUpdateFlagRaw(::grpc::ClientContext* context, const ::oteldemo::UpdateFlagRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncUpdateFlagRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status FeatureFlagService::Stub::ListFlags(::grpc::ClientContext* context, const ::oteldemo::ListFlagsRequest& request, ::oteldemo::ListFlagsResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::oteldemo::ListFlagsRequest, ::oteldemo::ListFlagsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_ListFlags_, context, request, response); +} + +void FeatureFlagService::Stub::async::ListFlags(::grpc::ClientContext* context, const ::oteldemo::ListFlagsRequest* request, ::oteldemo::ListFlagsResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::oteldemo::ListFlagsRequest, ::oteldemo::ListFlagsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ListFlags_, context, request, response, std::move(f)); +} + +void FeatureFlagService::Stub::async::ListFlags(::grpc::ClientContext* context, const ::oteldemo::ListFlagsRequest* request, ::oteldemo::ListFlagsResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ListFlags_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::ListFlagsResponse>* FeatureFlagService::Stub::PrepareAsyncListFlagsRaw(::grpc::ClientContext* context, const ::oteldemo::ListFlagsRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::oteldemo::ListFlagsResponse, ::oteldemo::ListFlagsRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_ListFlags_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::ListFlagsResponse>* FeatureFlagService::Stub::AsyncListFlagsRaw(::grpc::ClientContext* context, const ::oteldemo::ListFlagsRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncListFlagsRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status FeatureFlagService::Stub::DeleteFlag(::grpc::ClientContext* context, const ::oteldemo::DeleteFlagRequest& request, ::oteldemo::DeleteFlagResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::oteldemo::DeleteFlagRequest, ::oteldemo::DeleteFlagResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_DeleteFlag_, context, request, response); +} + +void FeatureFlagService::Stub::async::DeleteFlag(::grpc::ClientContext* context, const ::oteldemo::DeleteFlagRequest* request, ::oteldemo::DeleteFlagResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::oteldemo::DeleteFlagRequest, ::oteldemo::DeleteFlagResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_DeleteFlag_, context, request, response, std::move(f)); +} + +void FeatureFlagService::Stub::async::DeleteFlag(::grpc::ClientContext* context, const ::oteldemo::DeleteFlagRequest* request, ::oteldemo::DeleteFlagResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_DeleteFlag_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::DeleteFlagResponse>* FeatureFlagService::Stub::PrepareAsyncDeleteFlagRaw(::grpc::ClientContext* context, const ::oteldemo::DeleteFlagRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::oteldemo::DeleteFlagResponse, ::oteldemo::DeleteFlagRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_DeleteFlag_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::DeleteFlagResponse>* FeatureFlagService::Stub::AsyncDeleteFlagRaw(::grpc::ClientContext* context, const ::oteldemo::DeleteFlagRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncDeleteFlagRaw(context, request, cq); + result->StartCall(); + return result; +} + +FeatureFlagService::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + FeatureFlagService_method_names[0], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< FeatureFlagService::Service, ::oteldemo::GetFlagRequest, ::oteldemo::GetFlagResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](FeatureFlagService::Service* service, + ::grpc::ServerContext* ctx, + const ::oteldemo::GetFlagRequest* req, + ::oteldemo::GetFlagResponse* resp) { + return service->GetFlag(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + FeatureFlagService_method_names[1], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< FeatureFlagService::Service, ::oteldemo::CreateFlagRequest, ::oteldemo::CreateFlagResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](FeatureFlagService::Service* service, + ::grpc::ServerContext* ctx, + const ::oteldemo::CreateFlagRequest* req, + ::oteldemo::CreateFlagResponse* resp) { + return service->CreateFlag(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + FeatureFlagService_method_names[2], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< FeatureFlagService::Service, ::oteldemo::UpdateFlagRequest, ::oteldemo::UpdateFlagResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](FeatureFlagService::Service* service, + ::grpc::ServerContext* ctx, + const ::oteldemo::UpdateFlagRequest* req, + ::oteldemo::UpdateFlagResponse* resp) { + return service->UpdateFlag(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + FeatureFlagService_method_names[3], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< FeatureFlagService::Service, ::oteldemo::ListFlagsRequest, ::oteldemo::ListFlagsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](FeatureFlagService::Service* service, + ::grpc::ServerContext* ctx, + const ::oteldemo::ListFlagsRequest* req, + ::oteldemo::ListFlagsResponse* resp) { + return service->ListFlags(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + FeatureFlagService_method_names[4], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< FeatureFlagService::Service, ::oteldemo::DeleteFlagRequest, ::oteldemo::DeleteFlagResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](FeatureFlagService::Service* service, + ::grpc::ServerContext* ctx, + const ::oteldemo::DeleteFlagRequest* req, + ::oteldemo::DeleteFlagResponse* resp) { + return service->DeleteFlag(ctx, req, resp); + }, this))); +} + +FeatureFlagService::Service::~Service() { +} + +::grpc::Status FeatureFlagService::Service::GetFlag(::grpc::ServerContext* context, const ::oteldemo::GetFlagRequest* request, ::oteldemo::GetFlagResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status FeatureFlagService::Service::CreateFlag(::grpc::ServerContext* context, const ::oteldemo::CreateFlagRequest* request, ::oteldemo::CreateFlagResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status FeatureFlagService::Service::UpdateFlag(::grpc::ServerContext* context, const ::oteldemo::UpdateFlagRequest* request, ::oteldemo::UpdateFlagResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status FeatureFlagService::Service::ListFlags(::grpc::ServerContext* context, const ::oteldemo::ListFlagsRequest* request, ::oteldemo::ListFlagsResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status FeatureFlagService::Service::DeleteFlag(::grpc::ServerContext* context, const ::oteldemo::DeleteFlagRequest* request, ::oteldemo::DeleteFlagResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +} // namespace oteldemo + diff --git a/src/currency/build/generated/proto/demo.grpc.pb.h b/src/currency/build/generated/proto/demo.grpc.pb.h new file mode 100644 index 0000000000..82871733e9 --- /dev/null +++ b/src/currency/build/generated/proto/demo.grpc.pb.h @@ -0,0 +1,3708 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: demo.proto +// Original file comments: +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#ifndef GRPC_demo_2eproto__INCLUDED +#define GRPC_demo_2eproto__INCLUDED + +#include "demo.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace oteldemo { + +// -----------------Cart service----------------- +// +class CartService final { + public: + static constexpr char const* service_full_name() { + return "oteldemo.CartService"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + virtual ::grpc::Status AddItem(::grpc::ClientContext* context, const ::oteldemo::AddItemRequest& request, ::oteldemo::Empty* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Empty>> AsyncAddItem(::grpc::ClientContext* context, const ::oteldemo::AddItemRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Empty>>(AsyncAddItemRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Empty>> PrepareAsyncAddItem(::grpc::ClientContext* context, const ::oteldemo::AddItemRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Empty>>(PrepareAsyncAddItemRaw(context, request, cq)); + } + virtual ::grpc::Status GetCart(::grpc::ClientContext* context, const ::oteldemo::GetCartRequest& request, ::oteldemo::Cart* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Cart>> AsyncGetCart(::grpc::ClientContext* context, const ::oteldemo::GetCartRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Cart>>(AsyncGetCartRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Cart>> PrepareAsyncGetCart(::grpc::ClientContext* context, const ::oteldemo::GetCartRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Cart>>(PrepareAsyncGetCartRaw(context, request, cq)); + } + virtual ::grpc::Status EmptyCart(::grpc::ClientContext* context, const ::oteldemo::EmptyCartRequest& request, ::oteldemo::Empty* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Empty>> AsyncEmptyCart(::grpc::ClientContext* context, const ::oteldemo::EmptyCartRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Empty>>(AsyncEmptyCartRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Empty>> PrepareAsyncEmptyCart(::grpc::ClientContext* context, const ::oteldemo::EmptyCartRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Empty>>(PrepareAsyncEmptyCartRaw(context, request, cq)); + } + class async_interface { + public: + virtual ~async_interface() {} + virtual void AddItem(::grpc::ClientContext* context, const ::oteldemo::AddItemRequest* request, ::oteldemo::Empty* response, std::function) = 0; + virtual void AddItem(::grpc::ClientContext* context, const ::oteldemo::AddItemRequest* request, ::oteldemo::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void GetCart(::grpc::ClientContext* context, const ::oteldemo::GetCartRequest* request, ::oteldemo::Cart* response, std::function) = 0; + virtual void GetCart(::grpc::ClientContext* context, const ::oteldemo::GetCartRequest* request, ::oteldemo::Cart* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void EmptyCart(::grpc::ClientContext* context, const ::oteldemo::EmptyCartRequest* request, ::oteldemo::Empty* response, std::function) = 0; + virtual void EmptyCart(::grpc::ClientContext* context, const ::oteldemo::EmptyCartRequest* request, ::oteldemo::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0; + }; + typedef class async_interface experimental_async_interface; + virtual class async_interface* async() { return nullptr; } + class async_interface* experimental_async() { return async(); } + private: + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Empty>* AsyncAddItemRaw(::grpc::ClientContext* context, const ::oteldemo::AddItemRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Empty>* PrepareAsyncAddItemRaw(::grpc::ClientContext* context, const ::oteldemo::AddItemRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Cart>* AsyncGetCartRaw(::grpc::ClientContext* context, const ::oteldemo::GetCartRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Cart>* PrepareAsyncGetCartRaw(::grpc::ClientContext* context, const ::oteldemo::GetCartRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Empty>* AsyncEmptyCartRaw(::grpc::ClientContext* context, const ::oteldemo::EmptyCartRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Empty>* PrepareAsyncEmptyCartRaw(::grpc::ClientContext* context, const ::oteldemo::EmptyCartRequest& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + ::grpc::Status AddItem(::grpc::ClientContext* context, const ::oteldemo::AddItemRequest& request, ::oteldemo::Empty* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::Empty>> AsyncAddItem(::grpc::ClientContext* context, const ::oteldemo::AddItemRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::Empty>>(AsyncAddItemRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::Empty>> PrepareAsyncAddItem(::grpc::ClientContext* context, const ::oteldemo::AddItemRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::Empty>>(PrepareAsyncAddItemRaw(context, request, cq)); + } + ::grpc::Status GetCart(::grpc::ClientContext* context, const ::oteldemo::GetCartRequest& request, ::oteldemo::Cart* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::Cart>> AsyncGetCart(::grpc::ClientContext* context, const ::oteldemo::GetCartRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::Cart>>(AsyncGetCartRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::Cart>> PrepareAsyncGetCart(::grpc::ClientContext* context, const ::oteldemo::GetCartRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::Cart>>(PrepareAsyncGetCartRaw(context, request, cq)); + } + ::grpc::Status EmptyCart(::grpc::ClientContext* context, const ::oteldemo::EmptyCartRequest& request, ::oteldemo::Empty* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::Empty>> AsyncEmptyCart(::grpc::ClientContext* context, const ::oteldemo::EmptyCartRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::Empty>>(AsyncEmptyCartRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::Empty>> PrepareAsyncEmptyCart(::grpc::ClientContext* context, const ::oteldemo::EmptyCartRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::Empty>>(PrepareAsyncEmptyCartRaw(context, request, cq)); + } + class async final : + public StubInterface::async_interface { + public: + void AddItem(::grpc::ClientContext* context, const ::oteldemo::AddItemRequest* request, ::oteldemo::Empty* response, std::function) override; + void AddItem(::grpc::ClientContext* context, const ::oteldemo::AddItemRequest* request, ::oteldemo::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; + void GetCart(::grpc::ClientContext* context, const ::oteldemo::GetCartRequest* request, ::oteldemo::Cart* response, std::function) override; + void GetCart(::grpc::ClientContext* context, const ::oteldemo::GetCartRequest* request, ::oteldemo::Cart* response, ::grpc::ClientUnaryReactor* reactor) override; + void EmptyCart(::grpc::ClientContext* context, const ::oteldemo::EmptyCartRequest* request, ::oteldemo::Empty* response, std::function) override; + void EmptyCart(::grpc::ClientContext* context, const ::oteldemo::EmptyCartRequest* request, ::oteldemo::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; + private: + friend class Stub; + explicit async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class async* async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class async async_stub_{this}; + ::grpc::ClientAsyncResponseReader< ::oteldemo::Empty>* AsyncAddItemRaw(::grpc::ClientContext* context, const ::oteldemo::AddItemRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::Empty>* PrepareAsyncAddItemRaw(::grpc::ClientContext* context, const ::oteldemo::AddItemRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::Cart>* AsyncGetCartRaw(::grpc::ClientContext* context, const ::oteldemo::GetCartRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::Cart>* PrepareAsyncGetCartRaw(::grpc::ClientContext* context, const ::oteldemo::GetCartRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::Empty>* AsyncEmptyCartRaw(::grpc::ClientContext* context, const ::oteldemo::EmptyCartRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::Empty>* PrepareAsyncEmptyCartRaw(::grpc::ClientContext* context, const ::oteldemo::EmptyCartRequest& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_AddItem_; + const ::grpc::internal::RpcMethod rpcmethod_GetCart_; + const ::grpc::internal::RpcMethod rpcmethod_EmptyCart_; + }; + 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(); + virtual ::grpc::Status AddItem(::grpc::ServerContext* context, const ::oteldemo::AddItemRequest* request, ::oteldemo::Empty* response); + virtual ::grpc::Status GetCart(::grpc::ServerContext* context, const ::oteldemo::GetCartRequest* request, ::oteldemo::Cart* response); + virtual ::grpc::Status EmptyCart(::grpc::ServerContext* context, const ::oteldemo::EmptyCartRequest* request, ::oteldemo::Empty* response); + }; + template + class WithAsyncMethod_AddItem : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_AddItem() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_AddItem() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AddItem(::grpc::ServerContext* /*context*/, const ::oteldemo::AddItemRequest* /*request*/, ::oteldemo::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestAddItem(::grpc::ServerContext* context, ::oteldemo::AddItemRequest* request, ::grpc::ServerAsyncResponseWriter< ::oteldemo::Empty>* 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_GetCart : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_GetCart() { + ::grpc::Service::MarkMethodAsync(1); + } + ~WithAsyncMethod_GetCart() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetCart(::grpc::ServerContext* /*context*/, const ::oteldemo::GetCartRequest* /*request*/, ::oteldemo::Cart* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetCart(::grpc::ServerContext* context, ::oteldemo::GetCartRequest* request, ::grpc::ServerAsyncResponseWriter< ::oteldemo::Cart>* 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_EmptyCart : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_EmptyCart() { + ::grpc::Service::MarkMethodAsync(2); + } + ~WithAsyncMethod_EmptyCart() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status EmptyCart(::grpc::ServerContext* /*context*/, const ::oteldemo::EmptyCartRequest* /*request*/, ::oteldemo::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestEmptyCart(::grpc::ServerContext* context, ::oteldemo::EmptyCartRequest* request, ::grpc::ServerAsyncResponseWriter< ::oteldemo::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_AddItem > > AsyncService; + template + class WithCallbackMethod_AddItem : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_AddItem() { + ::grpc::Service::MarkMethodCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::oteldemo::AddItemRequest, ::oteldemo::Empty>( + [this]( + ::grpc::CallbackServerContext* context, const ::oteldemo::AddItemRequest* request, ::oteldemo::Empty* response) { return this->AddItem(context, request, response); }));} + void SetMessageAllocatorFor_AddItem( + ::grpc::MessageAllocator< ::oteldemo::AddItemRequest, ::oteldemo::Empty>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); + static_cast<::grpc::internal::CallbackUnaryHandler< ::oteldemo::AddItemRequest, ::oteldemo::Empty>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_AddItem() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AddItem(::grpc::ServerContext* /*context*/, const ::oteldemo::AddItemRequest* /*request*/, ::oteldemo::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* AddItem( + ::grpc::CallbackServerContext* /*context*/, const ::oteldemo::AddItemRequest* /*request*/, ::oteldemo::Empty* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_GetCart : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_GetCart() { + ::grpc::Service::MarkMethodCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::oteldemo::GetCartRequest, ::oteldemo::Cart>( + [this]( + ::grpc::CallbackServerContext* context, const ::oteldemo::GetCartRequest* request, ::oteldemo::Cart* response) { return this->GetCart(context, request, response); }));} + void SetMessageAllocatorFor_GetCart( + ::grpc::MessageAllocator< ::oteldemo::GetCartRequest, ::oteldemo::Cart>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1); + static_cast<::grpc::internal::CallbackUnaryHandler< ::oteldemo::GetCartRequest, ::oteldemo::Cart>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_GetCart() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetCart(::grpc::ServerContext* /*context*/, const ::oteldemo::GetCartRequest* /*request*/, ::oteldemo::Cart* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* GetCart( + ::grpc::CallbackServerContext* /*context*/, const ::oteldemo::GetCartRequest* /*request*/, ::oteldemo::Cart* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_EmptyCart : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_EmptyCart() { + ::grpc::Service::MarkMethodCallback(2, + new ::grpc::internal::CallbackUnaryHandler< ::oteldemo::EmptyCartRequest, ::oteldemo::Empty>( + [this]( + ::grpc::CallbackServerContext* context, const ::oteldemo::EmptyCartRequest* request, ::oteldemo::Empty* response) { return this->EmptyCart(context, request, response); }));} + void SetMessageAllocatorFor_EmptyCart( + ::grpc::MessageAllocator< ::oteldemo::EmptyCartRequest, ::oteldemo::Empty>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(2); + static_cast<::grpc::internal::CallbackUnaryHandler< ::oteldemo::EmptyCartRequest, ::oteldemo::Empty>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_EmptyCart() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status EmptyCart(::grpc::ServerContext* /*context*/, const ::oteldemo::EmptyCartRequest* /*request*/, ::oteldemo::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* EmptyCart( + ::grpc::CallbackServerContext* /*context*/, const ::oteldemo::EmptyCartRequest* /*request*/, ::oteldemo::Empty* /*response*/) { return nullptr; } + }; + typedef WithCallbackMethod_AddItem > > CallbackService; + typedef CallbackService ExperimentalCallbackService; + template + class WithGenericMethod_AddItem : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_AddItem() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_AddItem() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AddItem(::grpc::ServerContext* /*context*/, const ::oteldemo::AddItemRequest* /*request*/, ::oteldemo::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_GetCart : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_GetCart() { + ::grpc::Service::MarkMethodGeneric(1); + } + ~WithGenericMethod_GetCart() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetCart(::grpc::ServerContext* /*context*/, const ::oteldemo::GetCartRequest* /*request*/, ::oteldemo::Cart* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_EmptyCart : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_EmptyCart() { + ::grpc::Service::MarkMethodGeneric(2); + } + ~WithGenericMethod_EmptyCart() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status EmptyCart(::grpc::ServerContext* /*context*/, const ::oteldemo::EmptyCartRequest* /*request*/, ::oteldemo::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_AddItem : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_AddItem() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_AddItem() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AddItem(::grpc::ServerContext* /*context*/, const ::oteldemo::AddItemRequest* /*request*/, ::oteldemo::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestAddItem(::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_GetCart : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_GetCart() { + ::grpc::Service::MarkMethodRaw(1); + } + ~WithRawMethod_GetCart() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetCart(::grpc::ServerContext* /*context*/, const ::oteldemo::GetCartRequest* /*request*/, ::oteldemo::Cart* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetCart(::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_EmptyCart : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_EmptyCart() { + ::grpc::Service::MarkMethodRaw(2); + } + ~WithRawMethod_EmptyCart() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status EmptyCart(::grpc::ServerContext* /*context*/, const ::oteldemo::EmptyCartRequest* /*request*/, ::oteldemo::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestEmptyCart(::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 WithRawCallbackMethod_AddItem : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_AddItem() { + ::grpc::Service::MarkMethodRawCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->AddItem(context, request, response); })); + } + ~WithRawCallbackMethod_AddItem() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AddItem(::grpc::ServerContext* /*context*/, const ::oteldemo::AddItemRequest* /*request*/, ::oteldemo::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* AddItem( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_GetCart : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_GetCart() { + ::grpc::Service::MarkMethodRawCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->GetCart(context, request, response); })); + } + ~WithRawCallbackMethod_GetCart() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetCart(::grpc::ServerContext* /*context*/, const ::oteldemo::GetCartRequest* /*request*/, ::oteldemo::Cart* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* GetCart( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_EmptyCart : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_EmptyCart() { + ::grpc::Service::MarkMethodRawCallback(2, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->EmptyCart(context, request, response); })); + } + ~WithRawCallbackMethod_EmptyCart() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status EmptyCart(::grpc::ServerContext* /*context*/, const ::oteldemo::EmptyCartRequest* /*request*/, ::oteldemo::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* EmptyCart( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithStreamedUnaryMethod_AddItem : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_AddItem() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::StreamedUnaryHandler< + ::oteldemo::AddItemRequest, ::oteldemo::Empty>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::oteldemo::AddItemRequest, ::oteldemo::Empty>* streamer) { + return this->StreamedAddItem(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_AddItem() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status AddItem(::grpc::ServerContext* /*context*/, const ::oteldemo::AddItemRequest* /*request*/, ::oteldemo::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedAddItem(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::oteldemo::AddItemRequest,::oteldemo::Empty>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_GetCart : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_GetCart() { + ::grpc::Service::MarkMethodStreamed(1, + new ::grpc::internal::StreamedUnaryHandler< + ::oteldemo::GetCartRequest, ::oteldemo::Cart>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::oteldemo::GetCartRequest, ::oteldemo::Cart>* streamer) { + return this->StreamedGetCart(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_GetCart() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status GetCart(::grpc::ServerContext* /*context*/, const ::oteldemo::GetCartRequest* /*request*/, ::oteldemo::Cart* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedGetCart(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::oteldemo::GetCartRequest,::oteldemo::Cart>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_EmptyCart : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_EmptyCart() { + ::grpc::Service::MarkMethodStreamed(2, + new ::grpc::internal::StreamedUnaryHandler< + ::oteldemo::EmptyCartRequest, ::oteldemo::Empty>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::oteldemo::EmptyCartRequest, ::oteldemo::Empty>* streamer) { + return this->StreamedEmptyCart(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_EmptyCart() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status EmptyCart(::grpc::ServerContext* /*context*/, const ::oteldemo::EmptyCartRequest* /*request*/, ::oteldemo::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedEmptyCart(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::oteldemo::EmptyCartRequest,::oteldemo::Empty>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_AddItem > > StreamedUnaryService; + typedef Service SplitStreamedService; + typedef WithStreamedUnaryMethod_AddItem > > StreamedService; +}; + +// ---------------Recommendation service---------- +// +class RecommendationService final { + public: + static constexpr char const* service_full_name() { + return "oteldemo.RecommendationService"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + virtual ::grpc::Status ListRecommendations(::grpc::ClientContext* context, const ::oteldemo::ListRecommendationsRequest& request, ::oteldemo::ListRecommendationsResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ListRecommendationsResponse>> AsyncListRecommendations(::grpc::ClientContext* context, const ::oteldemo::ListRecommendationsRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ListRecommendationsResponse>>(AsyncListRecommendationsRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ListRecommendationsResponse>> PrepareAsyncListRecommendations(::grpc::ClientContext* context, const ::oteldemo::ListRecommendationsRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ListRecommendationsResponse>>(PrepareAsyncListRecommendationsRaw(context, request, cq)); + } + class async_interface { + public: + virtual ~async_interface() {} + virtual void ListRecommendations(::grpc::ClientContext* context, const ::oteldemo::ListRecommendationsRequest* request, ::oteldemo::ListRecommendationsResponse* response, std::function) = 0; + virtual void ListRecommendations(::grpc::ClientContext* context, const ::oteldemo::ListRecommendationsRequest* request, ::oteldemo::ListRecommendationsResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + }; + typedef class async_interface experimental_async_interface; + virtual class async_interface* async() { return nullptr; } + class async_interface* experimental_async() { return async(); } + private: + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ListRecommendationsResponse>* AsyncListRecommendationsRaw(::grpc::ClientContext* context, const ::oteldemo::ListRecommendationsRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ListRecommendationsResponse>* PrepareAsyncListRecommendationsRaw(::grpc::ClientContext* context, const ::oteldemo::ListRecommendationsRequest& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + ::grpc::Status ListRecommendations(::grpc::ClientContext* context, const ::oteldemo::ListRecommendationsRequest& request, ::oteldemo::ListRecommendationsResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::ListRecommendationsResponse>> AsyncListRecommendations(::grpc::ClientContext* context, const ::oteldemo::ListRecommendationsRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::ListRecommendationsResponse>>(AsyncListRecommendationsRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::ListRecommendationsResponse>> PrepareAsyncListRecommendations(::grpc::ClientContext* context, const ::oteldemo::ListRecommendationsRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::ListRecommendationsResponse>>(PrepareAsyncListRecommendationsRaw(context, request, cq)); + } + class async final : + public StubInterface::async_interface { + public: + void ListRecommendations(::grpc::ClientContext* context, const ::oteldemo::ListRecommendationsRequest* request, ::oteldemo::ListRecommendationsResponse* response, std::function) override; + void ListRecommendations(::grpc::ClientContext* context, const ::oteldemo::ListRecommendationsRequest* request, ::oteldemo::ListRecommendationsResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + private: + friend class Stub; + explicit async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class async* async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class async async_stub_{this}; + ::grpc::ClientAsyncResponseReader< ::oteldemo::ListRecommendationsResponse>* AsyncListRecommendationsRaw(::grpc::ClientContext* context, const ::oteldemo::ListRecommendationsRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::ListRecommendationsResponse>* PrepareAsyncListRecommendationsRaw(::grpc::ClientContext* context, const ::oteldemo::ListRecommendationsRequest& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_ListRecommendations_; + }; + 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(); + virtual ::grpc::Status ListRecommendations(::grpc::ServerContext* context, const ::oteldemo::ListRecommendationsRequest* request, ::oteldemo::ListRecommendationsResponse* response); + }; + template + class WithAsyncMethod_ListRecommendations : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_ListRecommendations() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_ListRecommendations() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListRecommendations(::grpc::ServerContext* /*context*/, const ::oteldemo::ListRecommendationsRequest* /*request*/, ::oteldemo::ListRecommendationsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestListRecommendations(::grpc::ServerContext* context, ::oteldemo::ListRecommendationsRequest* request, ::grpc::ServerAsyncResponseWriter< ::oteldemo::ListRecommendationsResponse>* 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); + } + }; + typedef WithAsyncMethod_ListRecommendations AsyncService; + template + class WithCallbackMethod_ListRecommendations : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_ListRecommendations() { + ::grpc::Service::MarkMethodCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::oteldemo::ListRecommendationsRequest, ::oteldemo::ListRecommendationsResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::oteldemo::ListRecommendationsRequest* request, ::oteldemo::ListRecommendationsResponse* response) { return this->ListRecommendations(context, request, response); }));} + void SetMessageAllocatorFor_ListRecommendations( + ::grpc::MessageAllocator< ::oteldemo::ListRecommendationsRequest, ::oteldemo::ListRecommendationsResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); + static_cast<::grpc::internal::CallbackUnaryHandler< ::oteldemo::ListRecommendationsRequest, ::oteldemo::ListRecommendationsResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_ListRecommendations() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListRecommendations(::grpc::ServerContext* /*context*/, const ::oteldemo::ListRecommendationsRequest* /*request*/, ::oteldemo::ListRecommendationsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* ListRecommendations( + ::grpc::CallbackServerContext* /*context*/, const ::oteldemo::ListRecommendationsRequest* /*request*/, ::oteldemo::ListRecommendationsResponse* /*response*/) { return nullptr; } + }; + typedef WithCallbackMethod_ListRecommendations CallbackService; + typedef CallbackService ExperimentalCallbackService; + template + class WithGenericMethod_ListRecommendations : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_ListRecommendations() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_ListRecommendations() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListRecommendations(::grpc::ServerContext* /*context*/, const ::oteldemo::ListRecommendationsRequest* /*request*/, ::oteldemo::ListRecommendationsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_ListRecommendations : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_ListRecommendations() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_ListRecommendations() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListRecommendations(::grpc::ServerContext* /*context*/, const ::oteldemo::ListRecommendationsRequest* /*request*/, ::oteldemo::ListRecommendationsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestListRecommendations(::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 WithRawCallbackMethod_ListRecommendations : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_ListRecommendations() { + ::grpc::Service::MarkMethodRawCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->ListRecommendations(context, request, response); })); + } + ~WithRawCallbackMethod_ListRecommendations() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListRecommendations(::grpc::ServerContext* /*context*/, const ::oteldemo::ListRecommendationsRequest* /*request*/, ::oteldemo::ListRecommendationsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* ListRecommendations( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithStreamedUnaryMethod_ListRecommendations : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_ListRecommendations() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::StreamedUnaryHandler< + ::oteldemo::ListRecommendationsRequest, ::oteldemo::ListRecommendationsResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::oteldemo::ListRecommendationsRequest, ::oteldemo::ListRecommendationsResponse>* streamer) { + return this->StreamedListRecommendations(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_ListRecommendations() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status ListRecommendations(::grpc::ServerContext* /*context*/, const ::oteldemo::ListRecommendationsRequest* /*request*/, ::oteldemo::ListRecommendationsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedListRecommendations(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::oteldemo::ListRecommendationsRequest,::oteldemo::ListRecommendationsResponse>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_ListRecommendations StreamedUnaryService; + typedef Service SplitStreamedService; + typedef WithStreamedUnaryMethod_ListRecommendations StreamedService; +}; + +// ---------------Product Catalog---------------- +// +class ProductCatalogService final { + public: + static constexpr char const* service_full_name() { + return "oteldemo.ProductCatalogService"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + virtual ::grpc::Status ListProducts(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::oteldemo::ListProductsResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ListProductsResponse>> AsyncListProducts(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ListProductsResponse>>(AsyncListProductsRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ListProductsResponse>> PrepareAsyncListProducts(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ListProductsResponse>>(PrepareAsyncListProductsRaw(context, request, cq)); + } + virtual ::grpc::Status GetProduct(::grpc::ClientContext* context, const ::oteldemo::GetProductRequest& request, ::oteldemo::Product* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Product>> AsyncGetProduct(::grpc::ClientContext* context, const ::oteldemo::GetProductRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Product>>(AsyncGetProductRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Product>> PrepareAsyncGetProduct(::grpc::ClientContext* context, const ::oteldemo::GetProductRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Product>>(PrepareAsyncGetProductRaw(context, request, cq)); + } + virtual ::grpc::Status SearchProducts(::grpc::ClientContext* context, const ::oteldemo::SearchProductsRequest& request, ::oteldemo::SearchProductsResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::SearchProductsResponse>> AsyncSearchProducts(::grpc::ClientContext* context, const ::oteldemo::SearchProductsRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::SearchProductsResponse>>(AsyncSearchProductsRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::SearchProductsResponse>> PrepareAsyncSearchProducts(::grpc::ClientContext* context, const ::oteldemo::SearchProductsRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::SearchProductsResponse>>(PrepareAsyncSearchProductsRaw(context, request, cq)); + } + class async_interface { + public: + virtual ~async_interface() {} + virtual void ListProducts(::grpc::ClientContext* context, const ::oteldemo::Empty* request, ::oteldemo::ListProductsResponse* response, std::function) = 0; + virtual void ListProducts(::grpc::ClientContext* context, const ::oteldemo::Empty* request, ::oteldemo::ListProductsResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void GetProduct(::grpc::ClientContext* context, const ::oteldemo::GetProductRequest* request, ::oteldemo::Product* response, std::function) = 0; + virtual void GetProduct(::grpc::ClientContext* context, const ::oteldemo::GetProductRequest* request, ::oteldemo::Product* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void SearchProducts(::grpc::ClientContext* context, const ::oteldemo::SearchProductsRequest* request, ::oteldemo::SearchProductsResponse* response, std::function) = 0; + virtual void SearchProducts(::grpc::ClientContext* context, const ::oteldemo::SearchProductsRequest* request, ::oteldemo::SearchProductsResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + }; + typedef class async_interface experimental_async_interface; + virtual class async_interface* async() { return nullptr; } + class async_interface* experimental_async() { return async(); } + private: + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ListProductsResponse>* AsyncListProductsRaw(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ListProductsResponse>* PrepareAsyncListProductsRaw(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Product>* AsyncGetProductRaw(::grpc::ClientContext* context, const ::oteldemo::GetProductRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Product>* PrepareAsyncGetProductRaw(::grpc::ClientContext* context, const ::oteldemo::GetProductRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::SearchProductsResponse>* AsyncSearchProductsRaw(::grpc::ClientContext* context, const ::oteldemo::SearchProductsRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::SearchProductsResponse>* PrepareAsyncSearchProductsRaw(::grpc::ClientContext* context, const ::oteldemo::SearchProductsRequest& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + ::grpc::Status ListProducts(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::oteldemo::ListProductsResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::ListProductsResponse>> AsyncListProducts(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::ListProductsResponse>>(AsyncListProductsRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::ListProductsResponse>> PrepareAsyncListProducts(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::ListProductsResponse>>(PrepareAsyncListProductsRaw(context, request, cq)); + } + ::grpc::Status GetProduct(::grpc::ClientContext* context, const ::oteldemo::GetProductRequest& request, ::oteldemo::Product* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::Product>> AsyncGetProduct(::grpc::ClientContext* context, const ::oteldemo::GetProductRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::Product>>(AsyncGetProductRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::Product>> PrepareAsyncGetProduct(::grpc::ClientContext* context, const ::oteldemo::GetProductRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::Product>>(PrepareAsyncGetProductRaw(context, request, cq)); + } + ::grpc::Status SearchProducts(::grpc::ClientContext* context, const ::oteldemo::SearchProductsRequest& request, ::oteldemo::SearchProductsResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::SearchProductsResponse>> AsyncSearchProducts(::grpc::ClientContext* context, const ::oteldemo::SearchProductsRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::SearchProductsResponse>>(AsyncSearchProductsRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::SearchProductsResponse>> PrepareAsyncSearchProducts(::grpc::ClientContext* context, const ::oteldemo::SearchProductsRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::SearchProductsResponse>>(PrepareAsyncSearchProductsRaw(context, request, cq)); + } + class async final : + public StubInterface::async_interface { + public: + void ListProducts(::grpc::ClientContext* context, const ::oteldemo::Empty* request, ::oteldemo::ListProductsResponse* response, std::function) override; + void ListProducts(::grpc::ClientContext* context, const ::oteldemo::Empty* request, ::oteldemo::ListProductsResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void GetProduct(::grpc::ClientContext* context, const ::oteldemo::GetProductRequest* request, ::oteldemo::Product* response, std::function) override; + void GetProduct(::grpc::ClientContext* context, const ::oteldemo::GetProductRequest* request, ::oteldemo::Product* response, ::grpc::ClientUnaryReactor* reactor) override; + void SearchProducts(::grpc::ClientContext* context, const ::oteldemo::SearchProductsRequest* request, ::oteldemo::SearchProductsResponse* response, std::function) override; + void SearchProducts(::grpc::ClientContext* context, const ::oteldemo::SearchProductsRequest* request, ::oteldemo::SearchProductsResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + private: + friend class Stub; + explicit async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class async* async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class async async_stub_{this}; + ::grpc::ClientAsyncResponseReader< ::oteldemo::ListProductsResponse>* AsyncListProductsRaw(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::ListProductsResponse>* PrepareAsyncListProductsRaw(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::Product>* AsyncGetProductRaw(::grpc::ClientContext* context, const ::oteldemo::GetProductRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::Product>* PrepareAsyncGetProductRaw(::grpc::ClientContext* context, const ::oteldemo::GetProductRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::SearchProductsResponse>* AsyncSearchProductsRaw(::grpc::ClientContext* context, const ::oteldemo::SearchProductsRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::SearchProductsResponse>* PrepareAsyncSearchProductsRaw(::grpc::ClientContext* context, const ::oteldemo::SearchProductsRequest& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_ListProducts_; + const ::grpc::internal::RpcMethod rpcmethod_GetProduct_; + const ::grpc::internal::RpcMethod rpcmethod_SearchProducts_; + }; + 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(); + virtual ::grpc::Status ListProducts(::grpc::ServerContext* context, const ::oteldemo::Empty* request, ::oteldemo::ListProductsResponse* response); + virtual ::grpc::Status GetProduct(::grpc::ServerContext* context, const ::oteldemo::GetProductRequest* request, ::oteldemo::Product* response); + virtual ::grpc::Status SearchProducts(::grpc::ServerContext* context, const ::oteldemo::SearchProductsRequest* request, ::oteldemo::SearchProductsResponse* response); + }; + template + class WithAsyncMethod_ListProducts : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_ListProducts() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_ListProducts() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListProducts(::grpc::ServerContext* /*context*/, const ::oteldemo::Empty* /*request*/, ::oteldemo::ListProductsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestListProducts(::grpc::ServerContext* context, ::oteldemo::Empty* request, ::grpc::ServerAsyncResponseWriter< ::oteldemo::ListProductsResponse>* 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_GetProduct : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_GetProduct() { + ::grpc::Service::MarkMethodAsync(1); + } + ~WithAsyncMethod_GetProduct() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetProduct(::grpc::ServerContext* /*context*/, const ::oteldemo::GetProductRequest* /*request*/, ::oteldemo::Product* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetProduct(::grpc::ServerContext* context, ::oteldemo::GetProductRequest* request, ::grpc::ServerAsyncResponseWriter< ::oteldemo::Product>* 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_SearchProducts : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_SearchProducts() { + ::grpc::Service::MarkMethodAsync(2); + } + ~WithAsyncMethod_SearchProducts() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SearchProducts(::grpc::ServerContext* /*context*/, const ::oteldemo::SearchProductsRequest* /*request*/, ::oteldemo::SearchProductsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestSearchProducts(::grpc::ServerContext* context, ::oteldemo::SearchProductsRequest* request, ::grpc::ServerAsyncResponseWriter< ::oteldemo::SearchProductsResponse>* 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_ListProducts > > AsyncService; + template + class WithCallbackMethod_ListProducts : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_ListProducts() { + ::grpc::Service::MarkMethodCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::oteldemo::Empty, ::oteldemo::ListProductsResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::oteldemo::Empty* request, ::oteldemo::ListProductsResponse* response) { return this->ListProducts(context, request, response); }));} + void SetMessageAllocatorFor_ListProducts( + ::grpc::MessageAllocator< ::oteldemo::Empty, ::oteldemo::ListProductsResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); + static_cast<::grpc::internal::CallbackUnaryHandler< ::oteldemo::Empty, ::oteldemo::ListProductsResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_ListProducts() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListProducts(::grpc::ServerContext* /*context*/, const ::oteldemo::Empty* /*request*/, ::oteldemo::ListProductsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* ListProducts( + ::grpc::CallbackServerContext* /*context*/, const ::oteldemo::Empty* /*request*/, ::oteldemo::ListProductsResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_GetProduct : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_GetProduct() { + ::grpc::Service::MarkMethodCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::oteldemo::GetProductRequest, ::oteldemo::Product>( + [this]( + ::grpc::CallbackServerContext* context, const ::oteldemo::GetProductRequest* request, ::oteldemo::Product* response) { return this->GetProduct(context, request, response); }));} + void SetMessageAllocatorFor_GetProduct( + ::grpc::MessageAllocator< ::oteldemo::GetProductRequest, ::oteldemo::Product>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1); + static_cast<::grpc::internal::CallbackUnaryHandler< ::oteldemo::GetProductRequest, ::oteldemo::Product>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_GetProduct() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetProduct(::grpc::ServerContext* /*context*/, const ::oteldemo::GetProductRequest* /*request*/, ::oteldemo::Product* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* GetProduct( + ::grpc::CallbackServerContext* /*context*/, const ::oteldemo::GetProductRequest* /*request*/, ::oteldemo::Product* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_SearchProducts : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_SearchProducts() { + ::grpc::Service::MarkMethodCallback(2, + new ::grpc::internal::CallbackUnaryHandler< ::oteldemo::SearchProductsRequest, ::oteldemo::SearchProductsResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::oteldemo::SearchProductsRequest* request, ::oteldemo::SearchProductsResponse* response) { return this->SearchProducts(context, request, response); }));} + void SetMessageAllocatorFor_SearchProducts( + ::grpc::MessageAllocator< ::oteldemo::SearchProductsRequest, ::oteldemo::SearchProductsResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(2); + static_cast<::grpc::internal::CallbackUnaryHandler< ::oteldemo::SearchProductsRequest, ::oteldemo::SearchProductsResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_SearchProducts() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SearchProducts(::grpc::ServerContext* /*context*/, const ::oteldemo::SearchProductsRequest* /*request*/, ::oteldemo::SearchProductsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* SearchProducts( + ::grpc::CallbackServerContext* /*context*/, const ::oteldemo::SearchProductsRequest* /*request*/, ::oteldemo::SearchProductsResponse* /*response*/) { return nullptr; } + }; + typedef WithCallbackMethod_ListProducts > > CallbackService; + typedef CallbackService ExperimentalCallbackService; + template + class WithGenericMethod_ListProducts : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_ListProducts() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_ListProducts() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListProducts(::grpc::ServerContext* /*context*/, const ::oteldemo::Empty* /*request*/, ::oteldemo::ListProductsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_GetProduct : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_GetProduct() { + ::grpc::Service::MarkMethodGeneric(1); + } + ~WithGenericMethod_GetProduct() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetProduct(::grpc::ServerContext* /*context*/, const ::oteldemo::GetProductRequest* /*request*/, ::oteldemo::Product* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_SearchProducts : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_SearchProducts() { + ::grpc::Service::MarkMethodGeneric(2); + } + ~WithGenericMethod_SearchProducts() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SearchProducts(::grpc::ServerContext* /*context*/, const ::oteldemo::SearchProductsRequest* /*request*/, ::oteldemo::SearchProductsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_ListProducts : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_ListProducts() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_ListProducts() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListProducts(::grpc::ServerContext* /*context*/, const ::oteldemo::Empty* /*request*/, ::oteldemo::ListProductsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestListProducts(::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_GetProduct : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_GetProduct() { + ::grpc::Service::MarkMethodRaw(1); + } + ~WithRawMethod_GetProduct() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetProduct(::grpc::ServerContext* /*context*/, const ::oteldemo::GetProductRequest* /*request*/, ::oteldemo::Product* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetProduct(::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_SearchProducts : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_SearchProducts() { + ::grpc::Service::MarkMethodRaw(2); + } + ~WithRawMethod_SearchProducts() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SearchProducts(::grpc::ServerContext* /*context*/, const ::oteldemo::SearchProductsRequest* /*request*/, ::oteldemo::SearchProductsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestSearchProducts(::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 WithRawCallbackMethod_ListProducts : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_ListProducts() { + ::grpc::Service::MarkMethodRawCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->ListProducts(context, request, response); })); + } + ~WithRawCallbackMethod_ListProducts() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListProducts(::grpc::ServerContext* /*context*/, const ::oteldemo::Empty* /*request*/, ::oteldemo::ListProductsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* ListProducts( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_GetProduct : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_GetProduct() { + ::grpc::Service::MarkMethodRawCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->GetProduct(context, request, response); })); + } + ~WithRawCallbackMethod_GetProduct() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetProduct(::grpc::ServerContext* /*context*/, const ::oteldemo::GetProductRequest* /*request*/, ::oteldemo::Product* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* GetProduct( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_SearchProducts : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_SearchProducts() { + ::grpc::Service::MarkMethodRawCallback(2, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->SearchProducts(context, request, response); })); + } + ~WithRawCallbackMethod_SearchProducts() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SearchProducts(::grpc::ServerContext* /*context*/, const ::oteldemo::SearchProductsRequest* /*request*/, ::oteldemo::SearchProductsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* SearchProducts( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithStreamedUnaryMethod_ListProducts : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_ListProducts() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::StreamedUnaryHandler< + ::oteldemo::Empty, ::oteldemo::ListProductsResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::oteldemo::Empty, ::oteldemo::ListProductsResponse>* streamer) { + return this->StreamedListProducts(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_ListProducts() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status ListProducts(::grpc::ServerContext* /*context*/, const ::oteldemo::Empty* /*request*/, ::oteldemo::ListProductsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedListProducts(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::oteldemo::Empty,::oteldemo::ListProductsResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_GetProduct : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_GetProduct() { + ::grpc::Service::MarkMethodStreamed(1, + new ::grpc::internal::StreamedUnaryHandler< + ::oteldemo::GetProductRequest, ::oteldemo::Product>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::oteldemo::GetProductRequest, ::oteldemo::Product>* streamer) { + return this->StreamedGetProduct(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_GetProduct() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status GetProduct(::grpc::ServerContext* /*context*/, const ::oteldemo::GetProductRequest* /*request*/, ::oteldemo::Product* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedGetProduct(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::oteldemo::GetProductRequest,::oteldemo::Product>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_SearchProducts : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_SearchProducts() { + ::grpc::Service::MarkMethodStreamed(2, + new ::grpc::internal::StreamedUnaryHandler< + ::oteldemo::SearchProductsRequest, ::oteldemo::SearchProductsResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::oteldemo::SearchProductsRequest, ::oteldemo::SearchProductsResponse>* streamer) { + return this->StreamedSearchProducts(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_SearchProducts() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status SearchProducts(::grpc::ServerContext* /*context*/, const ::oteldemo::SearchProductsRequest* /*request*/, ::oteldemo::SearchProductsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedSearchProducts(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::oteldemo::SearchProductsRequest,::oteldemo::SearchProductsResponse>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_ListProducts > > StreamedUnaryService; + typedef Service SplitStreamedService; + typedef WithStreamedUnaryMethod_ListProducts > > StreamedService; +}; + +// ---------------Shipping Service---------- +// +class ShippingService final { + public: + static constexpr char const* service_full_name() { + return "oteldemo.ShippingService"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + virtual ::grpc::Status GetQuote(::grpc::ClientContext* context, const ::oteldemo::GetQuoteRequest& request, ::oteldemo::GetQuoteResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetQuoteResponse>> AsyncGetQuote(::grpc::ClientContext* context, const ::oteldemo::GetQuoteRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetQuoteResponse>>(AsyncGetQuoteRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetQuoteResponse>> PrepareAsyncGetQuote(::grpc::ClientContext* context, const ::oteldemo::GetQuoteRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetQuoteResponse>>(PrepareAsyncGetQuoteRaw(context, request, cq)); + } + virtual ::grpc::Status ShipOrder(::grpc::ClientContext* context, const ::oteldemo::ShipOrderRequest& request, ::oteldemo::ShipOrderResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ShipOrderResponse>> AsyncShipOrder(::grpc::ClientContext* context, const ::oteldemo::ShipOrderRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ShipOrderResponse>>(AsyncShipOrderRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ShipOrderResponse>> PrepareAsyncShipOrder(::grpc::ClientContext* context, const ::oteldemo::ShipOrderRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ShipOrderResponse>>(PrepareAsyncShipOrderRaw(context, request, cq)); + } + class async_interface { + public: + virtual ~async_interface() {} + virtual void GetQuote(::grpc::ClientContext* context, const ::oteldemo::GetQuoteRequest* request, ::oteldemo::GetQuoteResponse* response, std::function) = 0; + virtual void GetQuote(::grpc::ClientContext* context, const ::oteldemo::GetQuoteRequest* request, ::oteldemo::GetQuoteResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void ShipOrder(::grpc::ClientContext* context, const ::oteldemo::ShipOrderRequest* request, ::oteldemo::ShipOrderResponse* response, std::function) = 0; + virtual void ShipOrder(::grpc::ClientContext* context, const ::oteldemo::ShipOrderRequest* request, ::oteldemo::ShipOrderResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + }; + typedef class async_interface experimental_async_interface; + virtual class async_interface* async() { return nullptr; } + class async_interface* experimental_async() { return async(); } + private: + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetQuoteResponse>* AsyncGetQuoteRaw(::grpc::ClientContext* context, const ::oteldemo::GetQuoteRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetQuoteResponse>* PrepareAsyncGetQuoteRaw(::grpc::ClientContext* context, const ::oteldemo::GetQuoteRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ShipOrderResponse>* AsyncShipOrderRaw(::grpc::ClientContext* context, const ::oteldemo::ShipOrderRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ShipOrderResponse>* PrepareAsyncShipOrderRaw(::grpc::ClientContext* context, const ::oteldemo::ShipOrderRequest& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + ::grpc::Status GetQuote(::grpc::ClientContext* context, const ::oteldemo::GetQuoteRequest& request, ::oteldemo::GetQuoteResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::GetQuoteResponse>> AsyncGetQuote(::grpc::ClientContext* context, const ::oteldemo::GetQuoteRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::GetQuoteResponse>>(AsyncGetQuoteRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::GetQuoteResponse>> PrepareAsyncGetQuote(::grpc::ClientContext* context, const ::oteldemo::GetQuoteRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::GetQuoteResponse>>(PrepareAsyncGetQuoteRaw(context, request, cq)); + } + ::grpc::Status ShipOrder(::grpc::ClientContext* context, const ::oteldemo::ShipOrderRequest& request, ::oteldemo::ShipOrderResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::ShipOrderResponse>> AsyncShipOrder(::grpc::ClientContext* context, const ::oteldemo::ShipOrderRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::ShipOrderResponse>>(AsyncShipOrderRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::ShipOrderResponse>> PrepareAsyncShipOrder(::grpc::ClientContext* context, const ::oteldemo::ShipOrderRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::ShipOrderResponse>>(PrepareAsyncShipOrderRaw(context, request, cq)); + } + class async final : + public StubInterface::async_interface { + public: + void GetQuote(::grpc::ClientContext* context, const ::oteldemo::GetQuoteRequest* request, ::oteldemo::GetQuoteResponse* response, std::function) override; + void GetQuote(::grpc::ClientContext* context, const ::oteldemo::GetQuoteRequest* request, ::oteldemo::GetQuoteResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void ShipOrder(::grpc::ClientContext* context, const ::oteldemo::ShipOrderRequest* request, ::oteldemo::ShipOrderResponse* response, std::function) override; + void ShipOrder(::grpc::ClientContext* context, const ::oteldemo::ShipOrderRequest* request, ::oteldemo::ShipOrderResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + private: + friend class Stub; + explicit async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class async* async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class async async_stub_{this}; + ::grpc::ClientAsyncResponseReader< ::oteldemo::GetQuoteResponse>* AsyncGetQuoteRaw(::grpc::ClientContext* context, const ::oteldemo::GetQuoteRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::GetQuoteResponse>* PrepareAsyncGetQuoteRaw(::grpc::ClientContext* context, const ::oteldemo::GetQuoteRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::ShipOrderResponse>* AsyncShipOrderRaw(::grpc::ClientContext* context, const ::oteldemo::ShipOrderRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::ShipOrderResponse>* PrepareAsyncShipOrderRaw(::grpc::ClientContext* context, const ::oteldemo::ShipOrderRequest& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_GetQuote_; + const ::grpc::internal::RpcMethod rpcmethod_ShipOrder_; + }; + 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(); + virtual ::grpc::Status GetQuote(::grpc::ServerContext* context, const ::oteldemo::GetQuoteRequest* request, ::oteldemo::GetQuoteResponse* response); + virtual ::grpc::Status ShipOrder(::grpc::ServerContext* context, const ::oteldemo::ShipOrderRequest* request, ::oteldemo::ShipOrderResponse* response); + }; + template + class WithAsyncMethod_GetQuote : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_GetQuote() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_GetQuote() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetQuote(::grpc::ServerContext* /*context*/, const ::oteldemo::GetQuoteRequest* /*request*/, ::oteldemo::GetQuoteResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetQuote(::grpc::ServerContext* context, ::oteldemo::GetQuoteRequest* request, ::grpc::ServerAsyncResponseWriter< ::oteldemo::GetQuoteResponse>* 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_ShipOrder : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_ShipOrder() { + ::grpc::Service::MarkMethodAsync(1); + } + ~WithAsyncMethod_ShipOrder() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ShipOrder(::grpc::ServerContext* /*context*/, const ::oteldemo::ShipOrderRequest* /*request*/, ::oteldemo::ShipOrderResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestShipOrder(::grpc::ServerContext* context, ::oteldemo::ShipOrderRequest* request, ::grpc::ServerAsyncResponseWriter< ::oteldemo::ShipOrderResponse>* 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_GetQuote > AsyncService; + template + class WithCallbackMethod_GetQuote : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_GetQuote() { + ::grpc::Service::MarkMethodCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::oteldemo::GetQuoteRequest, ::oteldemo::GetQuoteResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::oteldemo::GetQuoteRequest* request, ::oteldemo::GetQuoteResponse* response) { return this->GetQuote(context, request, response); }));} + void SetMessageAllocatorFor_GetQuote( + ::grpc::MessageAllocator< ::oteldemo::GetQuoteRequest, ::oteldemo::GetQuoteResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); + static_cast<::grpc::internal::CallbackUnaryHandler< ::oteldemo::GetQuoteRequest, ::oteldemo::GetQuoteResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_GetQuote() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetQuote(::grpc::ServerContext* /*context*/, const ::oteldemo::GetQuoteRequest* /*request*/, ::oteldemo::GetQuoteResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* GetQuote( + ::grpc::CallbackServerContext* /*context*/, const ::oteldemo::GetQuoteRequest* /*request*/, ::oteldemo::GetQuoteResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_ShipOrder : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_ShipOrder() { + ::grpc::Service::MarkMethodCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::oteldemo::ShipOrderRequest, ::oteldemo::ShipOrderResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::oteldemo::ShipOrderRequest* request, ::oteldemo::ShipOrderResponse* response) { return this->ShipOrder(context, request, response); }));} + void SetMessageAllocatorFor_ShipOrder( + ::grpc::MessageAllocator< ::oteldemo::ShipOrderRequest, ::oteldemo::ShipOrderResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1); + static_cast<::grpc::internal::CallbackUnaryHandler< ::oteldemo::ShipOrderRequest, ::oteldemo::ShipOrderResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_ShipOrder() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ShipOrder(::grpc::ServerContext* /*context*/, const ::oteldemo::ShipOrderRequest* /*request*/, ::oteldemo::ShipOrderResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* ShipOrder( + ::grpc::CallbackServerContext* /*context*/, const ::oteldemo::ShipOrderRequest* /*request*/, ::oteldemo::ShipOrderResponse* /*response*/) { return nullptr; } + }; + typedef WithCallbackMethod_GetQuote > CallbackService; + typedef CallbackService ExperimentalCallbackService; + template + class WithGenericMethod_GetQuote : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_GetQuote() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_GetQuote() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetQuote(::grpc::ServerContext* /*context*/, const ::oteldemo::GetQuoteRequest* /*request*/, ::oteldemo::GetQuoteResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_ShipOrder : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_ShipOrder() { + ::grpc::Service::MarkMethodGeneric(1); + } + ~WithGenericMethod_ShipOrder() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ShipOrder(::grpc::ServerContext* /*context*/, const ::oteldemo::ShipOrderRequest* /*request*/, ::oteldemo::ShipOrderResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_GetQuote : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_GetQuote() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_GetQuote() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetQuote(::grpc::ServerContext* /*context*/, const ::oteldemo::GetQuoteRequest* /*request*/, ::oteldemo::GetQuoteResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetQuote(::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_ShipOrder : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_ShipOrder() { + ::grpc::Service::MarkMethodRaw(1); + } + ~WithRawMethod_ShipOrder() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ShipOrder(::grpc::ServerContext* /*context*/, const ::oteldemo::ShipOrderRequest* /*request*/, ::oteldemo::ShipOrderResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestShipOrder(::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 WithRawCallbackMethod_GetQuote : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_GetQuote() { + ::grpc::Service::MarkMethodRawCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->GetQuote(context, request, response); })); + } + ~WithRawCallbackMethod_GetQuote() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetQuote(::grpc::ServerContext* /*context*/, const ::oteldemo::GetQuoteRequest* /*request*/, ::oteldemo::GetQuoteResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* GetQuote( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_ShipOrder : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_ShipOrder() { + ::grpc::Service::MarkMethodRawCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->ShipOrder(context, request, response); })); + } + ~WithRawCallbackMethod_ShipOrder() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ShipOrder(::grpc::ServerContext* /*context*/, const ::oteldemo::ShipOrderRequest* /*request*/, ::oteldemo::ShipOrderResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* ShipOrder( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithStreamedUnaryMethod_GetQuote : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_GetQuote() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::StreamedUnaryHandler< + ::oteldemo::GetQuoteRequest, ::oteldemo::GetQuoteResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::oteldemo::GetQuoteRequest, ::oteldemo::GetQuoteResponse>* streamer) { + return this->StreamedGetQuote(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_GetQuote() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status GetQuote(::grpc::ServerContext* /*context*/, const ::oteldemo::GetQuoteRequest* /*request*/, ::oteldemo::GetQuoteResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedGetQuote(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::oteldemo::GetQuoteRequest,::oteldemo::GetQuoteResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_ShipOrder : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_ShipOrder() { + ::grpc::Service::MarkMethodStreamed(1, + new ::grpc::internal::StreamedUnaryHandler< + ::oteldemo::ShipOrderRequest, ::oteldemo::ShipOrderResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::oteldemo::ShipOrderRequest, ::oteldemo::ShipOrderResponse>* streamer) { + return this->StreamedShipOrder(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_ShipOrder() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status ShipOrder(::grpc::ServerContext* /*context*/, const ::oteldemo::ShipOrderRequest* /*request*/, ::oteldemo::ShipOrderResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedShipOrder(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::oteldemo::ShipOrderRequest,::oteldemo::ShipOrderResponse>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_GetQuote > StreamedUnaryService; + typedef Service SplitStreamedService; + typedef WithStreamedUnaryMethod_GetQuote > StreamedService; +}; + +// -----------------Currency service----------------- +// +class CurrencyService final { + public: + static constexpr char const* service_full_name() { + return "oteldemo.CurrencyService"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + virtual ::grpc::Status GetSupportedCurrencies(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::oteldemo::GetSupportedCurrenciesResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetSupportedCurrenciesResponse>> AsyncGetSupportedCurrencies(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetSupportedCurrenciesResponse>>(AsyncGetSupportedCurrenciesRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetSupportedCurrenciesResponse>> PrepareAsyncGetSupportedCurrencies(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetSupportedCurrenciesResponse>>(PrepareAsyncGetSupportedCurrenciesRaw(context, request, cq)); + } + virtual ::grpc::Status Convert(::grpc::ClientContext* context, const ::oteldemo::CurrencyConversionRequest& request, ::oteldemo::Money* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Money>> AsyncConvert(::grpc::ClientContext* context, const ::oteldemo::CurrencyConversionRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Money>>(AsyncConvertRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Money>> PrepareAsyncConvert(::grpc::ClientContext* context, const ::oteldemo::CurrencyConversionRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Money>>(PrepareAsyncConvertRaw(context, request, cq)); + } + class async_interface { + public: + virtual ~async_interface() {} + virtual void GetSupportedCurrencies(::grpc::ClientContext* context, const ::oteldemo::Empty* request, ::oteldemo::GetSupportedCurrenciesResponse* response, std::function) = 0; + virtual void GetSupportedCurrencies(::grpc::ClientContext* context, const ::oteldemo::Empty* request, ::oteldemo::GetSupportedCurrenciesResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void Convert(::grpc::ClientContext* context, const ::oteldemo::CurrencyConversionRequest* request, ::oteldemo::Money* response, std::function) = 0; + virtual void Convert(::grpc::ClientContext* context, const ::oteldemo::CurrencyConversionRequest* request, ::oteldemo::Money* response, ::grpc::ClientUnaryReactor* reactor) = 0; + }; + typedef class async_interface experimental_async_interface; + virtual class async_interface* async() { return nullptr; } + class async_interface* experimental_async() { return async(); } + private: + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetSupportedCurrenciesResponse>* AsyncGetSupportedCurrenciesRaw(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetSupportedCurrenciesResponse>* PrepareAsyncGetSupportedCurrenciesRaw(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Money>* AsyncConvertRaw(::grpc::ClientContext* context, const ::oteldemo::CurrencyConversionRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Money>* PrepareAsyncConvertRaw(::grpc::ClientContext* context, const ::oteldemo::CurrencyConversionRequest& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + ::grpc::Status GetSupportedCurrencies(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::oteldemo::GetSupportedCurrenciesResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::GetSupportedCurrenciesResponse>> AsyncGetSupportedCurrencies(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::GetSupportedCurrenciesResponse>>(AsyncGetSupportedCurrenciesRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::GetSupportedCurrenciesResponse>> PrepareAsyncGetSupportedCurrencies(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::GetSupportedCurrenciesResponse>>(PrepareAsyncGetSupportedCurrenciesRaw(context, request, cq)); + } + ::grpc::Status Convert(::grpc::ClientContext* context, const ::oteldemo::CurrencyConversionRequest& request, ::oteldemo::Money* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::Money>> AsyncConvert(::grpc::ClientContext* context, const ::oteldemo::CurrencyConversionRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::Money>>(AsyncConvertRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::Money>> PrepareAsyncConvert(::grpc::ClientContext* context, const ::oteldemo::CurrencyConversionRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::Money>>(PrepareAsyncConvertRaw(context, request, cq)); + } + class async final : + public StubInterface::async_interface { + public: + void GetSupportedCurrencies(::grpc::ClientContext* context, const ::oteldemo::Empty* request, ::oteldemo::GetSupportedCurrenciesResponse* response, std::function) override; + void GetSupportedCurrencies(::grpc::ClientContext* context, const ::oteldemo::Empty* request, ::oteldemo::GetSupportedCurrenciesResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void Convert(::grpc::ClientContext* context, const ::oteldemo::CurrencyConversionRequest* request, ::oteldemo::Money* response, std::function) override; + void Convert(::grpc::ClientContext* context, const ::oteldemo::CurrencyConversionRequest* request, ::oteldemo::Money* response, ::grpc::ClientUnaryReactor* reactor) override; + private: + friend class Stub; + explicit async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class async* async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class async async_stub_{this}; + ::grpc::ClientAsyncResponseReader< ::oteldemo::GetSupportedCurrenciesResponse>* AsyncGetSupportedCurrenciesRaw(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::GetSupportedCurrenciesResponse>* PrepareAsyncGetSupportedCurrenciesRaw(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::Money>* AsyncConvertRaw(::grpc::ClientContext* context, const ::oteldemo::CurrencyConversionRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::Money>* PrepareAsyncConvertRaw(::grpc::ClientContext* context, const ::oteldemo::CurrencyConversionRequest& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_GetSupportedCurrencies_; + const ::grpc::internal::RpcMethod rpcmethod_Convert_; + }; + 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(); + virtual ::grpc::Status GetSupportedCurrencies(::grpc::ServerContext* context, const ::oteldemo::Empty* request, ::oteldemo::GetSupportedCurrenciesResponse* response); + virtual ::grpc::Status Convert(::grpc::ServerContext* context, const ::oteldemo::CurrencyConversionRequest* request, ::oteldemo::Money* response); + }; + template + class WithAsyncMethod_GetSupportedCurrencies : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_GetSupportedCurrencies() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_GetSupportedCurrencies() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetSupportedCurrencies(::grpc::ServerContext* /*context*/, const ::oteldemo::Empty* /*request*/, ::oteldemo::GetSupportedCurrenciesResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetSupportedCurrencies(::grpc::ServerContext* context, ::oteldemo::Empty* request, ::grpc::ServerAsyncResponseWriter< ::oteldemo::GetSupportedCurrenciesResponse>* 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_Convert : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_Convert() { + ::grpc::Service::MarkMethodAsync(1); + } + ~WithAsyncMethod_Convert() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Convert(::grpc::ServerContext* /*context*/, const ::oteldemo::CurrencyConversionRequest* /*request*/, ::oteldemo::Money* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestConvert(::grpc::ServerContext* context, ::oteldemo::CurrencyConversionRequest* request, ::grpc::ServerAsyncResponseWriter< ::oteldemo::Money>* 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_GetSupportedCurrencies > AsyncService; + template + class WithCallbackMethod_GetSupportedCurrencies : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_GetSupportedCurrencies() { + ::grpc::Service::MarkMethodCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::oteldemo::Empty, ::oteldemo::GetSupportedCurrenciesResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::oteldemo::Empty* request, ::oteldemo::GetSupportedCurrenciesResponse* response) { return this->GetSupportedCurrencies(context, request, response); }));} + void SetMessageAllocatorFor_GetSupportedCurrencies( + ::grpc::MessageAllocator< ::oteldemo::Empty, ::oteldemo::GetSupportedCurrenciesResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); + static_cast<::grpc::internal::CallbackUnaryHandler< ::oteldemo::Empty, ::oteldemo::GetSupportedCurrenciesResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_GetSupportedCurrencies() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetSupportedCurrencies(::grpc::ServerContext* /*context*/, const ::oteldemo::Empty* /*request*/, ::oteldemo::GetSupportedCurrenciesResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* GetSupportedCurrencies( + ::grpc::CallbackServerContext* /*context*/, const ::oteldemo::Empty* /*request*/, ::oteldemo::GetSupportedCurrenciesResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_Convert : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_Convert() { + ::grpc::Service::MarkMethodCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::oteldemo::CurrencyConversionRequest, ::oteldemo::Money>( + [this]( + ::grpc::CallbackServerContext* context, const ::oteldemo::CurrencyConversionRequest* request, ::oteldemo::Money* response) { return this->Convert(context, request, response); }));} + void SetMessageAllocatorFor_Convert( + ::grpc::MessageAllocator< ::oteldemo::CurrencyConversionRequest, ::oteldemo::Money>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1); + static_cast<::grpc::internal::CallbackUnaryHandler< ::oteldemo::CurrencyConversionRequest, ::oteldemo::Money>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_Convert() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Convert(::grpc::ServerContext* /*context*/, const ::oteldemo::CurrencyConversionRequest* /*request*/, ::oteldemo::Money* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* Convert( + ::grpc::CallbackServerContext* /*context*/, const ::oteldemo::CurrencyConversionRequest* /*request*/, ::oteldemo::Money* /*response*/) { return nullptr; } + }; + typedef WithCallbackMethod_GetSupportedCurrencies > CallbackService; + typedef CallbackService ExperimentalCallbackService; + template + class WithGenericMethod_GetSupportedCurrencies : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_GetSupportedCurrencies() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_GetSupportedCurrencies() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetSupportedCurrencies(::grpc::ServerContext* /*context*/, const ::oteldemo::Empty* /*request*/, ::oteldemo::GetSupportedCurrenciesResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_Convert : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_Convert() { + ::grpc::Service::MarkMethodGeneric(1); + } + ~WithGenericMethod_Convert() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Convert(::grpc::ServerContext* /*context*/, const ::oteldemo::CurrencyConversionRequest* /*request*/, ::oteldemo::Money* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_GetSupportedCurrencies : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_GetSupportedCurrencies() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_GetSupportedCurrencies() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetSupportedCurrencies(::grpc::ServerContext* /*context*/, const ::oteldemo::Empty* /*request*/, ::oteldemo::GetSupportedCurrenciesResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetSupportedCurrencies(::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_Convert : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_Convert() { + ::grpc::Service::MarkMethodRaw(1); + } + ~WithRawMethod_Convert() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Convert(::grpc::ServerContext* /*context*/, const ::oteldemo::CurrencyConversionRequest* /*request*/, ::oteldemo::Money* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestConvert(::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 WithRawCallbackMethod_GetSupportedCurrencies : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_GetSupportedCurrencies() { + ::grpc::Service::MarkMethodRawCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->GetSupportedCurrencies(context, request, response); })); + } + ~WithRawCallbackMethod_GetSupportedCurrencies() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetSupportedCurrencies(::grpc::ServerContext* /*context*/, const ::oteldemo::Empty* /*request*/, ::oteldemo::GetSupportedCurrenciesResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* GetSupportedCurrencies( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_Convert : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_Convert() { + ::grpc::Service::MarkMethodRawCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Convert(context, request, response); })); + } + ~WithRawCallbackMethod_Convert() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Convert(::grpc::ServerContext* /*context*/, const ::oteldemo::CurrencyConversionRequest* /*request*/, ::oteldemo::Money* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* Convert( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithStreamedUnaryMethod_GetSupportedCurrencies : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_GetSupportedCurrencies() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::StreamedUnaryHandler< + ::oteldemo::Empty, ::oteldemo::GetSupportedCurrenciesResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::oteldemo::Empty, ::oteldemo::GetSupportedCurrenciesResponse>* streamer) { + return this->StreamedGetSupportedCurrencies(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_GetSupportedCurrencies() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status GetSupportedCurrencies(::grpc::ServerContext* /*context*/, const ::oteldemo::Empty* /*request*/, ::oteldemo::GetSupportedCurrenciesResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedGetSupportedCurrencies(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::oteldemo::Empty,::oteldemo::GetSupportedCurrenciesResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_Convert : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_Convert() { + ::grpc::Service::MarkMethodStreamed(1, + new ::grpc::internal::StreamedUnaryHandler< + ::oteldemo::CurrencyConversionRequest, ::oteldemo::Money>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::oteldemo::CurrencyConversionRequest, ::oteldemo::Money>* streamer) { + return this->StreamedConvert(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_Convert() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status Convert(::grpc::ServerContext* /*context*/, const ::oteldemo::CurrencyConversionRequest* /*request*/, ::oteldemo::Money* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedConvert(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::oteldemo::CurrencyConversionRequest,::oteldemo::Money>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_GetSupportedCurrencies > StreamedUnaryService; + typedef Service SplitStreamedService; + typedef WithStreamedUnaryMethod_GetSupportedCurrencies > StreamedService; +}; + +// -------------Payment service----------------- +// +class PaymentService final { + public: + static constexpr char const* service_full_name() { + return "oteldemo.PaymentService"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + virtual ::grpc::Status Charge(::grpc::ClientContext* context, const ::oteldemo::ChargeRequest& request, ::oteldemo::ChargeResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ChargeResponse>> AsyncCharge(::grpc::ClientContext* context, const ::oteldemo::ChargeRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ChargeResponse>>(AsyncChargeRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ChargeResponse>> PrepareAsyncCharge(::grpc::ClientContext* context, const ::oteldemo::ChargeRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ChargeResponse>>(PrepareAsyncChargeRaw(context, request, cq)); + } + class async_interface { + public: + virtual ~async_interface() {} + virtual void Charge(::grpc::ClientContext* context, const ::oteldemo::ChargeRequest* request, ::oteldemo::ChargeResponse* response, std::function) = 0; + virtual void Charge(::grpc::ClientContext* context, const ::oteldemo::ChargeRequest* request, ::oteldemo::ChargeResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + }; + typedef class async_interface experimental_async_interface; + virtual class async_interface* async() { return nullptr; } + class async_interface* experimental_async() { return async(); } + private: + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ChargeResponse>* AsyncChargeRaw(::grpc::ClientContext* context, const ::oteldemo::ChargeRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ChargeResponse>* PrepareAsyncChargeRaw(::grpc::ClientContext* context, const ::oteldemo::ChargeRequest& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + ::grpc::Status Charge(::grpc::ClientContext* context, const ::oteldemo::ChargeRequest& request, ::oteldemo::ChargeResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::ChargeResponse>> AsyncCharge(::grpc::ClientContext* context, const ::oteldemo::ChargeRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::ChargeResponse>>(AsyncChargeRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::ChargeResponse>> PrepareAsyncCharge(::grpc::ClientContext* context, const ::oteldemo::ChargeRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::ChargeResponse>>(PrepareAsyncChargeRaw(context, request, cq)); + } + class async final : + public StubInterface::async_interface { + public: + void Charge(::grpc::ClientContext* context, const ::oteldemo::ChargeRequest* request, ::oteldemo::ChargeResponse* response, std::function) override; + void Charge(::grpc::ClientContext* context, const ::oteldemo::ChargeRequest* request, ::oteldemo::ChargeResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + private: + friend class Stub; + explicit async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class async* async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class async async_stub_{this}; + ::grpc::ClientAsyncResponseReader< ::oteldemo::ChargeResponse>* AsyncChargeRaw(::grpc::ClientContext* context, const ::oteldemo::ChargeRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::ChargeResponse>* PrepareAsyncChargeRaw(::grpc::ClientContext* context, const ::oteldemo::ChargeRequest& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_Charge_; + }; + 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(); + virtual ::grpc::Status Charge(::grpc::ServerContext* context, const ::oteldemo::ChargeRequest* request, ::oteldemo::ChargeResponse* response); + }; + template + class WithAsyncMethod_Charge : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_Charge() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_Charge() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Charge(::grpc::ServerContext* /*context*/, const ::oteldemo::ChargeRequest* /*request*/, ::oteldemo::ChargeResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestCharge(::grpc::ServerContext* context, ::oteldemo::ChargeRequest* request, ::grpc::ServerAsyncResponseWriter< ::oteldemo::ChargeResponse>* 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); + } + }; + typedef WithAsyncMethod_Charge AsyncService; + template + class WithCallbackMethod_Charge : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_Charge() { + ::grpc::Service::MarkMethodCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::oteldemo::ChargeRequest, ::oteldemo::ChargeResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::oteldemo::ChargeRequest* request, ::oteldemo::ChargeResponse* response) { return this->Charge(context, request, response); }));} + void SetMessageAllocatorFor_Charge( + ::grpc::MessageAllocator< ::oteldemo::ChargeRequest, ::oteldemo::ChargeResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); + static_cast<::grpc::internal::CallbackUnaryHandler< ::oteldemo::ChargeRequest, ::oteldemo::ChargeResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_Charge() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Charge(::grpc::ServerContext* /*context*/, const ::oteldemo::ChargeRequest* /*request*/, ::oteldemo::ChargeResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* Charge( + ::grpc::CallbackServerContext* /*context*/, const ::oteldemo::ChargeRequest* /*request*/, ::oteldemo::ChargeResponse* /*response*/) { return nullptr; } + }; + typedef WithCallbackMethod_Charge CallbackService; + typedef CallbackService ExperimentalCallbackService; + template + class WithGenericMethod_Charge : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_Charge() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_Charge() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Charge(::grpc::ServerContext* /*context*/, const ::oteldemo::ChargeRequest* /*request*/, ::oteldemo::ChargeResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_Charge : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_Charge() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_Charge() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Charge(::grpc::ServerContext* /*context*/, const ::oteldemo::ChargeRequest* /*request*/, ::oteldemo::ChargeResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestCharge(::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 WithRawCallbackMethod_Charge : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_Charge() { + ::grpc::Service::MarkMethodRawCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Charge(context, request, response); })); + } + ~WithRawCallbackMethod_Charge() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Charge(::grpc::ServerContext* /*context*/, const ::oteldemo::ChargeRequest* /*request*/, ::oteldemo::ChargeResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* Charge( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithStreamedUnaryMethod_Charge : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_Charge() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::StreamedUnaryHandler< + ::oteldemo::ChargeRequest, ::oteldemo::ChargeResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::oteldemo::ChargeRequest, ::oteldemo::ChargeResponse>* streamer) { + return this->StreamedCharge(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_Charge() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status Charge(::grpc::ServerContext* /*context*/, const ::oteldemo::ChargeRequest* /*request*/, ::oteldemo::ChargeResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedCharge(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::oteldemo::ChargeRequest,::oteldemo::ChargeResponse>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_Charge StreamedUnaryService; + typedef Service SplitStreamedService; + typedef WithStreamedUnaryMethod_Charge StreamedService; +}; + +// -------------Email service----------------- +// +class EmailService final { + public: + static constexpr char const* service_full_name() { + return "oteldemo.EmailService"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + virtual ::grpc::Status SendOrderConfirmation(::grpc::ClientContext* context, const ::oteldemo::SendOrderConfirmationRequest& request, ::oteldemo::Empty* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Empty>> AsyncSendOrderConfirmation(::grpc::ClientContext* context, const ::oteldemo::SendOrderConfirmationRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Empty>>(AsyncSendOrderConfirmationRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Empty>> PrepareAsyncSendOrderConfirmation(::grpc::ClientContext* context, const ::oteldemo::SendOrderConfirmationRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Empty>>(PrepareAsyncSendOrderConfirmationRaw(context, request, cq)); + } + class async_interface { + public: + virtual ~async_interface() {} + virtual void SendOrderConfirmation(::grpc::ClientContext* context, const ::oteldemo::SendOrderConfirmationRequest* request, ::oteldemo::Empty* response, std::function) = 0; + virtual void SendOrderConfirmation(::grpc::ClientContext* context, const ::oteldemo::SendOrderConfirmationRequest* request, ::oteldemo::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0; + }; + typedef class async_interface experimental_async_interface; + virtual class async_interface* async() { return nullptr; } + class async_interface* experimental_async() { return async(); } + private: + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Empty>* AsyncSendOrderConfirmationRaw(::grpc::ClientContext* context, const ::oteldemo::SendOrderConfirmationRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Empty>* PrepareAsyncSendOrderConfirmationRaw(::grpc::ClientContext* context, const ::oteldemo::SendOrderConfirmationRequest& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + ::grpc::Status SendOrderConfirmation(::grpc::ClientContext* context, const ::oteldemo::SendOrderConfirmationRequest& request, ::oteldemo::Empty* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::Empty>> AsyncSendOrderConfirmation(::grpc::ClientContext* context, const ::oteldemo::SendOrderConfirmationRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::Empty>>(AsyncSendOrderConfirmationRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::Empty>> PrepareAsyncSendOrderConfirmation(::grpc::ClientContext* context, const ::oteldemo::SendOrderConfirmationRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::Empty>>(PrepareAsyncSendOrderConfirmationRaw(context, request, cq)); + } + class async final : + public StubInterface::async_interface { + public: + void SendOrderConfirmation(::grpc::ClientContext* context, const ::oteldemo::SendOrderConfirmationRequest* request, ::oteldemo::Empty* response, std::function) override; + void SendOrderConfirmation(::grpc::ClientContext* context, const ::oteldemo::SendOrderConfirmationRequest* request, ::oteldemo::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; + private: + friend class Stub; + explicit async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class async* async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class async async_stub_{this}; + ::grpc::ClientAsyncResponseReader< ::oteldemo::Empty>* AsyncSendOrderConfirmationRaw(::grpc::ClientContext* context, const ::oteldemo::SendOrderConfirmationRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::Empty>* PrepareAsyncSendOrderConfirmationRaw(::grpc::ClientContext* context, const ::oteldemo::SendOrderConfirmationRequest& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_SendOrderConfirmation_; + }; + 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(); + virtual ::grpc::Status SendOrderConfirmation(::grpc::ServerContext* context, const ::oteldemo::SendOrderConfirmationRequest* request, ::oteldemo::Empty* response); + }; + template + class WithAsyncMethod_SendOrderConfirmation : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_SendOrderConfirmation() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_SendOrderConfirmation() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SendOrderConfirmation(::grpc::ServerContext* /*context*/, const ::oteldemo::SendOrderConfirmationRequest* /*request*/, ::oteldemo::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestSendOrderConfirmation(::grpc::ServerContext* context, ::oteldemo::SendOrderConfirmationRequest* request, ::grpc::ServerAsyncResponseWriter< ::oteldemo::Empty>* 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); + } + }; + typedef WithAsyncMethod_SendOrderConfirmation AsyncService; + template + class WithCallbackMethod_SendOrderConfirmation : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_SendOrderConfirmation() { + ::grpc::Service::MarkMethodCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::oteldemo::SendOrderConfirmationRequest, ::oteldemo::Empty>( + [this]( + ::grpc::CallbackServerContext* context, const ::oteldemo::SendOrderConfirmationRequest* request, ::oteldemo::Empty* response) { return this->SendOrderConfirmation(context, request, response); }));} + void SetMessageAllocatorFor_SendOrderConfirmation( + ::grpc::MessageAllocator< ::oteldemo::SendOrderConfirmationRequest, ::oteldemo::Empty>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); + static_cast<::grpc::internal::CallbackUnaryHandler< ::oteldemo::SendOrderConfirmationRequest, ::oteldemo::Empty>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_SendOrderConfirmation() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SendOrderConfirmation(::grpc::ServerContext* /*context*/, const ::oteldemo::SendOrderConfirmationRequest* /*request*/, ::oteldemo::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* SendOrderConfirmation( + ::grpc::CallbackServerContext* /*context*/, const ::oteldemo::SendOrderConfirmationRequest* /*request*/, ::oteldemo::Empty* /*response*/) { return nullptr; } + }; + typedef WithCallbackMethod_SendOrderConfirmation CallbackService; + typedef CallbackService ExperimentalCallbackService; + template + class WithGenericMethod_SendOrderConfirmation : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_SendOrderConfirmation() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_SendOrderConfirmation() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SendOrderConfirmation(::grpc::ServerContext* /*context*/, const ::oteldemo::SendOrderConfirmationRequest* /*request*/, ::oteldemo::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_SendOrderConfirmation : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_SendOrderConfirmation() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_SendOrderConfirmation() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SendOrderConfirmation(::grpc::ServerContext* /*context*/, const ::oteldemo::SendOrderConfirmationRequest* /*request*/, ::oteldemo::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestSendOrderConfirmation(::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 WithRawCallbackMethod_SendOrderConfirmation : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_SendOrderConfirmation() { + ::grpc::Service::MarkMethodRawCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->SendOrderConfirmation(context, request, response); })); + } + ~WithRawCallbackMethod_SendOrderConfirmation() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SendOrderConfirmation(::grpc::ServerContext* /*context*/, const ::oteldemo::SendOrderConfirmationRequest* /*request*/, ::oteldemo::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* SendOrderConfirmation( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithStreamedUnaryMethod_SendOrderConfirmation : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_SendOrderConfirmation() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::StreamedUnaryHandler< + ::oteldemo::SendOrderConfirmationRequest, ::oteldemo::Empty>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::oteldemo::SendOrderConfirmationRequest, ::oteldemo::Empty>* streamer) { + return this->StreamedSendOrderConfirmation(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_SendOrderConfirmation() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status SendOrderConfirmation(::grpc::ServerContext* /*context*/, const ::oteldemo::SendOrderConfirmationRequest* /*request*/, ::oteldemo::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedSendOrderConfirmation(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::oteldemo::SendOrderConfirmationRequest,::oteldemo::Empty>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_SendOrderConfirmation StreamedUnaryService; + typedef Service SplitStreamedService; + typedef WithStreamedUnaryMethod_SendOrderConfirmation StreamedService; +}; + +// -------------Checkout service----------------- +// +class CheckoutService final { + public: + static constexpr char const* service_full_name() { + return "oteldemo.CheckoutService"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + virtual ::grpc::Status PlaceOrder(::grpc::ClientContext* context, const ::oteldemo::PlaceOrderRequest& request, ::oteldemo::PlaceOrderResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::PlaceOrderResponse>> AsyncPlaceOrder(::grpc::ClientContext* context, const ::oteldemo::PlaceOrderRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::PlaceOrderResponse>>(AsyncPlaceOrderRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::PlaceOrderResponse>> PrepareAsyncPlaceOrder(::grpc::ClientContext* context, const ::oteldemo::PlaceOrderRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::PlaceOrderResponse>>(PrepareAsyncPlaceOrderRaw(context, request, cq)); + } + class async_interface { + public: + virtual ~async_interface() {} + virtual void PlaceOrder(::grpc::ClientContext* context, const ::oteldemo::PlaceOrderRequest* request, ::oteldemo::PlaceOrderResponse* response, std::function) = 0; + virtual void PlaceOrder(::grpc::ClientContext* context, const ::oteldemo::PlaceOrderRequest* request, ::oteldemo::PlaceOrderResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + }; + typedef class async_interface experimental_async_interface; + virtual class async_interface* async() { return nullptr; } + class async_interface* experimental_async() { return async(); } + private: + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::PlaceOrderResponse>* AsyncPlaceOrderRaw(::grpc::ClientContext* context, const ::oteldemo::PlaceOrderRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::PlaceOrderResponse>* PrepareAsyncPlaceOrderRaw(::grpc::ClientContext* context, const ::oteldemo::PlaceOrderRequest& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + ::grpc::Status PlaceOrder(::grpc::ClientContext* context, const ::oteldemo::PlaceOrderRequest& request, ::oteldemo::PlaceOrderResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::PlaceOrderResponse>> AsyncPlaceOrder(::grpc::ClientContext* context, const ::oteldemo::PlaceOrderRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::PlaceOrderResponse>>(AsyncPlaceOrderRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::PlaceOrderResponse>> PrepareAsyncPlaceOrder(::grpc::ClientContext* context, const ::oteldemo::PlaceOrderRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::PlaceOrderResponse>>(PrepareAsyncPlaceOrderRaw(context, request, cq)); + } + class async final : + public StubInterface::async_interface { + public: + void PlaceOrder(::grpc::ClientContext* context, const ::oteldemo::PlaceOrderRequest* request, ::oteldemo::PlaceOrderResponse* response, std::function) override; + void PlaceOrder(::grpc::ClientContext* context, const ::oteldemo::PlaceOrderRequest* request, ::oteldemo::PlaceOrderResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + private: + friend class Stub; + explicit async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class async* async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class async async_stub_{this}; + ::grpc::ClientAsyncResponseReader< ::oteldemo::PlaceOrderResponse>* AsyncPlaceOrderRaw(::grpc::ClientContext* context, const ::oteldemo::PlaceOrderRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::PlaceOrderResponse>* PrepareAsyncPlaceOrderRaw(::grpc::ClientContext* context, const ::oteldemo::PlaceOrderRequest& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_PlaceOrder_; + }; + 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(); + virtual ::grpc::Status PlaceOrder(::grpc::ServerContext* context, const ::oteldemo::PlaceOrderRequest* request, ::oteldemo::PlaceOrderResponse* response); + }; + template + class WithAsyncMethod_PlaceOrder : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_PlaceOrder() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_PlaceOrder() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status PlaceOrder(::grpc::ServerContext* /*context*/, const ::oteldemo::PlaceOrderRequest* /*request*/, ::oteldemo::PlaceOrderResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestPlaceOrder(::grpc::ServerContext* context, ::oteldemo::PlaceOrderRequest* request, ::grpc::ServerAsyncResponseWriter< ::oteldemo::PlaceOrderResponse>* 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); + } + }; + typedef WithAsyncMethod_PlaceOrder AsyncService; + template + class WithCallbackMethod_PlaceOrder : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_PlaceOrder() { + ::grpc::Service::MarkMethodCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::oteldemo::PlaceOrderRequest, ::oteldemo::PlaceOrderResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::oteldemo::PlaceOrderRequest* request, ::oteldemo::PlaceOrderResponse* response) { return this->PlaceOrder(context, request, response); }));} + void SetMessageAllocatorFor_PlaceOrder( + ::grpc::MessageAllocator< ::oteldemo::PlaceOrderRequest, ::oteldemo::PlaceOrderResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); + static_cast<::grpc::internal::CallbackUnaryHandler< ::oteldemo::PlaceOrderRequest, ::oteldemo::PlaceOrderResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_PlaceOrder() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status PlaceOrder(::grpc::ServerContext* /*context*/, const ::oteldemo::PlaceOrderRequest* /*request*/, ::oteldemo::PlaceOrderResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* PlaceOrder( + ::grpc::CallbackServerContext* /*context*/, const ::oteldemo::PlaceOrderRequest* /*request*/, ::oteldemo::PlaceOrderResponse* /*response*/) { return nullptr; } + }; + typedef WithCallbackMethod_PlaceOrder CallbackService; + typedef CallbackService ExperimentalCallbackService; + template + class WithGenericMethod_PlaceOrder : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_PlaceOrder() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_PlaceOrder() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status PlaceOrder(::grpc::ServerContext* /*context*/, const ::oteldemo::PlaceOrderRequest* /*request*/, ::oteldemo::PlaceOrderResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_PlaceOrder : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_PlaceOrder() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_PlaceOrder() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status PlaceOrder(::grpc::ServerContext* /*context*/, const ::oteldemo::PlaceOrderRequest* /*request*/, ::oteldemo::PlaceOrderResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestPlaceOrder(::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 WithRawCallbackMethod_PlaceOrder : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_PlaceOrder() { + ::grpc::Service::MarkMethodRawCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->PlaceOrder(context, request, response); })); + } + ~WithRawCallbackMethod_PlaceOrder() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status PlaceOrder(::grpc::ServerContext* /*context*/, const ::oteldemo::PlaceOrderRequest* /*request*/, ::oteldemo::PlaceOrderResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* PlaceOrder( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithStreamedUnaryMethod_PlaceOrder : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_PlaceOrder() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::StreamedUnaryHandler< + ::oteldemo::PlaceOrderRequest, ::oteldemo::PlaceOrderResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::oteldemo::PlaceOrderRequest, ::oteldemo::PlaceOrderResponse>* streamer) { + return this->StreamedPlaceOrder(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_PlaceOrder() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status PlaceOrder(::grpc::ServerContext* /*context*/, const ::oteldemo::PlaceOrderRequest* /*request*/, ::oteldemo::PlaceOrderResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedPlaceOrder(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::oteldemo::PlaceOrderRequest,::oteldemo::PlaceOrderResponse>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_PlaceOrder StreamedUnaryService; + typedef Service SplitStreamedService; + typedef WithStreamedUnaryMethod_PlaceOrder StreamedService; +}; + +// ------------Ad service------------------ +// +class AdService final { + public: + static constexpr char const* service_full_name() { + return "oteldemo.AdService"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + virtual ::grpc::Status GetAds(::grpc::ClientContext* context, const ::oteldemo::AdRequest& request, ::oteldemo::AdResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::AdResponse>> AsyncGetAds(::grpc::ClientContext* context, const ::oteldemo::AdRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::AdResponse>>(AsyncGetAdsRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::AdResponse>> PrepareAsyncGetAds(::grpc::ClientContext* context, const ::oteldemo::AdRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::AdResponse>>(PrepareAsyncGetAdsRaw(context, request, cq)); + } + class async_interface { + public: + virtual ~async_interface() {} + virtual void GetAds(::grpc::ClientContext* context, const ::oteldemo::AdRequest* request, ::oteldemo::AdResponse* response, std::function) = 0; + virtual void GetAds(::grpc::ClientContext* context, const ::oteldemo::AdRequest* request, ::oteldemo::AdResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + }; + typedef class async_interface experimental_async_interface; + virtual class async_interface* async() { return nullptr; } + class async_interface* experimental_async() { return async(); } + private: + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::AdResponse>* AsyncGetAdsRaw(::grpc::ClientContext* context, const ::oteldemo::AdRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::AdResponse>* PrepareAsyncGetAdsRaw(::grpc::ClientContext* context, const ::oteldemo::AdRequest& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + ::grpc::Status GetAds(::grpc::ClientContext* context, const ::oteldemo::AdRequest& request, ::oteldemo::AdResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::AdResponse>> AsyncGetAds(::grpc::ClientContext* context, const ::oteldemo::AdRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::AdResponse>>(AsyncGetAdsRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::AdResponse>> PrepareAsyncGetAds(::grpc::ClientContext* context, const ::oteldemo::AdRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::AdResponse>>(PrepareAsyncGetAdsRaw(context, request, cq)); + } + class async final : + public StubInterface::async_interface { + public: + void GetAds(::grpc::ClientContext* context, const ::oteldemo::AdRequest* request, ::oteldemo::AdResponse* response, std::function) override; + void GetAds(::grpc::ClientContext* context, const ::oteldemo::AdRequest* request, ::oteldemo::AdResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + private: + friend class Stub; + explicit async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class async* async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class async async_stub_{this}; + ::grpc::ClientAsyncResponseReader< ::oteldemo::AdResponse>* AsyncGetAdsRaw(::grpc::ClientContext* context, const ::oteldemo::AdRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::AdResponse>* PrepareAsyncGetAdsRaw(::grpc::ClientContext* context, const ::oteldemo::AdRequest& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_GetAds_; + }; + 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(); + virtual ::grpc::Status GetAds(::grpc::ServerContext* context, const ::oteldemo::AdRequest* request, ::oteldemo::AdResponse* response); + }; + template + class WithAsyncMethod_GetAds : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_GetAds() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_GetAds() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetAds(::grpc::ServerContext* /*context*/, const ::oteldemo::AdRequest* /*request*/, ::oteldemo::AdResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetAds(::grpc::ServerContext* context, ::oteldemo::AdRequest* request, ::grpc::ServerAsyncResponseWriter< ::oteldemo::AdResponse>* 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); + } + }; + typedef WithAsyncMethod_GetAds AsyncService; + template + class WithCallbackMethod_GetAds : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_GetAds() { + ::grpc::Service::MarkMethodCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::oteldemo::AdRequest, ::oteldemo::AdResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::oteldemo::AdRequest* request, ::oteldemo::AdResponse* response) { return this->GetAds(context, request, response); }));} + void SetMessageAllocatorFor_GetAds( + ::grpc::MessageAllocator< ::oteldemo::AdRequest, ::oteldemo::AdResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); + static_cast<::grpc::internal::CallbackUnaryHandler< ::oteldemo::AdRequest, ::oteldemo::AdResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_GetAds() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetAds(::grpc::ServerContext* /*context*/, const ::oteldemo::AdRequest* /*request*/, ::oteldemo::AdResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* GetAds( + ::grpc::CallbackServerContext* /*context*/, const ::oteldemo::AdRequest* /*request*/, ::oteldemo::AdResponse* /*response*/) { return nullptr; } + }; + typedef WithCallbackMethod_GetAds CallbackService; + typedef CallbackService ExperimentalCallbackService; + template + class WithGenericMethod_GetAds : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_GetAds() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_GetAds() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetAds(::grpc::ServerContext* /*context*/, const ::oteldemo::AdRequest* /*request*/, ::oteldemo::AdResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_GetAds : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_GetAds() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_GetAds() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetAds(::grpc::ServerContext* /*context*/, const ::oteldemo::AdRequest* /*request*/, ::oteldemo::AdResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetAds(::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 WithRawCallbackMethod_GetAds : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_GetAds() { + ::grpc::Service::MarkMethodRawCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->GetAds(context, request, response); })); + } + ~WithRawCallbackMethod_GetAds() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetAds(::grpc::ServerContext* /*context*/, const ::oteldemo::AdRequest* /*request*/, ::oteldemo::AdResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* GetAds( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithStreamedUnaryMethod_GetAds : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_GetAds() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::StreamedUnaryHandler< + ::oteldemo::AdRequest, ::oteldemo::AdResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::oteldemo::AdRequest, ::oteldemo::AdResponse>* streamer) { + return this->StreamedGetAds(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_GetAds() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status GetAds(::grpc::ServerContext* /*context*/, const ::oteldemo::AdRequest* /*request*/, ::oteldemo::AdResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedGetAds(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::oteldemo::AdRequest,::oteldemo::AdResponse>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_GetAds StreamedUnaryService; + typedef Service SplitStreamedService; + typedef WithStreamedUnaryMethod_GetAds StreamedService; +}; + +// ------------Feature flag service------------------ +// +class FeatureFlagService final { + public: + static constexpr char const* service_full_name() { + return "oteldemo.FeatureFlagService"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + virtual ::grpc::Status GetFlag(::grpc::ClientContext* context, const ::oteldemo::GetFlagRequest& request, ::oteldemo::GetFlagResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetFlagResponse>> AsyncGetFlag(::grpc::ClientContext* context, const ::oteldemo::GetFlagRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetFlagResponse>>(AsyncGetFlagRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetFlagResponse>> PrepareAsyncGetFlag(::grpc::ClientContext* context, const ::oteldemo::GetFlagRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetFlagResponse>>(PrepareAsyncGetFlagRaw(context, request, cq)); + } + virtual ::grpc::Status CreateFlag(::grpc::ClientContext* context, const ::oteldemo::CreateFlagRequest& request, ::oteldemo::CreateFlagResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::CreateFlagResponse>> AsyncCreateFlag(::grpc::ClientContext* context, const ::oteldemo::CreateFlagRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::CreateFlagResponse>>(AsyncCreateFlagRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::CreateFlagResponse>> PrepareAsyncCreateFlag(::grpc::ClientContext* context, const ::oteldemo::CreateFlagRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::CreateFlagResponse>>(PrepareAsyncCreateFlagRaw(context, request, cq)); + } + virtual ::grpc::Status UpdateFlag(::grpc::ClientContext* context, const ::oteldemo::UpdateFlagRequest& request, ::oteldemo::UpdateFlagResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::UpdateFlagResponse>> AsyncUpdateFlag(::grpc::ClientContext* context, const ::oteldemo::UpdateFlagRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::UpdateFlagResponse>>(AsyncUpdateFlagRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::UpdateFlagResponse>> PrepareAsyncUpdateFlag(::grpc::ClientContext* context, const ::oteldemo::UpdateFlagRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::UpdateFlagResponse>>(PrepareAsyncUpdateFlagRaw(context, request, cq)); + } + virtual ::grpc::Status ListFlags(::grpc::ClientContext* context, const ::oteldemo::ListFlagsRequest& request, ::oteldemo::ListFlagsResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ListFlagsResponse>> AsyncListFlags(::grpc::ClientContext* context, const ::oteldemo::ListFlagsRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ListFlagsResponse>>(AsyncListFlagsRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ListFlagsResponse>> PrepareAsyncListFlags(::grpc::ClientContext* context, const ::oteldemo::ListFlagsRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ListFlagsResponse>>(PrepareAsyncListFlagsRaw(context, request, cq)); + } + virtual ::grpc::Status DeleteFlag(::grpc::ClientContext* context, const ::oteldemo::DeleteFlagRequest& request, ::oteldemo::DeleteFlagResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::DeleteFlagResponse>> AsyncDeleteFlag(::grpc::ClientContext* context, const ::oteldemo::DeleteFlagRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::DeleteFlagResponse>>(AsyncDeleteFlagRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::DeleteFlagResponse>> PrepareAsyncDeleteFlag(::grpc::ClientContext* context, const ::oteldemo::DeleteFlagRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::DeleteFlagResponse>>(PrepareAsyncDeleteFlagRaw(context, request, cq)); + } + class async_interface { + public: + virtual ~async_interface() {} + virtual void GetFlag(::grpc::ClientContext* context, const ::oteldemo::GetFlagRequest* request, ::oteldemo::GetFlagResponse* response, std::function) = 0; + virtual void GetFlag(::grpc::ClientContext* context, const ::oteldemo::GetFlagRequest* request, ::oteldemo::GetFlagResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void CreateFlag(::grpc::ClientContext* context, const ::oteldemo::CreateFlagRequest* request, ::oteldemo::CreateFlagResponse* response, std::function) = 0; + virtual void CreateFlag(::grpc::ClientContext* context, const ::oteldemo::CreateFlagRequest* request, ::oteldemo::CreateFlagResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void UpdateFlag(::grpc::ClientContext* context, const ::oteldemo::UpdateFlagRequest* request, ::oteldemo::UpdateFlagResponse* response, std::function) = 0; + virtual void UpdateFlag(::grpc::ClientContext* context, const ::oteldemo::UpdateFlagRequest* request, ::oteldemo::UpdateFlagResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void ListFlags(::grpc::ClientContext* context, const ::oteldemo::ListFlagsRequest* request, ::oteldemo::ListFlagsResponse* response, std::function) = 0; + virtual void ListFlags(::grpc::ClientContext* context, const ::oteldemo::ListFlagsRequest* request, ::oteldemo::ListFlagsResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void DeleteFlag(::grpc::ClientContext* context, const ::oteldemo::DeleteFlagRequest* request, ::oteldemo::DeleteFlagResponse* response, std::function) = 0; + virtual void DeleteFlag(::grpc::ClientContext* context, const ::oteldemo::DeleteFlagRequest* request, ::oteldemo::DeleteFlagResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + }; + typedef class async_interface experimental_async_interface; + virtual class async_interface* async() { return nullptr; } + class async_interface* experimental_async() { return async(); } + private: + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetFlagResponse>* AsyncGetFlagRaw(::grpc::ClientContext* context, const ::oteldemo::GetFlagRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetFlagResponse>* PrepareAsyncGetFlagRaw(::grpc::ClientContext* context, const ::oteldemo::GetFlagRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::CreateFlagResponse>* AsyncCreateFlagRaw(::grpc::ClientContext* context, const ::oteldemo::CreateFlagRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::CreateFlagResponse>* PrepareAsyncCreateFlagRaw(::grpc::ClientContext* context, const ::oteldemo::CreateFlagRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::UpdateFlagResponse>* AsyncUpdateFlagRaw(::grpc::ClientContext* context, const ::oteldemo::UpdateFlagRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::UpdateFlagResponse>* PrepareAsyncUpdateFlagRaw(::grpc::ClientContext* context, const ::oteldemo::UpdateFlagRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ListFlagsResponse>* AsyncListFlagsRaw(::grpc::ClientContext* context, const ::oteldemo::ListFlagsRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ListFlagsResponse>* PrepareAsyncListFlagsRaw(::grpc::ClientContext* context, const ::oteldemo::ListFlagsRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::DeleteFlagResponse>* AsyncDeleteFlagRaw(::grpc::ClientContext* context, const ::oteldemo::DeleteFlagRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::DeleteFlagResponse>* PrepareAsyncDeleteFlagRaw(::grpc::ClientContext* context, const ::oteldemo::DeleteFlagRequest& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + ::grpc::Status GetFlag(::grpc::ClientContext* context, const ::oteldemo::GetFlagRequest& request, ::oteldemo::GetFlagResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::GetFlagResponse>> AsyncGetFlag(::grpc::ClientContext* context, const ::oteldemo::GetFlagRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::GetFlagResponse>>(AsyncGetFlagRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::GetFlagResponse>> PrepareAsyncGetFlag(::grpc::ClientContext* context, const ::oteldemo::GetFlagRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::GetFlagResponse>>(PrepareAsyncGetFlagRaw(context, request, cq)); + } + ::grpc::Status CreateFlag(::grpc::ClientContext* context, const ::oteldemo::CreateFlagRequest& request, ::oteldemo::CreateFlagResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::CreateFlagResponse>> AsyncCreateFlag(::grpc::ClientContext* context, const ::oteldemo::CreateFlagRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::CreateFlagResponse>>(AsyncCreateFlagRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::CreateFlagResponse>> PrepareAsyncCreateFlag(::grpc::ClientContext* context, const ::oteldemo::CreateFlagRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::CreateFlagResponse>>(PrepareAsyncCreateFlagRaw(context, request, cq)); + } + ::grpc::Status UpdateFlag(::grpc::ClientContext* context, const ::oteldemo::UpdateFlagRequest& request, ::oteldemo::UpdateFlagResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::UpdateFlagResponse>> AsyncUpdateFlag(::grpc::ClientContext* context, const ::oteldemo::UpdateFlagRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::UpdateFlagResponse>>(AsyncUpdateFlagRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::UpdateFlagResponse>> PrepareAsyncUpdateFlag(::grpc::ClientContext* context, const ::oteldemo::UpdateFlagRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::UpdateFlagResponse>>(PrepareAsyncUpdateFlagRaw(context, request, cq)); + } + ::grpc::Status ListFlags(::grpc::ClientContext* context, const ::oteldemo::ListFlagsRequest& request, ::oteldemo::ListFlagsResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::ListFlagsResponse>> AsyncListFlags(::grpc::ClientContext* context, const ::oteldemo::ListFlagsRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::ListFlagsResponse>>(AsyncListFlagsRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::ListFlagsResponse>> PrepareAsyncListFlags(::grpc::ClientContext* context, const ::oteldemo::ListFlagsRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::ListFlagsResponse>>(PrepareAsyncListFlagsRaw(context, request, cq)); + } + ::grpc::Status DeleteFlag(::grpc::ClientContext* context, const ::oteldemo::DeleteFlagRequest& request, ::oteldemo::DeleteFlagResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::DeleteFlagResponse>> AsyncDeleteFlag(::grpc::ClientContext* context, const ::oteldemo::DeleteFlagRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::DeleteFlagResponse>>(AsyncDeleteFlagRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::DeleteFlagResponse>> PrepareAsyncDeleteFlag(::grpc::ClientContext* context, const ::oteldemo::DeleteFlagRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::DeleteFlagResponse>>(PrepareAsyncDeleteFlagRaw(context, request, cq)); + } + class async final : + public StubInterface::async_interface { + public: + void GetFlag(::grpc::ClientContext* context, const ::oteldemo::GetFlagRequest* request, ::oteldemo::GetFlagResponse* response, std::function) override; + void GetFlag(::grpc::ClientContext* context, const ::oteldemo::GetFlagRequest* request, ::oteldemo::GetFlagResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void CreateFlag(::grpc::ClientContext* context, const ::oteldemo::CreateFlagRequest* request, ::oteldemo::CreateFlagResponse* response, std::function) override; + void CreateFlag(::grpc::ClientContext* context, const ::oteldemo::CreateFlagRequest* request, ::oteldemo::CreateFlagResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void UpdateFlag(::grpc::ClientContext* context, const ::oteldemo::UpdateFlagRequest* request, ::oteldemo::UpdateFlagResponse* response, std::function) override; + void UpdateFlag(::grpc::ClientContext* context, const ::oteldemo::UpdateFlagRequest* request, ::oteldemo::UpdateFlagResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void ListFlags(::grpc::ClientContext* context, const ::oteldemo::ListFlagsRequest* request, ::oteldemo::ListFlagsResponse* response, std::function) override; + void ListFlags(::grpc::ClientContext* context, const ::oteldemo::ListFlagsRequest* request, ::oteldemo::ListFlagsResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void DeleteFlag(::grpc::ClientContext* context, const ::oteldemo::DeleteFlagRequest* request, ::oteldemo::DeleteFlagResponse* response, std::function) override; + void DeleteFlag(::grpc::ClientContext* context, const ::oteldemo::DeleteFlagRequest* request, ::oteldemo::DeleteFlagResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + private: + friend class Stub; + explicit async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class async* async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class async async_stub_{this}; + ::grpc::ClientAsyncResponseReader< ::oteldemo::GetFlagResponse>* AsyncGetFlagRaw(::grpc::ClientContext* context, const ::oteldemo::GetFlagRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::GetFlagResponse>* PrepareAsyncGetFlagRaw(::grpc::ClientContext* context, const ::oteldemo::GetFlagRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::CreateFlagResponse>* AsyncCreateFlagRaw(::grpc::ClientContext* context, const ::oteldemo::CreateFlagRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::CreateFlagResponse>* PrepareAsyncCreateFlagRaw(::grpc::ClientContext* context, const ::oteldemo::CreateFlagRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::UpdateFlagResponse>* AsyncUpdateFlagRaw(::grpc::ClientContext* context, const ::oteldemo::UpdateFlagRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::UpdateFlagResponse>* PrepareAsyncUpdateFlagRaw(::grpc::ClientContext* context, const ::oteldemo::UpdateFlagRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::ListFlagsResponse>* AsyncListFlagsRaw(::grpc::ClientContext* context, const ::oteldemo::ListFlagsRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::ListFlagsResponse>* PrepareAsyncListFlagsRaw(::grpc::ClientContext* context, const ::oteldemo::ListFlagsRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::DeleteFlagResponse>* AsyncDeleteFlagRaw(::grpc::ClientContext* context, const ::oteldemo::DeleteFlagRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::DeleteFlagResponse>* PrepareAsyncDeleteFlagRaw(::grpc::ClientContext* context, const ::oteldemo::DeleteFlagRequest& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_GetFlag_; + const ::grpc::internal::RpcMethod rpcmethod_CreateFlag_; + const ::grpc::internal::RpcMethod rpcmethod_UpdateFlag_; + const ::grpc::internal::RpcMethod rpcmethod_ListFlags_; + const ::grpc::internal::RpcMethod rpcmethod_DeleteFlag_; + }; + 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(); + virtual ::grpc::Status GetFlag(::grpc::ServerContext* context, const ::oteldemo::GetFlagRequest* request, ::oteldemo::GetFlagResponse* response); + virtual ::grpc::Status CreateFlag(::grpc::ServerContext* context, const ::oteldemo::CreateFlagRequest* request, ::oteldemo::CreateFlagResponse* response); + virtual ::grpc::Status UpdateFlag(::grpc::ServerContext* context, const ::oteldemo::UpdateFlagRequest* request, ::oteldemo::UpdateFlagResponse* response); + virtual ::grpc::Status ListFlags(::grpc::ServerContext* context, const ::oteldemo::ListFlagsRequest* request, ::oteldemo::ListFlagsResponse* response); + virtual ::grpc::Status DeleteFlag(::grpc::ServerContext* context, const ::oteldemo::DeleteFlagRequest* request, ::oteldemo::DeleteFlagResponse* response); + }; + template + class WithAsyncMethod_GetFlag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_GetFlag() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_GetFlag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetFlag(::grpc::ServerContext* /*context*/, const ::oteldemo::GetFlagRequest* /*request*/, ::oteldemo::GetFlagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetFlag(::grpc::ServerContext* context, ::oteldemo::GetFlagRequest* request, ::grpc::ServerAsyncResponseWriter< ::oteldemo::GetFlagResponse>* 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_CreateFlag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_CreateFlag() { + ::grpc::Service::MarkMethodAsync(1); + } + ~WithAsyncMethod_CreateFlag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status CreateFlag(::grpc::ServerContext* /*context*/, const ::oteldemo::CreateFlagRequest* /*request*/, ::oteldemo::CreateFlagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestCreateFlag(::grpc::ServerContext* context, ::oteldemo::CreateFlagRequest* request, ::grpc::ServerAsyncResponseWriter< ::oteldemo::CreateFlagResponse>* 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_UpdateFlag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_UpdateFlag() { + ::grpc::Service::MarkMethodAsync(2); + } + ~WithAsyncMethod_UpdateFlag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status UpdateFlag(::grpc::ServerContext* /*context*/, const ::oteldemo::UpdateFlagRequest* /*request*/, ::oteldemo::UpdateFlagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestUpdateFlag(::grpc::ServerContext* context, ::oteldemo::UpdateFlagRequest* request, ::grpc::ServerAsyncResponseWriter< ::oteldemo::UpdateFlagResponse>* 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_ListFlags : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_ListFlags() { + ::grpc::Service::MarkMethodAsync(3); + } + ~WithAsyncMethod_ListFlags() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListFlags(::grpc::ServerContext* /*context*/, const ::oteldemo::ListFlagsRequest* /*request*/, ::oteldemo::ListFlagsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestListFlags(::grpc::ServerContext* context, ::oteldemo::ListFlagsRequest* request, ::grpc::ServerAsyncResponseWriter< ::oteldemo::ListFlagsResponse>* 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_DeleteFlag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_DeleteFlag() { + ::grpc::Service::MarkMethodAsync(4); + } + ~WithAsyncMethod_DeleteFlag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status DeleteFlag(::grpc::ServerContext* /*context*/, const ::oteldemo::DeleteFlagRequest* /*request*/, ::oteldemo::DeleteFlagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestDeleteFlag(::grpc::ServerContext* context, ::oteldemo::DeleteFlagRequest* request, ::grpc::ServerAsyncResponseWriter< ::oteldemo::DeleteFlagResponse>* 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); + } + }; + typedef WithAsyncMethod_GetFlag > > > > AsyncService; + template + class WithCallbackMethod_GetFlag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_GetFlag() { + ::grpc::Service::MarkMethodCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::oteldemo::GetFlagRequest, ::oteldemo::GetFlagResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::oteldemo::GetFlagRequest* request, ::oteldemo::GetFlagResponse* response) { return this->GetFlag(context, request, response); }));} + void SetMessageAllocatorFor_GetFlag( + ::grpc::MessageAllocator< ::oteldemo::GetFlagRequest, ::oteldemo::GetFlagResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); + static_cast<::grpc::internal::CallbackUnaryHandler< ::oteldemo::GetFlagRequest, ::oteldemo::GetFlagResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_GetFlag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetFlag(::grpc::ServerContext* /*context*/, const ::oteldemo::GetFlagRequest* /*request*/, ::oteldemo::GetFlagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* GetFlag( + ::grpc::CallbackServerContext* /*context*/, const ::oteldemo::GetFlagRequest* /*request*/, ::oteldemo::GetFlagResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_CreateFlag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_CreateFlag() { + ::grpc::Service::MarkMethodCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::oteldemo::CreateFlagRequest, ::oteldemo::CreateFlagResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::oteldemo::CreateFlagRequest* request, ::oteldemo::CreateFlagResponse* response) { return this->CreateFlag(context, request, response); }));} + void SetMessageAllocatorFor_CreateFlag( + ::grpc::MessageAllocator< ::oteldemo::CreateFlagRequest, ::oteldemo::CreateFlagResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1); + static_cast<::grpc::internal::CallbackUnaryHandler< ::oteldemo::CreateFlagRequest, ::oteldemo::CreateFlagResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_CreateFlag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status CreateFlag(::grpc::ServerContext* /*context*/, const ::oteldemo::CreateFlagRequest* /*request*/, ::oteldemo::CreateFlagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* CreateFlag( + ::grpc::CallbackServerContext* /*context*/, const ::oteldemo::CreateFlagRequest* /*request*/, ::oteldemo::CreateFlagResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_UpdateFlag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_UpdateFlag() { + ::grpc::Service::MarkMethodCallback(2, + new ::grpc::internal::CallbackUnaryHandler< ::oteldemo::UpdateFlagRequest, ::oteldemo::UpdateFlagResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::oteldemo::UpdateFlagRequest* request, ::oteldemo::UpdateFlagResponse* response) { return this->UpdateFlag(context, request, response); }));} + void SetMessageAllocatorFor_UpdateFlag( + ::grpc::MessageAllocator< ::oteldemo::UpdateFlagRequest, ::oteldemo::UpdateFlagResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(2); + static_cast<::grpc::internal::CallbackUnaryHandler< ::oteldemo::UpdateFlagRequest, ::oteldemo::UpdateFlagResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_UpdateFlag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status UpdateFlag(::grpc::ServerContext* /*context*/, const ::oteldemo::UpdateFlagRequest* /*request*/, ::oteldemo::UpdateFlagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* UpdateFlag( + ::grpc::CallbackServerContext* /*context*/, const ::oteldemo::UpdateFlagRequest* /*request*/, ::oteldemo::UpdateFlagResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_ListFlags : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_ListFlags() { + ::grpc::Service::MarkMethodCallback(3, + new ::grpc::internal::CallbackUnaryHandler< ::oteldemo::ListFlagsRequest, ::oteldemo::ListFlagsResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::oteldemo::ListFlagsRequest* request, ::oteldemo::ListFlagsResponse* response) { return this->ListFlags(context, request, response); }));} + void SetMessageAllocatorFor_ListFlags( + ::grpc::MessageAllocator< ::oteldemo::ListFlagsRequest, ::oteldemo::ListFlagsResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(3); + static_cast<::grpc::internal::CallbackUnaryHandler< ::oteldemo::ListFlagsRequest, ::oteldemo::ListFlagsResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_ListFlags() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListFlags(::grpc::ServerContext* /*context*/, const ::oteldemo::ListFlagsRequest* /*request*/, ::oteldemo::ListFlagsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* ListFlags( + ::grpc::CallbackServerContext* /*context*/, const ::oteldemo::ListFlagsRequest* /*request*/, ::oteldemo::ListFlagsResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_DeleteFlag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_DeleteFlag() { + ::grpc::Service::MarkMethodCallback(4, + new ::grpc::internal::CallbackUnaryHandler< ::oteldemo::DeleteFlagRequest, ::oteldemo::DeleteFlagResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::oteldemo::DeleteFlagRequest* request, ::oteldemo::DeleteFlagResponse* response) { return this->DeleteFlag(context, request, response); }));} + void SetMessageAllocatorFor_DeleteFlag( + ::grpc::MessageAllocator< ::oteldemo::DeleteFlagRequest, ::oteldemo::DeleteFlagResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(4); + static_cast<::grpc::internal::CallbackUnaryHandler< ::oteldemo::DeleteFlagRequest, ::oteldemo::DeleteFlagResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_DeleteFlag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status DeleteFlag(::grpc::ServerContext* /*context*/, const ::oteldemo::DeleteFlagRequest* /*request*/, ::oteldemo::DeleteFlagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* DeleteFlag( + ::grpc::CallbackServerContext* /*context*/, const ::oteldemo::DeleteFlagRequest* /*request*/, ::oteldemo::DeleteFlagResponse* /*response*/) { return nullptr; } + }; + typedef WithCallbackMethod_GetFlag > > > > CallbackService; + typedef CallbackService ExperimentalCallbackService; + template + class WithGenericMethod_GetFlag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_GetFlag() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_GetFlag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetFlag(::grpc::ServerContext* /*context*/, const ::oteldemo::GetFlagRequest* /*request*/, ::oteldemo::GetFlagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_CreateFlag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_CreateFlag() { + ::grpc::Service::MarkMethodGeneric(1); + } + ~WithGenericMethod_CreateFlag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status CreateFlag(::grpc::ServerContext* /*context*/, const ::oteldemo::CreateFlagRequest* /*request*/, ::oteldemo::CreateFlagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_UpdateFlag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_UpdateFlag() { + ::grpc::Service::MarkMethodGeneric(2); + } + ~WithGenericMethod_UpdateFlag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status UpdateFlag(::grpc::ServerContext* /*context*/, const ::oteldemo::UpdateFlagRequest* /*request*/, ::oteldemo::UpdateFlagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_ListFlags : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_ListFlags() { + ::grpc::Service::MarkMethodGeneric(3); + } + ~WithGenericMethod_ListFlags() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListFlags(::grpc::ServerContext* /*context*/, const ::oteldemo::ListFlagsRequest* /*request*/, ::oteldemo::ListFlagsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_DeleteFlag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_DeleteFlag() { + ::grpc::Service::MarkMethodGeneric(4); + } + ~WithGenericMethod_DeleteFlag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status DeleteFlag(::grpc::ServerContext* /*context*/, const ::oteldemo::DeleteFlagRequest* /*request*/, ::oteldemo::DeleteFlagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_GetFlag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_GetFlag() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_GetFlag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetFlag(::grpc::ServerContext* /*context*/, const ::oteldemo::GetFlagRequest* /*request*/, ::oteldemo::GetFlagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetFlag(::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_CreateFlag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_CreateFlag() { + ::grpc::Service::MarkMethodRaw(1); + } + ~WithRawMethod_CreateFlag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status CreateFlag(::grpc::ServerContext* /*context*/, const ::oteldemo::CreateFlagRequest* /*request*/, ::oteldemo::CreateFlagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestCreateFlag(::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_UpdateFlag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_UpdateFlag() { + ::grpc::Service::MarkMethodRaw(2); + } + ~WithRawMethod_UpdateFlag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status UpdateFlag(::grpc::ServerContext* /*context*/, const ::oteldemo::UpdateFlagRequest* /*request*/, ::oteldemo::UpdateFlagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestUpdateFlag(::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_ListFlags : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_ListFlags() { + ::grpc::Service::MarkMethodRaw(3); + } + ~WithRawMethod_ListFlags() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListFlags(::grpc::ServerContext* /*context*/, const ::oteldemo::ListFlagsRequest* /*request*/, ::oteldemo::ListFlagsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestListFlags(::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_DeleteFlag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_DeleteFlag() { + ::grpc::Service::MarkMethodRaw(4); + } + ~WithRawMethod_DeleteFlag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status DeleteFlag(::grpc::ServerContext* /*context*/, const ::oteldemo::DeleteFlagRequest* /*request*/, ::oteldemo::DeleteFlagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestDeleteFlag(::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 WithRawCallbackMethod_GetFlag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_GetFlag() { + ::grpc::Service::MarkMethodRawCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->GetFlag(context, request, response); })); + } + ~WithRawCallbackMethod_GetFlag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetFlag(::grpc::ServerContext* /*context*/, const ::oteldemo::GetFlagRequest* /*request*/, ::oteldemo::GetFlagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* GetFlag( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_CreateFlag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_CreateFlag() { + ::grpc::Service::MarkMethodRawCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->CreateFlag(context, request, response); })); + } + ~WithRawCallbackMethod_CreateFlag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status CreateFlag(::grpc::ServerContext* /*context*/, const ::oteldemo::CreateFlagRequest* /*request*/, ::oteldemo::CreateFlagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* CreateFlag( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_UpdateFlag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_UpdateFlag() { + ::grpc::Service::MarkMethodRawCallback(2, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->UpdateFlag(context, request, response); })); + } + ~WithRawCallbackMethod_UpdateFlag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status UpdateFlag(::grpc::ServerContext* /*context*/, const ::oteldemo::UpdateFlagRequest* /*request*/, ::oteldemo::UpdateFlagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* UpdateFlag( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_ListFlags : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_ListFlags() { + ::grpc::Service::MarkMethodRawCallback(3, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->ListFlags(context, request, response); })); + } + ~WithRawCallbackMethod_ListFlags() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListFlags(::grpc::ServerContext* /*context*/, const ::oteldemo::ListFlagsRequest* /*request*/, ::oteldemo::ListFlagsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* ListFlags( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_DeleteFlag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_DeleteFlag() { + ::grpc::Service::MarkMethodRawCallback(4, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->DeleteFlag(context, request, response); })); + } + ~WithRawCallbackMethod_DeleteFlag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status DeleteFlag(::grpc::ServerContext* /*context*/, const ::oteldemo::DeleteFlagRequest* /*request*/, ::oteldemo::DeleteFlagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* DeleteFlag( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithStreamedUnaryMethod_GetFlag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_GetFlag() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::StreamedUnaryHandler< + ::oteldemo::GetFlagRequest, ::oteldemo::GetFlagResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::oteldemo::GetFlagRequest, ::oteldemo::GetFlagResponse>* streamer) { + return this->StreamedGetFlag(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_GetFlag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status GetFlag(::grpc::ServerContext* /*context*/, const ::oteldemo::GetFlagRequest* /*request*/, ::oteldemo::GetFlagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedGetFlag(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::oteldemo::GetFlagRequest,::oteldemo::GetFlagResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_CreateFlag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_CreateFlag() { + ::grpc::Service::MarkMethodStreamed(1, + new ::grpc::internal::StreamedUnaryHandler< + ::oteldemo::CreateFlagRequest, ::oteldemo::CreateFlagResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::oteldemo::CreateFlagRequest, ::oteldemo::CreateFlagResponse>* streamer) { + return this->StreamedCreateFlag(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_CreateFlag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status CreateFlag(::grpc::ServerContext* /*context*/, const ::oteldemo::CreateFlagRequest* /*request*/, ::oteldemo::CreateFlagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedCreateFlag(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::oteldemo::CreateFlagRequest,::oteldemo::CreateFlagResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_UpdateFlag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_UpdateFlag() { + ::grpc::Service::MarkMethodStreamed(2, + new ::grpc::internal::StreamedUnaryHandler< + ::oteldemo::UpdateFlagRequest, ::oteldemo::UpdateFlagResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::oteldemo::UpdateFlagRequest, ::oteldemo::UpdateFlagResponse>* streamer) { + return this->StreamedUpdateFlag(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_UpdateFlag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status UpdateFlag(::grpc::ServerContext* /*context*/, const ::oteldemo::UpdateFlagRequest* /*request*/, ::oteldemo::UpdateFlagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedUpdateFlag(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::oteldemo::UpdateFlagRequest,::oteldemo::UpdateFlagResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_ListFlags : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_ListFlags() { + ::grpc::Service::MarkMethodStreamed(3, + new ::grpc::internal::StreamedUnaryHandler< + ::oteldemo::ListFlagsRequest, ::oteldemo::ListFlagsResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::oteldemo::ListFlagsRequest, ::oteldemo::ListFlagsResponse>* streamer) { + return this->StreamedListFlags(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_ListFlags() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status ListFlags(::grpc::ServerContext* /*context*/, const ::oteldemo::ListFlagsRequest* /*request*/, ::oteldemo::ListFlagsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedListFlags(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::oteldemo::ListFlagsRequest,::oteldemo::ListFlagsResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_DeleteFlag : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_DeleteFlag() { + ::grpc::Service::MarkMethodStreamed(4, + new ::grpc::internal::StreamedUnaryHandler< + ::oteldemo::DeleteFlagRequest, ::oteldemo::DeleteFlagResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::oteldemo::DeleteFlagRequest, ::oteldemo::DeleteFlagResponse>* streamer) { + return this->StreamedDeleteFlag(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_DeleteFlag() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status DeleteFlag(::grpc::ServerContext* /*context*/, const ::oteldemo::DeleteFlagRequest* /*request*/, ::oteldemo::DeleteFlagResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedDeleteFlag(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::oteldemo::DeleteFlagRequest,::oteldemo::DeleteFlagResponse>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_GetFlag > > > > StreamedUnaryService; + typedef Service SplitStreamedService; + typedef WithStreamedUnaryMethod_GetFlag > > > > StreamedService; +}; + +} // namespace oteldemo + + +#endif // GRPC_demo_2eproto__INCLUDED diff --git a/src/currency/build/generated/proto/demo.pb.cc b/src/currency/build/generated/proto/demo.pb.cc new file mode 100644 index 0000000000..96126972c0 --- /dev/null +++ b/src/currency/build/generated/proto/demo.pb.cc @@ -0,0 +1,10792 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: demo.proto + +#include "demo.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG + +namespace _pb = ::PROTOBUF_NAMESPACE_ID; +namespace _pbi = _pb::internal; + +namespace oteldemo { +PROTOBUF_CONSTEXPR CartItem::CartItem( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.product_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.quantity_)*/0 + , /*decltype(_impl_._cached_size_)*/{}} {} +struct CartItemDefaultTypeInternal { + PROTOBUF_CONSTEXPR CartItemDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~CartItemDefaultTypeInternal() {} + union { + CartItem _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CartItemDefaultTypeInternal _CartItem_default_instance_; +PROTOBUF_CONSTEXPR AddItemRequest::AddItemRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.user_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.item_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct AddItemRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR AddItemRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~AddItemRequestDefaultTypeInternal() {} + union { + AddItemRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AddItemRequestDefaultTypeInternal _AddItemRequest_default_instance_; +PROTOBUF_CONSTEXPR EmptyCartRequest::EmptyCartRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.user_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct EmptyCartRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR EmptyCartRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~EmptyCartRequestDefaultTypeInternal() {} + union { + EmptyCartRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EmptyCartRequestDefaultTypeInternal _EmptyCartRequest_default_instance_; +PROTOBUF_CONSTEXPR GetCartRequest::GetCartRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.user_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct GetCartRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetCartRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~GetCartRequestDefaultTypeInternal() {} + union { + GetCartRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetCartRequestDefaultTypeInternal _GetCartRequest_default_instance_; +PROTOBUF_CONSTEXPR Cart::Cart( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.items_)*/{} + , /*decltype(_impl_.user_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct CartDefaultTypeInternal { + PROTOBUF_CONSTEXPR CartDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~CartDefaultTypeInternal() {} + union { + Cart _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CartDefaultTypeInternal _Cart_default_instance_; +PROTOBUF_CONSTEXPR Empty::Empty( + ::_pbi::ConstantInitialized) {} +struct EmptyDefaultTypeInternal { + PROTOBUF_CONSTEXPR EmptyDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~EmptyDefaultTypeInternal() {} + union { + Empty _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EmptyDefaultTypeInternal _Empty_default_instance_; +PROTOBUF_CONSTEXPR ListRecommendationsRequest::ListRecommendationsRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.product_ids_)*/{} + , /*decltype(_impl_.user_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ListRecommendationsRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR ListRecommendationsRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ListRecommendationsRequestDefaultTypeInternal() {} + union { + ListRecommendationsRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ListRecommendationsRequestDefaultTypeInternal _ListRecommendationsRequest_default_instance_; +PROTOBUF_CONSTEXPR ListRecommendationsResponse::ListRecommendationsResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.product_ids_)*/{} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ListRecommendationsResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR ListRecommendationsResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ListRecommendationsResponseDefaultTypeInternal() {} + union { + ListRecommendationsResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ListRecommendationsResponseDefaultTypeInternal _ListRecommendationsResponse_default_instance_; +PROTOBUF_CONSTEXPR Product::Product( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.categories_)*/{} + , /*decltype(_impl_.id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.description_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.picture_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.price_usd_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ProductDefaultTypeInternal { + PROTOBUF_CONSTEXPR ProductDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ProductDefaultTypeInternal() {} + union { + Product _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ProductDefaultTypeInternal _Product_default_instance_; +PROTOBUF_CONSTEXPR ListProductsResponse::ListProductsResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.products_)*/{} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ListProductsResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR ListProductsResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ListProductsResponseDefaultTypeInternal() {} + union { + ListProductsResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ListProductsResponseDefaultTypeInternal _ListProductsResponse_default_instance_; +PROTOBUF_CONSTEXPR GetProductRequest::GetProductRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct GetProductRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetProductRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~GetProductRequestDefaultTypeInternal() {} + union { + GetProductRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetProductRequestDefaultTypeInternal _GetProductRequest_default_instance_; +PROTOBUF_CONSTEXPR SearchProductsRequest::SearchProductsRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.query_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct SearchProductsRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR SearchProductsRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~SearchProductsRequestDefaultTypeInternal() {} + union { + SearchProductsRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SearchProductsRequestDefaultTypeInternal _SearchProductsRequest_default_instance_; +PROTOBUF_CONSTEXPR SearchProductsResponse::SearchProductsResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.results_)*/{} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct SearchProductsResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR SearchProductsResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~SearchProductsResponseDefaultTypeInternal() {} + union { + SearchProductsResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SearchProductsResponseDefaultTypeInternal _SearchProductsResponse_default_instance_; +PROTOBUF_CONSTEXPR GetQuoteRequest::GetQuoteRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.items_)*/{} + , /*decltype(_impl_.address_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct GetQuoteRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetQuoteRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~GetQuoteRequestDefaultTypeInternal() {} + union { + GetQuoteRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetQuoteRequestDefaultTypeInternal _GetQuoteRequest_default_instance_; +PROTOBUF_CONSTEXPR GetQuoteResponse::GetQuoteResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.cost_usd_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct GetQuoteResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetQuoteResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~GetQuoteResponseDefaultTypeInternal() {} + union { + GetQuoteResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetQuoteResponseDefaultTypeInternal _GetQuoteResponse_default_instance_; +PROTOBUF_CONSTEXPR ShipOrderRequest::ShipOrderRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.items_)*/{} + , /*decltype(_impl_.address_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ShipOrderRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR ShipOrderRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ShipOrderRequestDefaultTypeInternal() {} + union { + ShipOrderRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ShipOrderRequestDefaultTypeInternal _ShipOrderRequest_default_instance_; +PROTOBUF_CONSTEXPR ShipOrderResponse::ShipOrderResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.tracking_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ShipOrderResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR ShipOrderResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ShipOrderResponseDefaultTypeInternal() {} + union { + ShipOrderResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ShipOrderResponseDefaultTypeInternal _ShipOrderResponse_default_instance_; +PROTOBUF_CONSTEXPR Address::Address( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.street_address_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.city_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.state_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.country_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.zip_code_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct AddressDefaultTypeInternal { + PROTOBUF_CONSTEXPR AddressDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~AddressDefaultTypeInternal() {} + union { + Address _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AddressDefaultTypeInternal _Address_default_instance_; +PROTOBUF_CONSTEXPR Money::Money( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.currency_code_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.units_)*/int64_t{0} + , /*decltype(_impl_.nanos_)*/0 + , /*decltype(_impl_._cached_size_)*/{}} {} +struct MoneyDefaultTypeInternal { + PROTOBUF_CONSTEXPR MoneyDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~MoneyDefaultTypeInternal() {} + union { + Money _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MoneyDefaultTypeInternal _Money_default_instance_; +PROTOBUF_CONSTEXPR GetSupportedCurrenciesResponse::GetSupportedCurrenciesResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.currency_codes_)*/{} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct GetSupportedCurrenciesResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetSupportedCurrenciesResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~GetSupportedCurrenciesResponseDefaultTypeInternal() {} + union { + GetSupportedCurrenciesResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetSupportedCurrenciesResponseDefaultTypeInternal _GetSupportedCurrenciesResponse_default_instance_; +PROTOBUF_CONSTEXPR CurrencyConversionRequest::CurrencyConversionRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.to_code_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.from_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct CurrencyConversionRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR CurrencyConversionRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~CurrencyConversionRequestDefaultTypeInternal() {} + union { + CurrencyConversionRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CurrencyConversionRequestDefaultTypeInternal _CurrencyConversionRequest_default_instance_; +PROTOBUF_CONSTEXPR CreditCardInfo::CreditCardInfo( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.credit_card_number_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.credit_card_cvv_)*/0 + , /*decltype(_impl_.credit_card_expiration_year_)*/0 + , /*decltype(_impl_.credit_card_expiration_month_)*/0 + , /*decltype(_impl_._cached_size_)*/{}} {} +struct CreditCardInfoDefaultTypeInternal { + PROTOBUF_CONSTEXPR CreditCardInfoDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~CreditCardInfoDefaultTypeInternal() {} + union { + CreditCardInfo _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CreditCardInfoDefaultTypeInternal _CreditCardInfo_default_instance_; +PROTOBUF_CONSTEXPR ChargeRequest::ChargeRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.amount_)*/nullptr + , /*decltype(_impl_.credit_card_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ChargeRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR ChargeRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ChargeRequestDefaultTypeInternal() {} + union { + ChargeRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ChargeRequestDefaultTypeInternal _ChargeRequest_default_instance_; +PROTOBUF_CONSTEXPR ChargeResponse::ChargeResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.transaction_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ChargeResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR ChargeResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ChargeResponseDefaultTypeInternal() {} + union { + ChargeResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ChargeResponseDefaultTypeInternal _ChargeResponse_default_instance_; +PROTOBUF_CONSTEXPR OrderItem::OrderItem( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.item_)*/nullptr + , /*decltype(_impl_.cost_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct OrderItemDefaultTypeInternal { + PROTOBUF_CONSTEXPR OrderItemDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~OrderItemDefaultTypeInternal() {} + union { + OrderItem _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OrderItemDefaultTypeInternal _OrderItem_default_instance_; +PROTOBUF_CONSTEXPR OrderResult::OrderResult( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.items_)*/{} + , /*decltype(_impl_.order_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.shipping_tracking_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.shipping_cost_)*/nullptr + , /*decltype(_impl_.shipping_address_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct OrderResultDefaultTypeInternal { + PROTOBUF_CONSTEXPR OrderResultDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~OrderResultDefaultTypeInternal() {} + union { + OrderResult _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OrderResultDefaultTypeInternal _OrderResult_default_instance_; +PROTOBUF_CONSTEXPR SendOrderConfirmationRequest::SendOrderConfirmationRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.email_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.order_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct SendOrderConfirmationRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR SendOrderConfirmationRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~SendOrderConfirmationRequestDefaultTypeInternal() {} + union { + SendOrderConfirmationRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SendOrderConfirmationRequestDefaultTypeInternal _SendOrderConfirmationRequest_default_instance_; +PROTOBUF_CONSTEXPR PlaceOrderRequest::PlaceOrderRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.user_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.user_currency_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.email_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.address_)*/nullptr + , /*decltype(_impl_.credit_card_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct PlaceOrderRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR PlaceOrderRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~PlaceOrderRequestDefaultTypeInternal() {} + union { + PlaceOrderRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PlaceOrderRequestDefaultTypeInternal _PlaceOrderRequest_default_instance_; +PROTOBUF_CONSTEXPR PlaceOrderResponse::PlaceOrderResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.order_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct PlaceOrderResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR PlaceOrderResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~PlaceOrderResponseDefaultTypeInternal() {} + union { + PlaceOrderResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PlaceOrderResponseDefaultTypeInternal _PlaceOrderResponse_default_instance_; +PROTOBUF_CONSTEXPR AdRequest::AdRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.context_keys_)*/{} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct AdRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR AdRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~AdRequestDefaultTypeInternal() {} + union { + AdRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AdRequestDefaultTypeInternal _AdRequest_default_instance_; +PROTOBUF_CONSTEXPR AdResponse::AdResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.ads_)*/{} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct AdResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR AdResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~AdResponseDefaultTypeInternal() {} + union { + AdResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AdResponseDefaultTypeInternal _AdResponse_default_instance_; +PROTOBUF_CONSTEXPR Ad::Ad( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.redirect_url_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.text_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct AdDefaultTypeInternal { + PROTOBUF_CONSTEXPR AdDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~AdDefaultTypeInternal() {} + union { + Ad _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AdDefaultTypeInternal _Ad_default_instance_; +PROTOBUF_CONSTEXPR Flag::Flag( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.description_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.enabled_)*/false + , /*decltype(_impl_._cached_size_)*/{}} {} +struct FlagDefaultTypeInternal { + PROTOBUF_CONSTEXPR FlagDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~FlagDefaultTypeInternal() {} + union { + Flag _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FlagDefaultTypeInternal _Flag_default_instance_; +PROTOBUF_CONSTEXPR GetFlagRequest::GetFlagRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct GetFlagRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetFlagRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~GetFlagRequestDefaultTypeInternal() {} + union { + GetFlagRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetFlagRequestDefaultTypeInternal _GetFlagRequest_default_instance_; +PROTOBUF_CONSTEXPR GetFlagResponse::GetFlagResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.flag_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct GetFlagResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetFlagResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~GetFlagResponseDefaultTypeInternal() {} + union { + GetFlagResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetFlagResponseDefaultTypeInternal _GetFlagResponse_default_instance_; +PROTOBUF_CONSTEXPR CreateFlagRequest::CreateFlagRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.description_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.enabled_)*/false + , /*decltype(_impl_._cached_size_)*/{}} {} +struct CreateFlagRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR CreateFlagRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~CreateFlagRequestDefaultTypeInternal() {} + union { + CreateFlagRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CreateFlagRequestDefaultTypeInternal _CreateFlagRequest_default_instance_; +PROTOBUF_CONSTEXPR CreateFlagResponse::CreateFlagResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.flag_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct CreateFlagResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR CreateFlagResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~CreateFlagResponseDefaultTypeInternal() {} + union { + CreateFlagResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CreateFlagResponseDefaultTypeInternal _CreateFlagResponse_default_instance_; +PROTOBUF_CONSTEXPR UpdateFlagRequest::UpdateFlagRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.enabled_)*/false + , /*decltype(_impl_._cached_size_)*/{}} {} +struct UpdateFlagRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR UpdateFlagRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~UpdateFlagRequestDefaultTypeInternal() {} + union { + UpdateFlagRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UpdateFlagRequestDefaultTypeInternal _UpdateFlagRequest_default_instance_; +PROTOBUF_CONSTEXPR UpdateFlagResponse::UpdateFlagResponse( + ::_pbi::ConstantInitialized) {} +struct UpdateFlagResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR UpdateFlagResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~UpdateFlagResponseDefaultTypeInternal() {} + union { + UpdateFlagResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UpdateFlagResponseDefaultTypeInternal _UpdateFlagResponse_default_instance_; +PROTOBUF_CONSTEXPR ListFlagsRequest::ListFlagsRequest( + ::_pbi::ConstantInitialized) {} +struct ListFlagsRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR ListFlagsRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ListFlagsRequestDefaultTypeInternal() {} + union { + ListFlagsRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ListFlagsRequestDefaultTypeInternal _ListFlagsRequest_default_instance_; +PROTOBUF_CONSTEXPR ListFlagsResponse::ListFlagsResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.flag_)*/{} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ListFlagsResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR ListFlagsResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ListFlagsResponseDefaultTypeInternal() {} + union { + ListFlagsResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ListFlagsResponseDefaultTypeInternal _ListFlagsResponse_default_instance_; +PROTOBUF_CONSTEXPR DeleteFlagRequest::DeleteFlagRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct DeleteFlagRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR DeleteFlagRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~DeleteFlagRequestDefaultTypeInternal() {} + union { + DeleteFlagRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteFlagRequestDefaultTypeInternal _DeleteFlagRequest_default_instance_; +PROTOBUF_CONSTEXPR DeleteFlagResponse::DeleteFlagResponse( + ::_pbi::ConstantInitialized) {} +struct DeleteFlagResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR DeleteFlagResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~DeleteFlagResponseDefaultTypeInternal() {} + union { + DeleteFlagResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteFlagResponseDefaultTypeInternal _DeleteFlagResponse_default_instance_; +} // namespace oteldemo +static ::_pb::Metadata file_level_metadata_demo_2eproto[43]; +static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_demo_2eproto = nullptr; +static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_demo_2eproto = nullptr; + +const uint32_t TableStruct_demo_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::CartItem, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::CartItem, _impl_.product_id_), + PROTOBUF_FIELD_OFFSET(::oteldemo::CartItem, _impl_.quantity_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::AddItemRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::AddItemRequest, _impl_.user_id_), + PROTOBUF_FIELD_OFFSET(::oteldemo::AddItemRequest, _impl_.item_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::EmptyCartRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::EmptyCartRequest, _impl_.user_id_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::GetCartRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::GetCartRequest, _impl_.user_id_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::Cart, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::Cart, _impl_.user_id_), + PROTOBUF_FIELD_OFFSET(::oteldemo::Cart, _impl_.items_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::Empty, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::ListRecommendationsRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::ListRecommendationsRequest, _impl_.user_id_), + PROTOBUF_FIELD_OFFSET(::oteldemo::ListRecommendationsRequest, _impl_.product_ids_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::ListRecommendationsResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::ListRecommendationsResponse, _impl_.product_ids_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::Product, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::Product, _impl_.id_), + PROTOBUF_FIELD_OFFSET(::oteldemo::Product, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::oteldemo::Product, _impl_.description_), + PROTOBUF_FIELD_OFFSET(::oteldemo::Product, _impl_.picture_), + PROTOBUF_FIELD_OFFSET(::oteldemo::Product, _impl_.price_usd_), + PROTOBUF_FIELD_OFFSET(::oteldemo::Product, _impl_.categories_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::ListProductsResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::ListProductsResponse, _impl_.products_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::GetProductRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::GetProductRequest, _impl_.id_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::SearchProductsRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::SearchProductsRequest, _impl_.query_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::SearchProductsResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::SearchProductsResponse, _impl_.results_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::GetQuoteRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::GetQuoteRequest, _impl_.address_), + PROTOBUF_FIELD_OFFSET(::oteldemo::GetQuoteRequest, _impl_.items_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::GetQuoteResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::GetQuoteResponse, _impl_.cost_usd_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::ShipOrderRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::ShipOrderRequest, _impl_.address_), + PROTOBUF_FIELD_OFFSET(::oteldemo::ShipOrderRequest, _impl_.items_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::ShipOrderResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::ShipOrderResponse, _impl_.tracking_id_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::Address, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::Address, _impl_.street_address_), + PROTOBUF_FIELD_OFFSET(::oteldemo::Address, _impl_.city_), + PROTOBUF_FIELD_OFFSET(::oteldemo::Address, _impl_.state_), + PROTOBUF_FIELD_OFFSET(::oteldemo::Address, _impl_.country_), + PROTOBUF_FIELD_OFFSET(::oteldemo::Address, _impl_.zip_code_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::Money, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::Money, _impl_.currency_code_), + PROTOBUF_FIELD_OFFSET(::oteldemo::Money, _impl_.units_), + PROTOBUF_FIELD_OFFSET(::oteldemo::Money, _impl_.nanos_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::GetSupportedCurrenciesResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::GetSupportedCurrenciesResponse, _impl_.currency_codes_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::CurrencyConversionRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::CurrencyConversionRequest, _impl_.from_), + PROTOBUF_FIELD_OFFSET(::oteldemo::CurrencyConversionRequest, _impl_.to_code_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::CreditCardInfo, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::CreditCardInfo, _impl_.credit_card_number_), + PROTOBUF_FIELD_OFFSET(::oteldemo::CreditCardInfo, _impl_.credit_card_cvv_), + PROTOBUF_FIELD_OFFSET(::oteldemo::CreditCardInfo, _impl_.credit_card_expiration_year_), + PROTOBUF_FIELD_OFFSET(::oteldemo::CreditCardInfo, _impl_.credit_card_expiration_month_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::ChargeRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::ChargeRequest, _impl_.amount_), + PROTOBUF_FIELD_OFFSET(::oteldemo::ChargeRequest, _impl_.credit_card_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::ChargeResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::ChargeResponse, _impl_.transaction_id_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::OrderItem, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::OrderItem, _impl_.item_), + PROTOBUF_FIELD_OFFSET(::oteldemo::OrderItem, _impl_.cost_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::OrderResult, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::OrderResult, _impl_.order_id_), + PROTOBUF_FIELD_OFFSET(::oteldemo::OrderResult, _impl_.shipping_tracking_id_), + PROTOBUF_FIELD_OFFSET(::oteldemo::OrderResult, _impl_.shipping_cost_), + PROTOBUF_FIELD_OFFSET(::oteldemo::OrderResult, _impl_.shipping_address_), + PROTOBUF_FIELD_OFFSET(::oteldemo::OrderResult, _impl_.items_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::SendOrderConfirmationRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::SendOrderConfirmationRequest, _impl_.email_), + PROTOBUF_FIELD_OFFSET(::oteldemo::SendOrderConfirmationRequest, _impl_.order_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::PlaceOrderRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::PlaceOrderRequest, _impl_.user_id_), + PROTOBUF_FIELD_OFFSET(::oteldemo::PlaceOrderRequest, _impl_.user_currency_), + PROTOBUF_FIELD_OFFSET(::oteldemo::PlaceOrderRequest, _impl_.address_), + PROTOBUF_FIELD_OFFSET(::oteldemo::PlaceOrderRequest, _impl_.email_), + PROTOBUF_FIELD_OFFSET(::oteldemo::PlaceOrderRequest, _impl_.credit_card_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::PlaceOrderResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::PlaceOrderResponse, _impl_.order_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::AdRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::AdRequest, _impl_.context_keys_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::AdResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::AdResponse, _impl_.ads_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::Ad, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::Ad, _impl_.redirect_url_), + PROTOBUF_FIELD_OFFSET(::oteldemo::Ad, _impl_.text_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::Flag, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::Flag, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::oteldemo::Flag, _impl_.description_), + PROTOBUF_FIELD_OFFSET(::oteldemo::Flag, _impl_.enabled_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::GetFlagRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::GetFlagRequest, _impl_.name_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::GetFlagResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::GetFlagResponse, _impl_.flag_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::CreateFlagRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::CreateFlagRequest, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::oteldemo::CreateFlagRequest, _impl_.description_), + PROTOBUF_FIELD_OFFSET(::oteldemo::CreateFlagRequest, _impl_.enabled_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::CreateFlagResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::CreateFlagResponse, _impl_.flag_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::UpdateFlagRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::UpdateFlagRequest, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::oteldemo::UpdateFlagRequest, _impl_.enabled_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::UpdateFlagResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::ListFlagsRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::ListFlagsResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::ListFlagsResponse, _impl_.flag_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::DeleteFlagRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::oteldemo::DeleteFlagRequest, _impl_.name_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::DeleteFlagResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ +}; +static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, -1, sizeof(::oteldemo::CartItem)}, + { 8, -1, -1, sizeof(::oteldemo::AddItemRequest)}, + { 16, -1, -1, sizeof(::oteldemo::EmptyCartRequest)}, + { 23, -1, -1, sizeof(::oteldemo::GetCartRequest)}, + { 30, -1, -1, sizeof(::oteldemo::Cart)}, + { 38, -1, -1, sizeof(::oteldemo::Empty)}, + { 44, -1, -1, sizeof(::oteldemo::ListRecommendationsRequest)}, + { 52, -1, -1, sizeof(::oteldemo::ListRecommendationsResponse)}, + { 59, -1, -1, sizeof(::oteldemo::Product)}, + { 71, -1, -1, sizeof(::oteldemo::ListProductsResponse)}, + { 78, -1, -1, sizeof(::oteldemo::GetProductRequest)}, + { 85, -1, -1, sizeof(::oteldemo::SearchProductsRequest)}, + { 92, -1, -1, sizeof(::oteldemo::SearchProductsResponse)}, + { 99, -1, -1, sizeof(::oteldemo::GetQuoteRequest)}, + { 107, -1, -1, sizeof(::oteldemo::GetQuoteResponse)}, + { 114, -1, -1, sizeof(::oteldemo::ShipOrderRequest)}, + { 122, -1, -1, sizeof(::oteldemo::ShipOrderResponse)}, + { 129, -1, -1, sizeof(::oteldemo::Address)}, + { 140, -1, -1, sizeof(::oteldemo::Money)}, + { 149, -1, -1, sizeof(::oteldemo::GetSupportedCurrenciesResponse)}, + { 156, -1, -1, sizeof(::oteldemo::CurrencyConversionRequest)}, + { 164, -1, -1, sizeof(::oteldemo::CreditCardInfo)}, + { 174, -1, -1, sizeof(::oteldemo::ChargeRequest)}, + { 182, -1, -1, sizeof(::oteldemo::ChargeResponse)}, + { 189, -1, -1, sizeof(::oteldemo::OrderItem)}, + { 197, -1, -1, sizeof(::oteldemo::OrderResult)}, + { 208, -1, -1, sizeof(::oteldemo::SendOrderConfirmationRequest)}, + { 216, -1, -1, sizeof(::oteldemo::PlaceOrderRequest)}, + { 227, -1, -1, sizeof(::oteldemo::PlaceOrderResponse)}, + { 234, -1, -1, sizeof(::oteldemo::AdRequest)}, + { 241, -1, -1, sizeof(::oteldemo::AdResponse)}, + { 248, -1, -1, sizeof(::oteldemo::Ad)}, + { 256, -1, -1, sizeof(::oteldemo::Flag)}, + { 265, -1, -1, sizeof(::oteldemo::GetFlagRequest)}, + { 272, -1, -1, sizeof(::oteldemo::GetFlagResponse)}, + { 279, -1, -1, sizeof(::oteldemo::CreateFlagRequest)}, + { 288, -1, -1, sizeof(::oteldemo::CreateFlagResponse)}, + { 295, -1, -1, sizeof(::oteldemo::UpdateFlagRequest)}, + { 303, -1, -1, sizeof(::oteldemo::UpdateFlagResponse)}, + { 309, -1, -1, sizeof(::oteldemo::ListFlagsRequest)}, + { 315, -1, -1, sizeof(::oteldemo::ListFlagsResponse)}, + { 322, -1, -1, sizeof(::oteldemo::DeleteFlagRequest)}, + { 329, -1, -1, sizeof(::oteldemo::DeleteFlagResponse)}, +}; + +static const ::_pb::Message* const file_default_instances[] = { + &::oteldemo::_CartItem_default_instance_._instance, + &::oteldemo::_AddItemRequest_default_instance_._instance, + &::oteldemo::_EmptyCartRequest_default_instance_._instance, + &::oteldemo::_GetCartRequest_default_instance_._instance, + &::oteldemo::_Cart_default_instance_._instance, + &::oteldemo::_Empty_default_instance_._instance, + &::oteldemo::_ListRecommendationsRequest_default_instance_._instance, + &::oteldemo::_ListRecommendationsResponse_default_instance_._instance, + &::oteldemo::_Product_default_instance_._instance, + &::oteldemo::_ListProductsResponse_default_instance_._instance, + &::oteldemo::_GetProductRequest_default_instance_._instance, + &::oteldemo::_SearchProductsRequest_default_instance_._instance, + &::oteldemo::_SearchProductsResponse_default_instance_._instance, + &::oteldemo::_GetQuoteRequest_default_instance_._instance, + &::oteldemo::_GetQuoteResponse_default_instance_._instance, + &::oteldemo::_ShipOrderRequest_default_instance_._instance, + &::oteldemo::_ShipOrderResponse_default_instance_._instance, + &::oteldemo::_Address_default_instance_._instance, + &::oteldemo::_Money_default_instance_._instance, + &::oteldemo::_GetSupportedCurrenciesResponse_default_instance_._instance, + &::oteldemo::_CurrencyConversionRequest_default_instance_._instance, + &::oteldemo::_CreditCardInfo_default_instance_._instance, + &::oteldemo::_ChargeRequest_default_instance_._instance, + &::oteldemo::_ChargeResponse_default_instance_._instance, + &::oteldemo::_OrderItem_default_instance_._instance, + &::oteldemo::_OrderResult_default_instance_._instance, + &::oteldemo::_SendOrderConfirmationRequest_default_instance_._instance, + &::oteldemo::_PlaceOrderRequest_default_instance_._instance, + &::oteldemo::_PlaceOrderResponse_default_instance_._instance, + &::oteldemo::_AdRequest_default_instance_._instance, + &::oteldemo::_AdResponse_default_instance_._instance, + &::oteldemo::_Ad_default_instance_._instance, + &::oteldemo::_Flag_default_instance_._instance, + &::oteldemo::_GetFlagRequest_default_instance_._instance, + &::oteldemo::_GetFlagResponse_default_instance_._instance, + &::oteldemo::_CreateFlagRequest_default_instance_._instance, + &::oteldemo::_CreateFlagResponse_default_instance_._instance, + &::oteldemo::_UpdateFlagRequest_default_instance_._instance, + &::oteldemo::_UpdateFlagResponse_default_instance_._instance, + &::oteldemo::_ListFlagsRequest_default_instance_._instance, + &::oteldemo::_ListFlagsResponse_default_instance_._instance, + &::oteldemo::_DeleteFlagRequest_default_instance_._instance, + &::oteldemo::_DeleteFlagResponse_default_instance_._instance, +}; + +const char descriptor_table_protodef_demo_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\ndemo.proto\022\010oteldemo\"0\n\010CartItem\022\022\n\npr" + "oduct_id\030\001 \001(\t\022\020\n\010quantity\030\002 \001(\005\"C\n\016AddI" + "temRequest\022\017\n\007user_id\030\001 \001(\t\022 \n\004item\030\002 \001(" + "\0132\022.oteldemo.CartItem\"#\n\020EmptyCartReques" + "t\022\017\n\007user_id\030\001 \001(\t\"!\n\016GetCartRequest\022\017\n\007" + "user_id\030\001 \001(\t\":\n\004Cart\022\017\n\007user_id\030\001 \001(\t\022!" + "\n\005items\030\002 \003(\0132\022.oteldemo.CartItem\"\007\n\005Emp" + "ty\"B\n\032ListRecommendationsRequest\022\017\n\007user" + "_id\030\001 \001(\t\022\023\n\013product_ids\030\002 \003(\t\"2\n\033ListRe" + "commendationsResponse\022\023\n\013product_ids\030\001 \003" + "(\t\"\201\001\n\007Product\022\n\n\002id\030\001 \001(\t\022\014\n\004name\030\002 \001(\t" + "\022\023\n\013description\030\003 \001(\t\022\017\n\007picture\030\004 \001(\t\022\"" + "\n\tprice_usd\030\005 \001(\0132\017.oteldemo.Money\022\022\n\nca" + "tegories\030\006 \003(\t\";\n\024ListProductsResponse\022#" + "\n\010products\030\001 \003(\0132\021.oteldemo.Product\"\037\n\021G" + "etProductRequest\022\n\n\002id\030\001 \001(\t\"&\n\025SearchPr" + "oductsRequest\022\r\n\005query\030\001 \001(\t\"<\n\026SearchPr" + "oductsResponse\022\"\n\007results\030\001 \003(\0132\021.otelde" + "mo.Product\"X\n\017GetQuoteRequest\022\"\n\007address" + "\030\001 \001(\0132\021.oteldemo.Address\022!\n\005items\030\002 \003(\013" + "2\022.oteldemo.CartItem\"5\n\020GetQuoteResponse" + "\022!\n\010cost_usd\030\001 \001(\0132\017.oteldemo.Money\"Y\n\020S" + "hipOrderRequest\022\"\n\007address\030\001 \001(\0132\021.oteld" + "emo.Address\022!\n\005items\030\002 \003(\0132\022.oteldemo.Ca" + "rtItem\"(\n\021ShipOrderResponse\022\023\n\013tracking_" + "id\030\001 \001(\t\"a\n\007Address\022\026\n\016street_address\030\001 " + "\001(\t\022\014\n\004city\030\002 \001(\t\022\r\n\005state\030\003 \001(\t\022\017\n\007coun" + "try\030\004 \001(\t\022\020\n\010zip_code\030\005 \001(\t\"<\n\005Money\022\025\n\r" + "currency_code\030\001 \001(\t\022\r\n\005units\030\002 \001(\003\022\r\n\005na" + "nos\030\003 \001(\005\"8\n\036GetSupportedCurrenciesRespo" + "nse\022\026\n\016currency_codes\030\001 \003(\t\"K\n\031CurrencyC" + "onversionRequest\022\035\n\004from\030\001 \001(\0132\017.oteldem" + "o.Money\022\017\n\007to_code\030\002 \001(\t\"\220\001\n\016CreditCardI" + "nfo\022\032\n\022credit_card_number\030\001 \001(\t\022\027\n\017credi" + "t_card_cvv\030\002 \001(\005\022#\n\033credit_card_expirati" + "on_year\030\003 \001(\005\022$\n\034credit_card_expiration_" + "month\030\004 \001(\005\"_\n\rChargeRequest\022\037\n\006amount\030\001" + " \001(\0132\017.oteldemo.Money\022-\n\013credit_card\030\002 \001" + "(\0132\030.oteldemo.CreditCardInfo\"(\n\016ChargeRe" + "sponse\022\026\n\016transaction_id\030\001 \001(\t\"L\n\tOrderI" + "tem\022 \n\004item\030\001 \001(\0132\022.oteldemo.CartItem\022\035\n" + "\004cost\030\002 \001(\0132\017.oteldemo.Money\"\266\001\n\013OrderRe" + "sult\022\020\n\010order_id\030\001 \001(\t\022\034\n\024shipping_track" + "ing_id\030\002 \001(\t\022&\n\rshipping_cost\030\003 \001(\0132\017.ot" + "eldemo.Money\022+\n\020shipping_address\030\004 \001(\0132\021" + ".oteldemo.Address\022\"\n\005items\030\005 \003(\0132\023.oteld" + "emo.OrderItem\"S\n\034SendOrderConfirmationRe" + "quest\022\r\n\005email\030\001 \001(\t\022$\n\005order\030\002 \001(\0132\025.ot" + "eldemo.OrderResult\"\235\001\n\021PlaceOrderRequest" + "\022\017\n\007user_id\030\001 \001(\t\022\025\n\ruser_currency\030\002 \001(\t" + "\022\"\n\007address\030\003 \001(\0132\021.oteldemo.Address\022\r\n\005" + "email\030\005 \001(\t\022-\n\013credit_card\030\006 \001(\0132\030.oteld" + "emo.CreditCardInfo\":\n\022PlaceOrderResponse" + "\022$\n\005order\030\001 \001(\0132\025.oteldemo.OrderResult\"!" + "\n\tAdRequest\022\024\n\014context_keys\030\001 \003(\t\"\'\n\nAdR" + "esponse\022\031\n\003ads\030\001 \003(\0132\014.oteldemo.Ad\"(\n\002Ad" + "\022\024\n\014redirect_url\030\001 \001(\t\022\014\n\004text\030\002 \001(\t\":\n\004" + "Flag\022\014\n\004name\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022" + "\017\n\007enabled\030\003 \001(\010\"\036\n\016GetFlagRequest\022\014\n\004na" + "me\030\001 \001(\t\"/\n\017GetFlagResponse\022\034\n\004flag\030\001 \001(" + "\0132\016.oteldemo.Flag\"G\n\021CreateFlagRequest\022\014" + "\n\004name\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022\017\n\007ena" + "bled\030\003 \001(\010\"2\n\022CreateFlagResponse\022\034\n\004flag" + "\030\001 \001(\0132\016.oteldemo.Flag\"2\n\021UpdateFlagRequ" + "est\022\014\n\004name\030\001 \001(\t\022\017\n\007enabled\030\002 \001(\010\"\024\n\022Up" + "dateFlagResponse\"\022\n\020ListFlagsRequest\"1\n\021" + "ListFlagsResponse\022\034\n\004flag\030\001 \003(\0132\016.otelde" + "mo.Flag\"!\n\021DeleteFlagRequest\022\014\n\004name\030\001 \001" + "(\t\"\024\n\022DeleteFlagResponse2\270\001\n\013CartService" + "\0226\n\007AddItem\022\030.oteldemo.AddItemRequest\032\017." + "oteldemo.Empty\"\000\0225\n\007GetCart\022\030.oteldemo.G" + "etCartRequest\032\016.oteldemo.Cart\"\000\022:\n\tEmpty" + "Cart\022\032.oteldemo.EmptyCartRequest\032\017.oteld" + "emo.Empty\"\0002}\n\025RecommendationService\022d\n\023" + "ListRecommendations\022$.oteldemo.ListRecom" + "mendationsRequest\032%.oteldemo.ListRecomme" + "ndationsResponse\"\0002\361\001\n\025ProductCatalogSer" + "vice\022A\n\014ListProducts\022\017.oteldemo.Empty\032\036." + "oteldemo.ListProductsResponse\"\000\022>\n\nGetPr" + "oduct\022\033.oteldemo.GetProductRequest\032\021.ote" + "ldemo.Product\"\000\022U\n\016SearchProducts\022\037.otel" + "demo.SearchProductsRequest\032 .oteldemo.Se" + "archProductsResponse\"\0002\236\001\n\017ShippingServi" + "ce\022C\n\010GetQuote\022\031.oteldemo.GetQuoteReques" + "t\032\032.oteldemo.GetQuoteResponse\"\000\022F\n\tShipO" + "rder\022\032.oteldemo.ShipOrderRequest\032\033.oteld" + "emo.ShipOrderResponse\"\0002\253\001\n\017CurrencyServ" + "ice\022U\n\026GetSupportedCurrencies\022\017.oteldemo" + ".Empty\032(.oteldemo.GetSupportedCurrencies" + "Response\"\000\022A\n\007Convert\022#.oteldemo.Currenc" + "yConversionRequest\032\017.oteldemo.Money\"\0002O\n" + "\016PaymentService\022=\n\006Charge\022\027.oteldemo.Cha" + "rgeRequest\032\030.oteldemo.ChargeResponse\"\0002b" + "\n\014EmailService\022R\n\025SendOrderConfirmation\022" + "&.oteldemo.SendOrderConfirmationRequest\032" + "\017.oteldemo.Empty\"\0002\\\n\017CheckoutService\022I\n" + "\nPlaceOrder\022\033.oteldemo.PlaceOrderRequest" + "\032\034.oteldemo.PlaceOrderResponse\"\0002B\n\tAdSe" + "rvice\0225\n\006GetAds\022\023.oteldemo.AdRequest\032\024.o" + "teldemo.AdResponse\"\0002\377\002\n\022FeatureFlagServ" + "ice\022@\n\007GetFlag\022\030.oteldemo.GetFlagRequest" + "\032\031.oteldemo.GetFlagResponse\"\000\022I\n\nCreateF" + "lag\022\033.oteldemo.CreateFlagRequest\032\034.oteld" + "emo.CreateFlagResponse\"\000\022I\n\nUpdateFlag\022\033" + ".oteldemo.UpdateFlagRequest\032\034.oteldemo.U" + "pdateFlagResponse\"\000\022F\n\tListFlags\022\032.oteld" + "emo.ListFlagsRequest\032\033.oteldemo.ListFlag" + "sResponse\"\000\022I\n\nDeleteFlag\022\033.oteldemo.Del" + "eteFlagRequest\032\034.oteldemo.DeleteFlagResp" + "onse\"\000B\023Z\021genproto/oteldemob\006proto3" + ; +static ::_pbi::once_flag descriptor_table_demo_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_demo_2eproto = { + false, false, 4395, descriptor_table_protodef_demo_2eproto, + "demo.proto", + &descriptor_table_demo_2eproto_once, nullptr, 0, 43, + schemas, file_default_instances, TableStruct_demo_2eproto::offsets, + file_level_metadata_demo_2eproto, file_level_enum_descriptors_demo_2eproto, + file_level_service_descriptors_demo_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_demo_2eproto_getter() { + return &descriptor_table_demo_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_demo_2eproto(&descriptor_table_demo_2eproto); +namespace oteldemo { + +// =================================================================== + +class CartItem::_Internal { + public: +}; + +CartItem::CartItem(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.CartItem) +} +CartItem::CartItem(const CartItem& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + CartItem* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.product_id_){} + , decltype(_impl_.quantity_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.product_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.product_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_product_id().empty()) { + _this->_impl_.product_id_.Set(from._internal_product_id(), + _this->GetArenaForAllocation()); + } + _this->_impl_.quantity_ = from._impl_.quantity_; + // @@protoc_insertion_point(copy_constructor:oteldemo.CartItem) +} + +inline void CartItem::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.product_id_){} + , decltype(_impl_.quantity_){0} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.product_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.product_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +CartItem::~CartItem() { + // @@protoc_insertion_point(destructor:oteldemo.CartItem) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void CartItem::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.product_id_.Destroy(); +} + +void CartItem::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void CartItem::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.CartItem) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.product_id_.ClearToEmpty(); + _impl_.quantity_ = 0; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* CartItem::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string product_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_product_id(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.CartItem.product_id")); + } else + goto handle_unusual; + continue; + // int32 quantity = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _impl_.quantity_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* CartItem::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.CartItem) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string product_id = 1; + if (!this->_internal_product_id().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_product_id().data(), static_cast(this->_internal_product_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.CartItem.product_id"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_product_id(), target); + } + + // int32 quantity = 2; + if (this->_internal_quantity() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_quantity(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.CartItem) + return target; +} + +size_t CartItem::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.CartItem) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string product_id = 1; + if (!this->_internal_product_id().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_product_id()); + } + + // int32 quantity = 2; + if (this->_internal_quantity() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_quantity()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CartItem::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + CartItem::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CartItem::GetClassData() const { return &_class_data_; } + + +void CartItem::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.CartItem) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_product_id().empty()) { + _this->_internal_set_product_id(from._internal_product_id()); + } + if (from._internal_quantity() != 0) { + _this->_internal_set_quantity(from._internal_quantity()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void CartItem::CopyFrom(const CartItem& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.CartItem) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CartItem::IsInitialized() const { + return true; +} + +void CartItem::InternalSwap(CartItem* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.product_id_, lhs_arena, + &other->_impl_.product_id_, rhs_arena + ); + swap(_impl_.quantity_, other->_impl_.quantity_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata CartItem::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[0]); +} + +// =================================================================== + +class AddItemRequest::_Internal { + public: + static const ::oteldemo::CartItem& item(const AddItemRequest* msg); +}; + +const ::oteldemo::CartItem& +AddItemRequest::_Internal::item(const AddItemRequest* msg) { + return *msg->_impl_.item_; +} +AddItemRequest::AddItemRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.AddItemRequest) +} +AddItemRequest::AddItemRequest(const AddItemRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + AddItemRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.user_id_){} + , decltype(_impl_.item_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.user_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.user_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_user_id().empty()) { + _this->_impl_.user_id_.Set(from._internal_user_id(), + _this->GetArenaForAllocation()); + } + if (from._internal_has_item()) { + _this->_impl_.item_ = new ::oteldemo::CartItem(*from._impl_.item_); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.AddItemRequest) +} + +inline void AddItemRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.user_id_){} + , decltype(_impl_.item_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.user_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.user_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +AddItemRequest::~AddItemRequest() { + // @@protoc_insertion_point(destructor:oteldemo.AddItemRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void AddItemRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.user_id_.Destroy(); + if (this != internal_default_instance()) delete _impl_.item_; +} + +void AddItemRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void AddItemRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.AddItemRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.user_id_.ClearToEmpty(); + if (GetArenaForAllocation() == nullptr && _impl_.item_ != nullptr) { + delete _impl_.item_; + } + _impl_.item_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AddItemRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string user_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_user_id(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.AddItemRequest.user_id")); + } else + goto handle_unusual; + continue; + // .oteldemo.CartItem item = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_item(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* AddItemRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.AddItemRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string user_id = 1; + if (!this->_internal_user_id().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_user_id().data(), static_cast(this->_internal_user_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.AddItemRequest.user_id"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_user_id(), target); + } + + // .oteldemo.CartItem item = 2; + if (this->_internal_has_item()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, _Internal::item(this), + _Internal::item(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.AddItemRequest) + return target; +} + +size_t AddItemRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.AddItemRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string user_id = 1; + if (!this->_internal_user_id().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_user_id()); + } + + // .oteldemo.CartItem item = 2; + if (this->_internal_has_item()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.item_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AddItemRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + AddItemRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AddItemRequest::GetClassData() const { return &_class_data_; } + + +void AddItemRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.AddItemRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_user_id().empty()) { + _this->_internal_set_user_id(from._internal_user_id()); + } + if (from._internal_has_item()) { + _this->_internal_mutable_item()->::oteldemo::CartItem::MergeFrom( + from._internal_item()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void AddItemRequest::CopyFrom(const AddItemRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.AddItemRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AddItemRequest::IsInitialized() const { + return true; +} + +void AddItemRequest::InternalSwap(AddItemRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.user_id_, lhs_arena, + &other->_impl_.user_id_, rhs_arena + ); + swap(_impl_.item_, other->_impl_.item_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AddItemRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[1]); +} + +// =================================================================== + +class EmptyCartRequest::_Internal { + public: +}; + +EmptyCartRequest::EmptyCartRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.EmptyCartRequest) +} +EmptyCartRequest::EmptyCartRequest(const EmptyCartRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + EmptyCartRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.user_id_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.user_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.user_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_user_id().empty()) { + _this->_impl_.user_id_.Set(from._internal_user_id(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.EmptyCartRequest) +} + +inline void EmptyCartRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.user_id_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.user_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.user_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +EmptyCartRequest::~EmptyCartRequest() { + // @@protoc_insertion_point(destructor:oteldemo.EmptyCartRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void EmptyCartRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.user_id_.Destroy(); +} + +void EmptyCartRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void EmptyCartRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.EmptyCartRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.user_id_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* EmptyCartRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string user_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_user_id(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.EmptyCartRequest.user_id")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* EmptyCartRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.EmptyCartRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string user_id = 1; + if (!this->_internal_user_id().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_user_id().data(), static_cast(this->_internal_user_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.EmptyCartRequest.user_id"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_user_id(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.EmptyCartRequest) + return target; +} + +size_t EmptyCartRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.EmptyCartRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string user_id = 1; + if (!this->_internal_user_id().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_user_id()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EmptyCartRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + EmptyCartRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EmptyCartRequest::GetClassData() const { return &_class_data_; } + + +void EmptyCartRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.EmptyCartRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_user_id().empty()) { + _this->_internal_set_user_id(from._internal_user_id()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void EmptyCartRequest::CopyFrom(const EmptyCartRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.EmptyCartRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool EmptyCartRequest::IsInitialized() const { + return true; +} + +void EmptyCartRequest::InternalSwap(EmptyCartRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.user_id_, lhs_arena, + &other->_impl_.user_id_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata EmptyCartRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[2]); +} + +// =================================================================== + +class GetCartRequest::_Internal { + public: +}; + +GetCartRequest::GetCartRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.GetCartRequest) +} +GetCartRequest::GetCartRequest(const GetCartRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + GetCartRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.user_id_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.user_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.user_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_user_id().empty()) { + _this->_impl_.user_id_.Set(from._internal_user_id(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.GetCartRequest) +} + +inline void GetCartRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.user_id_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.user_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.user_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +GetCartRequest::~GetCartRequest() { + // @@protoc_insertion_point(destructor:oteldemo.GetCartRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void GetCartRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.user_id_.Destroy(); +} + +void GetCartRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void GetCartRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.GetCartRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.user_id_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GetCartRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string user_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_user_id(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.GetCartRequest.user_id")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* GetCartRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.GetCartRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string user_id = 1; + if (!this->_internal_user_id().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_user_id().data(), static_cast(this->_internal_user_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.GetCartRequest.user_id"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_user_id(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.GetCartRequest) + return target; +} + +size_t GetCartRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.GetCartRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string user_id = 1; + if (!this->_internal_user_id().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_user_id()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GetCartRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + GetCartRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetCartRequest::GetClassData() const { return &_class_data_; } + + +void GetCartRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.GetCartRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_user_id().empty()) { + _this->_internal_set_user_id(from._internal_user_id()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GetCartRequest::CopyFrom(const GetCartRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.GetCartRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GetCartRequest::IsInitialized() const { + return true; +} + +void GetCartRequest::InternalSwap(GetCartRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.user_id_, lhs_arena, + &other->_impl_.user_id_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GetCartRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[3]); +} + +// =================================================================== + +class Cart::_Internal { + public: +}; + +Cart::Cart(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.Cart) +} +Cart::Cart(const Cart& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + Cart* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.items_){from._impl_.items_} + , decltype(_impl_.user_id_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.user_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.user_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_user_id().empty()) { + _this->_impl_.user_id_.Set(from._internal_user_id(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.Cart) +} + +inline void Cart::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.items_){arena} + , decltype(_impl_.user_id_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.user_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.user_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +Cart::~Cart() { + // @@protoc_insertion_point(destructor:oteldemo.Cart) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Cart::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.items_.~RepeatedPtrField(); + _impl_.user_id_.Destroy(); +} + +void Cart::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Cart::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.Cart) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.items_.Clear(); + _impl_.user_id_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Cart::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string user_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_user_id(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.Cart.user_id")); + } else + goto handle_unusual; + continue; + // repeated .oteldemo.CartItem items = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_items(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Cart::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.Cart) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string user_id = 1; + if (!this->_internal_user_id().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_user_id().data(), static_cast(this->_internal_user_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.Cart.user_id"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_user_id(), target); + } + + // repeated .oteldemo.CartItem items = 2; + for (unsigned i = 0, + n = static_cast(this->_internal_items_size()); i < n; i++) { + const auto& repfield = this->_internal_items(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.Cart) + return target; +} + +size_t Cart::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.Cart) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .oteldemo.CartItem items = 2; + total_size += 1UL * this->_internal_items_size(); + for (const auto& msg : this->_impl_.items_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // string user_id = 1; + if (!this->_internal_user_id().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_user_id()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Cart::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + Cart::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Cart::GetClassData() const { return &_class_data_; } + + +void Cart::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.Cart) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.items_.MergeFrom(from._impl_.items_); + if (!from._internal_user_id().empty()) { + _this->_internal_set_user_id(from._internal_user_id()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void Cart::CopyFrom(const Cart& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.Cart) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Cart::IsInitialized() const { + return true; +} + +void Cart::InternalSwap(Cart* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.items_.InternalSwap(&other->_impl_.items_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.user_id_, lhs_arena, + &other->_impl_.user_id_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Cart::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[4]); +} + +// =================================================================== + +class Empty::_Internal { + public: +}; + +Empty::Empty(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase(arena, is_message_owned) { + // @@protoc_insertion_point(arena_constructor:oteldemo.Empty) +} +Empty::Empty(const Empty& from) + : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase() { + Empty* const _this = this; (void)_this; + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:oteldemo.Empty) +} + + + + + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Empty::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl, + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl, +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Empty::GetClassData() const { return &_class_data_; } + + + + + + + +::PROTOBUF_NAMESPACE_ID::Metadata Empty::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[5]); +} + +// =================================================================== + +class ListRecommendationsRequest::_Internal { + public: +}; + +ListRecommendationsRequest::ListRecommendationsRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.ListRecommendationsRequest) +} +ListRecommendationsRequest::ListRecommendationsRequest(const ListRecommendationsRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + ListRecommendationsRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.product_ids_){from._impl_.product_ids_} + , decltype(_impl_.user_id_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.user_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.user_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_user_id().empty()) { + _this->_impl_.user_id_.Set(from._internal_user_id(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.ListRecommendationsRequest) +} + +inline void ListRecommendationsRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.product_ids_){arena} + , decltype(_impl_.user_id_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.user_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.user_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +ListRecommendationsRequest::~ListRecommendationsRequest() { + // @@protoc_insertion_point(destructor:oteldemo.ListRecommendationsRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ListRecommendationsRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.product_ids_.~RepeatedPtrField(); + _impl_.user_id_.Destroy(); +} + +void ListRecommendationsRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ListRecommendationsRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.ListRecommendationsRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.product_ids_.Clear(); + _impl_.user_id_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ListRecommendationsRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string user_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_user_id(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.ListRecommendationsRequest.user_id")); + } else + goto handle_unusual; + continue; + // repeated string product_ids = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_product_ids(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.ListRecommendationsRequest.product_ids")); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ListRecommendationsRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.ListRecommendationsRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string user_id = 1; + if (!this->_internal_user_id().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_user_id().data(), static_cast(this->_internal_user_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.ListRecommendationsRequest.user_id"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_user_id(), target); + } + + // repeated string product_ids = 2; + for (int i = 0, n = this->_internal_product_ids_size(); i < n; i++) { + const auto& s = this->_internal_product_ids(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.ListRecommendationsRequest.product_ids"); + target = stream->WriteString(2, s, target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.ListRecommendationsRequest) + return target; +} + +size_t ListRecommendationsRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.ListRecommendationsRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string product_ids = 2; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.product_ids_.size()); + for (int i = 0, n = _impl_.product_ids_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + _impl_.product_ids_.Get(i)); + } + + // string user_id = 1; + if (!this->_internal_user_id().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_user_id()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ListRecommendationsRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + ListRecommendationsRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ListRecommendationsRequest::GetClassData() const { return &_class_data_; } + + +void ListRecommendationsRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.ListRecommendationsRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.product_ids_.MergeFrom(from._impl_.product_ids_); + if (!from._internal_user_id().empty()) { + _this->_internal_set_user_id(from._internal_user_id()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ListRecommendationsRequest::CopyFrom(const ListRecommendationsRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.ListRecommendationsRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ListRecommendationsRequest::IsInitialized() const { + return true; +} + +void ListRecommendationsRequest::InternalSwap(ListRecommendationsRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.product_ids_.InternalSwap(&other->_impl_.product_ids_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.user_id_, lhs_arena, + &other->_impl_.user_id_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ListRecommendationsRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[6]); +} + +// =================================================================== + +class ListRecommendationsResponse::_Internal { + public: +}; + +ListRecommendationsResponse::ListRecommendationsResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.ListRecommendationsResponse) +} +ListRecommendationsResponse::ListRecommendationsResponse(const ListRecommendationsResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + ListRecommendationsResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.product_ids_){from._impl_.product_ids_} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:oteldemo.ListRecommendationsResponse) +} + +inline void ListRecommendationsResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.product_ids_){arena} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +ListRecommendationsResponse::~ListRecommendationsResponse() { + // @@protoc_insertion_point(destructor:oteldemo.ListRecommendationsResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ListRecommendationsResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.product_ids_.~RepeatedPtrField(); +} + +void ListRecommendationsResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ListRecommendationsResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.ListRecommendationsResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.product_ids_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ListRecommendationsResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // repeated string product_ids = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_product_ids(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.ListRecommendationsResponse.product_ids")); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ListRecommendationsResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.ListRecommendationsResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated string product_ids = 1; + for (int i = 0, n = this->_internal_product_ids_size(); i < n; i++) { + const auto& s = this->_internal_product_ids(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.ListRecommendationsResponse.product_ids"); + target = stream->WriteString(1, s, target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.ListRecommendationsResponse) + return target; +} + +size_t ListRecommendationsResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.ListRecommendationsResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string product_ids = 1; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.product_ids_.size()); + for (int i = 0, n = _impl_.product_ids_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + _impl_.product_ids_.Get(i)); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ListRecommendationsResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + ListRecommendationsResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ListRecommendationsResponse::GetClassData() const { return &_class_data_; } + + +void ListRecommendationsResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.ListRecommendationsResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.product_ids_.MergeFrom(from._impl_.product_ids_); + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ListRecommendationsResponse::CopyFrom(const ListRecommendationsResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.ListRecommendationsResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ListRecommendationsResponse::IsInitialized() const { + return true; +} + +void ListRecommendationsResponse::InternalSwap(ListRecommendationsResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.product_ids_.InternalSwap(&other->_impl_.product_ids_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ListRecommendationsResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[7]); +} + +// =================================================================== + +class Product::_Internal { + public: + static const ::oteldemo::Money& price_usd(const Product* msg); +}; + +const ::oteldemo::Money& +Product::_Internal::price_usd(const Product* msg) { + return *msg->_impl_.price_usd_; +} +Product::Product(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.Product) +} +Product::Product(const Product& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + Product* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.categories_){from._impl_.categories_} + , decltype(_impl_.id_){} + , decltype(_impl_.name_){} + , decltype(_impl_.description_){} + , decltype(_impl_.picture_){} + , decltype(_impl_.price_usd_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_id().empty()) { + _this->_impl_.id_.Set(from._internal_id(), + _this->GetArenaForAllocation()); + } + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_name().empty()) { + _this->_impl_.name_.Set(from._internal_name(), + _this->GetArenaForAllocation()); + } + _impl_.description_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.description_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_description().empty()) { + _this->_impl_.description_.Set(from._internal_description(), + _this->GetArenaForAllocation()); + } + _impl_.picture_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.picture_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_picture().empty()) { + _this->_impl_.picture_.Set(from._internal_picture(), + _this->GetArenaForAllocation()); + } + if (from._internal_has_price_usd()) { + _this->_impl_.price_usd_ = new ::oteldemo::Money(*from._impl_.price_usd_); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.Product) +} + +inline void Product::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.categories_){arena} + , decltype(_impl_.id_){} + , decltype(_impl_.name_){} + , decltype(_impl_.description_){} + , decltype(_impl_.picture_){} + , decltype(_impl_.price_usd_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.description_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.description_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.picture_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.picture_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +Product::~Product() { + // @@protoc_insertion_point(destructor:oteldemo.Product) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Product::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.categories_.~RepeatedPtrField(); + _impl_.id_.Destroy(); + _impl_.name_.Destroy(); + _impl_.description_.Destroy(); + _impl_.picture_.Destroy(); + if (this != internal_default_instance()) delete _impl_.price_usd_; +} + +void Product::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Product::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.Product) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.categories_.Clear(); + _impl_.id_.ClearToEmpty(); + _impl_.name_.ClearToEmpty(); + _impl_.description_.ClearToEmpty(); + _impl_.picture_.ClearToEmpty(); + if (GetArenaForAllocation() == nullptr && _impl_.price_usd_ != nullptr) { + delete _impl_.price_usd_; + } + _impl_.price_usd_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Product::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_id(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.Product.id")); + } else + goto handle_unusual; + continue; + // string name = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.Product.name")); + } else + goto handle_unusual; + continue; + // string description = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_description(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.Product.description")); + } else + goto handle_unusual; + continue; + // string picture = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_picture(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.Product.picture")); + } else + goto handle_unusual; + continue; + // .oteldemo.Money price_usd = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + ptr = ctx->ParseMessage(_internal_mutable_price_usd(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated string categories = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_categories(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.Product.categories")); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Product::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.Product) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string id = 1; + if (!this->_internal_id().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_id().data(), static_cast(this->_internal_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.Product.id"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_id(), target); + } + + // string name = 2; + if (!this->_internal_name().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.Product.name"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_name(), target); + } + + // string description = 3; + if (!this->_internal_description().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_description().data(), static_cast(this->_internal_description().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.Product.description"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_description(), target); + } + + // string picture = 4; + if (!this->_internal_picture().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_picture().data(), static_cast(this->_internal_picture().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.Product.picture"); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_picture(), target); + } + + // .oteldemo.Money price_usd = 5; + if (this->_internal_has_price_usd()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(5, _Internal::price_usd(this), + _Internal::price_usd(this).GetCachedSize(), target, stream); + } + + // repeated string categories = 6; + for (int i = 0, n = this->_internal_categories_size(); i < n; i++) { + const auto& s = this->_internal_categories(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.Product.categories"); + target = stream->WriteString(6, s, target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.Product) + return target; +} + +size_t Product::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.Product) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string categories = 6; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.categories_.size()); + for (int i = 0, n = _impl_.categories_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + _impl_.categories_.Get(i)); + } + + // string id = 1; + if (!this->_internal_id().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_id()); + } + + // string name = 2; + if (!this->_internal_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // string description = 3; + if (!this->_internal_description().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_description()); + } + + // string picture = 4; + if (!this->_internal_picture().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_picture()); + } + + // .oteldemo.Money price_usd = 5; + if (this->_internal_has_price_usd()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.price_usd_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Product::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + Product::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Product::GetClassData() const { return &_class_data_; } + + +void Product::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.Product) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.categories_.MergeFrom(from._impl_.categories_); + if (!from._internal_id().empty()) { + _this->_internal_set_id(from._internal_id()); + } + if (!from._internal_name().empty()) { + _this->_internal_set_name(from._internal_name()); + } + if (!from._internal_description().empty()) { + _this->_internal_set_description(from._internal_description()); + } + if (!from._internal_picture().empty()) { + _this->_internal_set_picture(from._internal_picture()); + } + if (from._internal_has_price_usd()) { + _this->_internal_mutable_price_usd()->::oteldemo::Money::MergeFrom( + from._internal_price_usd()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void Product::CopyFrom(const Product& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.Product) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Product::IsInitialized() const { + return true; +} + +void Product::InternalSwap(Product* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.categories_.InternalSwap(&other->_impl_.categories_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.id_, lhs_arena, + &other->_impl_.id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.description_, lhs_arena, + &other->_impl_.description_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.picture_, lhs_arena, + &other->_impl_.picture_, rhs_arena + ); + swap(_impl_.price_usd_, other->_impl_.price_usd_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Product::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[8]); +} + +// =================================================================== + +class ListProductsResponse::_Internal { + public: +}; + +ListProductsResponse::ListProductsResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.ListProductsResponse) +} +ListProductsResponse::ListProductsResponse(const ListProductsResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + ListProductsResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.products_){from._impl_.products_} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:oteldemo.ListProductsResponse) +} + +inline void ListProductsResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.products_){arena} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +ListProductsResponse::~ListProductsResponse() { + // @@protoc_insertion_point(destructor:oteldemo.ListProductsResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ListProductsResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.products_.~RepeatedPtrField(); +} + +void ListProductsResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ListProductsResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.ListProductsResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.products_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ListProductsResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // repeated .oteldemo.Product products = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_products(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ListProductsResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.ListProductsResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .oteldemo.Product products = 1; + for (unsigned i = 0, + n = static_cast(this->_internal_products_size()); i < n; i++) { + const auto& repfield = this->_internal_products(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.ListProductsResponse) + return target; +} + +size_t ListProductsResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.ListProductsResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .oteldemo.Product products = 1; + total_size += 1UL * this->_internal_products_size(); + for (const auto& msg : this->_impl_.products_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ListProductsResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + ListProductsResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ListProductsResponse::GetClassData() const { return &_class_data_; } + + +void ListProductsResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.ListProductsResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.products_.MergeFrom(from._impl_.products_); + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ListProductsResponse::CopyFrom(const ListProductsResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.ListProductsResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ListProductsResponse::IsInitialized() const { + return true; +} + +void ListProductsResponse::InternalSwap(ListProductsResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.products_.InternalSwap(&other->_impl_.products_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ListProductsResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[9]); +} + +// =================================================================== + +class GetProductRequest::_Internal { + public: +}; + +GetProductRequest::GetProductRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.GetProductRequest) +} +GetProductRequest::GetProductRequest(const GetProductRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + GetProductRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.id_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_id().empty()) { + _this->_impl_.id_.Set(from._internal_id(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.GetProductRequest) +} + +inline void GetProductRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.id_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +GetProductRequest::~GetProductRequest() { + // @@protoc_insertion_point(destructor:oteldemo.GetProductRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void GetProductRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.id_.Destroy(); +} + +void GetProductRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void GetProductRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.GetProductRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.id_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GetProductRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_id(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.GetProductRequest.id")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* GetProductRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.GetProductRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string id = 1; + if (!this->_internal_id().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_id().data(), static_cast(this->_internal_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.GetProductRequest.id"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_id(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.GetProductRequest) + return target; +} + +size_t GetProductRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.GetProductRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string id = 1; + if (!this->_internal_id().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_id()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GetProductRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + GetProductRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetProductRequest::GetClassData() const { return &_class_data_; } + + +void GetProductRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.GetProductRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_id().empty()) { + _this->_internal_set_id(from._internal_id()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GetProductRequest::CopyFrom(const GetProductRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.GetProductRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GetProductRequest::IsInitialized() const { + return true; +} + +void GetProductRequest::InternalSwap(GetProductRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.id_, lhs_arena, + &other->_impl_.id_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GetProductRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[10]); +} + +// =================================================================== + +class SearchProductsRequest::_Internal { + public: +}; + +SearchProductsRequest::SearchProductsRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.SearchProductsRequest) +} +SearchProductsRequest::SearchProductsRequest(const SearchProductsRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + SearchProductsRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.query_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.query_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.query_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_query().empty()) { + _this->_impl_.query_.Set(from._internal_query(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.SearchProductsRequest) +} + +inline void SearchProductsRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.query_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.query_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.query_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +SearchProductsRequest::~SearchProductsRequest() { + // @@protoc_insertion_point(destructor:oteldemo.SearchProductsRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void SearchProductsRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.query_.Destroy(); +} + +void SearchProductsRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void SearchProductsRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.SearchProductsRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.query_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* SearchProductsRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string query = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_query(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.SearchProductsRequest.query")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* SearchProductsRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.SearchProductsRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string query = 1; + if (!this->_internal_query().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_query().data(), static_cast(this->_internal_query().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.SearchProductsRequest.query"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_query(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.SearchProductsRequest) + return target; +} + +size_t SearchProductsRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.SearchProductsRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string query = 1; + if (!this->_internal_query().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_query()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SearchProductsRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + SearchProductsRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SearchProductsRequest::GetClassData() const { return &_class_data_; } + + +void SearchProductsRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.SearchProductsRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_query().empty()) { + _this->_internal_set_query(from._internal_query()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void SearchProductsRequest::CopyFrom(const SearchProductsRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.SearchProductsRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool SearchProductsRequest::IsInitialized() const { + return true; +} + +void SearchProductsRequest::InternalSwap(SearchProductsRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.query_, lhs_arena, + &other->_impl_.query_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata SearchProductsRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[11]); +} + +// =================================================================== + +class SearchProductsResponse::_Internal { + public: +}; + +SearchProductsResponse::SearchProductsResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.SearchProductsResponse) +} +SearchProductsResponse::SearchProductsResponse(const SearchProductsResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + SearchProductsResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.results_){from._impl_.results_} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:oteldemo.SearchProductsResponse) +} + +inline void SearchProductsResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.results_){arena} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +SearchProductsResponse::~SearchProductsResponse() { + // @@protoc_insertion_point(destructor:oteldemo.SearchProductsResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void SearchProductsResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.results_.~RepeatedPtrField(); +} + +void SearchProductsResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void SearchProductsResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.SearchProductsResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.results_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* SearchProductsResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // repeated .oteldemo.Product results = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_results(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* SearchProductsResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.SearchProductsResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .oteldemo.Product results = 1; + for (unsigned i = 0, + n = static_cast(this->_internal_results_size()); i < n; i++) { + const auto& repfield = this->_internal_results(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.SearchProductsResponse) + return target; +} + +size_t SearchProductsResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.SearchProductsResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .oteldemo.Product results = 1; + total_size += 1UL * this->_internal_results_size(); + for (const auto& msg : this->_impl_.results_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SearchProductsResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + SearchProductsResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SearchProductsResponse::GetClassData() const { return &_class_data_; } + + +void SearchProductsResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.SearchProductsResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.results_.MergeFrom(from._impl_.results_); + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void SearchProductsResponse::CopyFrom(const SearchProductsResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.SearchProductsResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool SearchProductsResponse::IsInitialized() const { + return true; +} + +void SearchProductsResponse::InternalSwap(SearchProductsResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.results_.InternalSwap(&other->_impl_.results_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata SearchProductsResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[12]); +} + +// =================================================================== + +class GetQuoteRequest::_Internal { + public: + static const ::oteldemo::Address& address(const GetQuoteRequest* msg); +}; + +const ::oteldemo::Address& +GetQuoteRequest::_Internal::address(const GetQuoteRequest* msg) { + return *msg->_impl_.address_; +} +GetQuoteRequest::GetQuoteRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.GetQuoteRequest) +} +GetQuoteRequest::GetQuoteRequest(const GetQuoteRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + GetQuoteRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.items_){from._impl_.items_} + , decltype(_impl_.address_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_address()) { + _this->_impl_.address_ = new ::oteldemo::Address(*from._impl_.address_); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.GetQuoteRequest) +} + +inline void GetQuoteRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.items_){arena} + , decltype(_impl_.address_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +GetQuoteRequest::~GetQuoteRequest() { + // @@protoc_insertion_point(destructor:oteldemo.GetQuoteRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void GetQuoteRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.items_.~RepeatedPtrField(); + if (this != internal_default_instance()) delete _impl_.address_; +} + +void GetQuoteRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void GetQuoteRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.GetQuoteRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.items_.Clear(); + if (GetArenaForAllocation() == nullptr && _impl_.address_ != nullptr) { + delete _impl_.address_; + } + _impl_.address_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GetQuoteRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .oteldemo.Address address = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_address(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .oteldemo.CartItem items = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_items(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* GetQuoteRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.GetQuoteRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .oteldemo.Address address = 1; + if (this->_internal_has_address()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::address(this), + _Internal::address(this).GetCachedSize(), target, stream); + } + + // repeated .oteldemo.CartItem items = 2; + for (unsigned i = 0, + n = static_cast(this->_internal_items_size()); i < n; i++) { + const auto& repfield = this->_internal_items(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.GetQuoteRequest) + return target; +} + +size_t GetQuoteRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.GetQuoteRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .oteldemo.CartItem items = 2; + total_size += 1UL * this->_internal_items_size(); + for (const auto& msg : this->_impl_.items_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // .oteldemo.Address address = 1; + if (this->_internal_has_address()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.address_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GetQuoteRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + GetQuoteRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetQuoteRequest::GetClassData() const { return &_class_data_; } + + +void GetQuoteRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.GetQuoteRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.items_.MergeFrom(from._impl_.items_); + if (from._internal_has_address()) { + _this->_internal_mutable_address()->::oteldemo::Address::MergeFrom( + from._internal_address()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GetQuoteRequest::CopyFrom(const GetQuoteRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.GetQuoteRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GetQuoteRequest::IsInitialized() const { + return true; +} + +void GetQuoteRequest::InternalSwap(GetQuoteRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.items_.InternalSwap(&other->_impl_.items_); + swap(_impl_.address_, other->_impl_.address_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GetQuoteRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[13]); +} + +// =================================================================== + +class GetQuoteResponse::_Internal { + public: + static const ::oteldemo::Money& cost_usd(const GetQuoteResponse* msg); +}; + +const ::oteldemo::Money& +GetQuoteResponse::_Internal::cost_usd(const GetQuoteResponse* msg) { + return *msg->_impl_.cost_usd_; +} +GetQuoteResponse::GetQuoteResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.GetQuoteResponse) +} +GetQuoteResponse::GetQuoteResponse(const GetQuoteResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + GetQuoteResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.cost_usd_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_cost_usd()) { + _this->_impl_.cost_usd_ = new ::oteldemo::Money(*from._impl_.cost_usd_); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.GetQuoteResponse) +} + +inline void GetQuoteResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.cost_usd_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +GetQuoteResponse::~GetQuoteResponse() { + // @@protoc_insertion_point(destructor:oteldemo.GetQuoteResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void GetQuoteResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete _impl_.cost_usd_; +} + +void GetQuoteResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void GetQuoteResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.GetQuoteResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && _impl_.cost_usd_ != nullptr) { + delete _impl_.cost_usd_; + } + _impl_.cost_usd_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GetQuoteResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .oteldemo.Money cost_usd = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_cost_usd(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* GetQuoteResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.GetQuoteResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .oteldemo.Money cost_usd = 1; + if (this->_internal_has_cost_usd()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::cost_usd(this), + _Internal::cost_usd(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.GetQuoteResponse) + return target; +} + +size_t GetQuoteResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.GetQuoteResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .oteldemo.Money cost_usd = 1; + if (this->_internal_has_cost_usd()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.cost_usd_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GetQuoteResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + GetQuoteResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetQuoteResponse::GetClassData() const { return &_class_data_; } + + +void GetQuoteResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.GetQuoteResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_cost_usd()) { + _this->_internal_mutable_cost_usd()->::oteldemo::Money::MergeFrom( + from._internal_cost_usd()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GetQuoteResponse::CopyFrom(const GetQuoteResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.GetQuoteResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GetQuoteResponse::IsInitialized() const { + return true; +} + +void GetQuoteResponse::InternalSwap(GetQuoteResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.cost_usd_, other->_impl_.cost_usd_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GetQuoteResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[14]); +} + +// =================================================================== + +class ShipOrderRequest::_Internal { + public: + static const ::oteldemo::Address& address(const ShipOrderRequest* msg); +}; + +const ::oteldemo::Address& +ShipOrderRequest::_Internal::address(const ShipOrderRequest* msg) { + return *msg->_impl_.address_; +} +ShipOrderRequest::ShipOrderRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.ShipOrderRequest) +} +ShipOrderRequest::ShipOrderRequest(const ShipOrderRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + ShipOrderRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.items_){from._impl_.items_} + , decltype(_impl_.address_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_address()) { + _this->_impl_.address_ = new ::oteldemo::Address(*from._impl_.address_); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.ShipOrderRequest) +} + +inline void ShipOrderRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.items_){arena} + , decltype(_impl_.address_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +ShipOrderRequest::~ShipOrderRequest() { + // @@protoc_insertion_point(destructor:oteldemo.ShipOrderRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ShipOrderRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.items_.~RepeatedPtrField(); + if (this != internal_default_instance()) delete _impl_.address_; +} + +void ShipOrderRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ShipOrderRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.ShipOrderRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.items_.Clear(); + if (GetArenaForAllocation() == nullptr && _impl_.address_ != nullptr) { + delete _impl_.address_; + } + _impl_.address_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ShipOrderRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .oteldemo.Address address = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_address(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .oteldemo.CartItem items = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_items(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ShipOrderRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.ShipOrderRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .oteldemo.Address address = 1; + if (this->_internal_has_address()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::address(this), + _Internal::address(this).GetCachedSize(), target, stream); + } + + // repeated .oteldemo.CartItem items = 2; + for (unsigned i = 0, + n = static_cast(this->_internal_items_size()); i < n; i++) { + const auto& repfield = this->_internal_items(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.ShipOrderRequest) + return target; +} + +size_t ShipOrderRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.ShipOrderRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .oteldemo.CartItem items = 2; + total_size += 1UL * this->_internal_items_size(); + for (const auto& msg : this->_impl_.items_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // .oteldemo.Address address = 1; + if (this->_internal_has_address()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.address_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ShipOrderRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + ShipOrderRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ShipOrderRequest::GetClassData() const { return &_class_data_; } + + +void ShipOrderRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.ShipOrderRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.items_.MergeFrom(from._impl_.items_); + if (from._internal_has_address()) { + _this->_internal_mutable_address()->::oteldemo::Address::MergeFrom( + from._internal_address()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ShipOrderRequest::CopyFrom(const ShipOrderRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.ShipOrderRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ShipOrderRequest::IsInitialized() const { + return true; +} + +void ShipOrderRequest::InternalSwap(ShipOrderRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.items_.InternalSwap(&other->_impl_.items_); + swap(_impl_.address_, other->_impl_.address_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ShipOrderRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[15]); +} + +// =================================================================== + +class ShipOrderResponse::_Internal { + public: +}; + +ShipOrderResponse::ShipOrderResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.ShipOrderResponse) +} +ShipOrderResponse::ShipOrderResponse(const ShipOrderResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + ShipOrderResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.tracking_id_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.tracking_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.tracking_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_tracking_id().empty()) { + _this->_impl_.tracking_id_.Set(from._internal_tracking_id(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.ShipOrderResponse) +} + +inline void ShipOrderResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.tracking_id_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.tracking_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.tracking_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +ShipOrderResponse::~ShipOrderResponse() { + // @@protoc_insertion_point(destructor:oteldemo.ShipOrderResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ShipOrderResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.tracking_id_.Destroy(); +} + +void ShipOrderResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ShipOrderResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.ShipOrderResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.tracking_id_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ShipOrderResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string tracking_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_tracking_id(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.ShipOrderResponse.tracking_id")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ShipOrderResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.ShipOrderResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string tracking_id = 1; + if (!this->_internal_tracking_id().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_tracking_id().data(), static_cast(this->_internal_tracking_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.ShipOrderResponse.tracking_id"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_tracking_id(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.ShipOrderResponse) + return target; +} + +size_t ShipOrderResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.ShipOrderResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string tracking_id = 1; + if (!this->_internal_tracking_id().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_tracking_id()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ShipOrderResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + ShipOrderResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ShipOrderResponse::GetClassData() const { return &_class_data_; } + + +void ShipOrderResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.ShipOrderResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_tracking_id().empty()) { + _this->_internal_set_tracking_id(from._internal_tracking_id()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ShipOrderResponse::CopyFrom(const ShipOrderResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.ShipOrderResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ShipOrderResponse::IsInitialized() const { + return true; +} + +void ShipOrderResponse::InternalSwap(ShipOrderResponse* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.tracking_id_, lhs_arena, + &other->_impl_.tracking_id_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ShipOrderResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[16]); +} + +// =================================================================== + +class Address::_Internal { + public: +}; + +Address::Address(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.Address) +} +Address::Address(const Address& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + Address* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.street_address_){} + , decltype(_impl_.city_){} + , decltype(_impl_.state_){} + , decltype(_impl_.country_){} + , decltype(_impl_.zip_code_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.street_address_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.street_address_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_street_address().empty()) { + _this->_impl_.street_address_.Set(from._internal_street_address(), + _this->GetArenaForAllocation()); + } + _impl_.city_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.city_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_city().empty()) { + _this->_impl_.city_.Set(from._internal_city(), + _this->GetArenaForAllocation()); + } + _impl_.state_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.state_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_state().empty()) { + _this->_impl_.state_.Set(from._internal_state(), + _this->GetArenaForAllocation()); + } + _impl_.country_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.country_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_country().empty()) { + _this->_impl_.country_.Set(from._internal_country(), + _this->GetArenaForAllocation()); + } + _impl_.zip_code_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.zip_code_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_zip_code().empty()) { + _this->_impl_.zip_code_.Set(from._internal_zip_code(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.Address) +} + +inline void Address::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.street_address_){} + , decltype(_impl_.city_){} + , decltype(_impl_.state_){} + , decltype(_impl_.country_){} + , decltype(_impl_.zip_code_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.street_address_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.street_address_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.city_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.city_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.state_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.state_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.country_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.country_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.zip_code_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.zip_code_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +Address::~Address() { + // @@protoc_insertion_point(destructor:oteldemo.Address) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Address::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.street_address_.Destroy(); + _impl_.city_.Destroy(); + _impl_.state_.Destroy(); + _impl_.country_.Destroy(); + _impl_.zip_code_.Destroy(); +} + +void Address::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Address::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.Address) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.street_address_.ClearToEmpty(); + _impl_.city_.ClearToEmpty(); + _impl_.state_.ClearToEmpty(); + _impl_.country_.ClearToEmpty(); + _impl_.zip_code_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Address::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string street_address = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_street_address(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.Address.street_address")); + } else + goto handle_unusual; + continue; + // string city = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_city(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.Address.city")); + } else + goto handle_unusual; + continue; + // string state = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_state(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.Address.state")); + } else + goto handle_unusual; + continue; + // string country = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_country(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.Address.country")); + } else + goto handle_unusual; + continue; + // string zip_code = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + auto str = _internal_mutable_zip_code(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.Address.zip_code")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Address::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.Address) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string street_address = 1; + if (!this->_internal_street_address().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_street_address().data(), static_cast(this->_internal_street_address().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.Address.street_address"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_street_address(), target); + } + + // string city = 2; + if (!this->_internal_city().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_city().data(), static_cast(this->_internal_city().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.Address.city"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_city(), target); + } + + // string state = 3; + if (!this->_internal_state().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_state().data(), static_cast(this->_internal_state().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.Address.state"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_state(), target); + } + + // string country = 4; + if (!this->_internal_country().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_country().data(), static_cast(this->_internal_country().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.Address.country"); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_country(), target); + } + + // string zip_code = 5; + if (!this->_internal_zip_code().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_zip_code().data(), static_cast(this->_internal_zip_code().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.Address.zip_code"); + target = stream->WriteStringMaybeAliased( + 5, this->_internal_zip_code(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.Address) + return target; +} + +size_t Address::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.Address) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string street_address = 1; + if (!this->_internal_street_address().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_street_address()); + } + + // string city = 2; + if (!this->_internal_city().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_city()); + } + + // string state = 3; + if (!this->_internal_state().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_state()); + } + + // string country = 4; + if (!this->_internal_country().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_country()); + } + + // string zip_code = 5; + if (!this->_internal_zip_code().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_zip_code()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Address::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + Address::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Address::GetClassData() const { return &_class_data_; } + + +void Address::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.Address) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_street_address().empty()) { + _this->_internal_set_street_address(from._internal_street_address()); + } + if (!from._internal_city().empty()) { + _this->_internal_set_city(from._internal_city()); + } + if (!from._internal_state().empty()) { + _this->_internal_set_state(from._internal_state()); + } + if (!from._internal_country().empty()) { + _this->_internal_set_country(from._internal_country()); + } + if (!from._internal_zip_code().empty()) { + _this->_internal_set_zip_code(from._internal_zip_code()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void Address::CopyFrom(const Address& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.Address) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Address::IsInitialized() const { + return true; +} + +void Address::InternalSwap(Address* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.street_address_, lhs_arena, + &other->_impl_.street_address_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.city_, lhs_arena, + &other->_impl_.city_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.state_, lhs_arena, + &other->_impl_.state_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.country_, lhs_arena, + &other->_impl_.country_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.zip_code_, lhs_arena, + &other->_impl_.zip_code_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Address::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[17]); +} + +// =================================================================== + +class Money::_Internal { + public: +}; + +Money::Money(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.Money) +} +Money::Money(const Money& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + Money* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.currency_code_){} + , decltype(_impl_.units_){} + , decltype(_impl_.nanos_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.currency_code_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.currency_code_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_currency_code().empty()) { + _this->_impl_.currency_code_.Set(from._internal_currency_code(), + _this->GetArenaForAllocation()); + } + ::memcpy(&_impl_.units_, &from._impl_.units_, + static_cast(reinterpret_cast(&_impl_.nanos_) - + reinterpret_cast(&_impl_.units_)) + sizeof(_impl_.nanos_)); + // @@protoc_insertion_point(copy_constructor:oteldemo.Money) +} + +inline void Money::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.currency_code_){} + , decltype(_impl_.units_){int64_t{0}} + , decltype(_impl_.nanos_){0} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.currency_code_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.currency_code_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +Money::~Money() { + // @@protoc_insertion_point(destructor:oteldemo.Money) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Money::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.currency_code_.Destroy(); +} + +void Money::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Money::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.Money) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.currency_code_.ClearToEmpty(); + ::memset(&_impl_.units_, 0, static_cast( + reinterpret_cast(&_impl_.nanos_) - + reinterpret_cast(&_impl_.units_)) + sizeof(_impl_.nanos_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Money::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string currency_code = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_currency_code(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.Money.currency_code")); + } else + goto handle_unusual; + continue; + // int64 units = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _impl_.units_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // int32 nanos = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _impl_.nanos_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Money::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.Money) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string currency_code = 1; + if (!this->_internal_currency_code().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_currency_code().data(), static_cast(this->_internal_currency_code().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.Money.currency_code"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_currency_code(), target); + } + + // int64 units = 2; + if (this->_internal_units() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_units(), target); + } + + // int32 nanos = 3; + if (this->_internal_nanos() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_nanos(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.Money) + return target; +} + +size_t Money::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.Money) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string currency_code = 1; + if (!this->_internal_currency_code().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_currency_code()); + } + + // int64 units = 2; + if (this->_internal_units() != 0) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_units()); + } + + // int32 nanos = 3; + if (this->_internal_nanos() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_nanos()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Money::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + Money::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Money::GetClassData() const { return &_class_data_; } + + +void Money::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.Money) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_currency_code().empty()) { + _this->_internal_set_currency_code(from._internal_currency_code()); + } + if (from._internal_units() != 0) { + _this->_internal_set_units(from._internal_units()); + } + if (from._internal_nanos() != 0) { + _this->_internal_set_nanos(from._internal_nanos()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void Money::CopyFrom(const Money& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.Money) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Money::IsInitialized() const { + return true; +} + +void Money::InternalSwap(Money* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.currency_code_, lhs_arena, + &other->_impl_.currency_code_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Money, _impl_.nanos_) + + sizeof(Money::_impl_.nanos_) + - PROTOBUF_FIELD_OFFSET(Money, _impl_.units_)>( + reinterpret_cast(&_impl_.units_), + reinterpret_cast(&other->_impl_.units_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Money::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[18]); +} + +// =================================================================== + +class GetSupportedCurrenciesResponse::_Internal { + public: +}; + +GetSupportedCurrenciesResponse::GetSupportedCurrenciesResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.GetSupportedCurrenciesResponse) +} +GetSupportedCurrenciesResponse::GetSupportedCurrenciesResponse(const GetSupportedCurrenciesResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + GetSupportedCurrenciesResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.currency_codes_){from._impl_.currency_codes_} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:oteldemo.GetSupportedCurrenciesResponse) +} + +inline void GetSupportedCurrenciesResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.currency_codes_){arena} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +GetSupportedCurrenciesResponse::~GetSupportedCurrenciesResponse() { + // @@protoc_insertion_point(destructor:oteldemo.GetSupportedCurrenciesResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void GetSupportedCurrenciesResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.currency_codes_.~RepeatedPtrField(); +} + +void GetSupportedCurrenciesResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void GetSupportedCurrenciesResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.GetSupportedCurrenciesResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.currency_codes_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GetSupportedCurrenciesResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // repeated string currency_codes = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_currency_codes(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.GetSupportedCurrenciesResponse.currency_codes")); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* GetSupportedCurrenciesResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.GetSupportedCurrenciesResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated string currency_codes = 1; + for (int i = 0, n = this->_internal_currency_codes_size(); i < n; i++) { + const auto& s = this->_internal_currency_codes(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.GetSupportedCurrenciesResponse.currency_codes"); + target = stream->WriteString(1, s, target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.GetSupportedCurrenciesResponse) + return target; +} + +size_t GetSupportedCurrenciesResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.GetSupportedCurrenciesResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string currency_codes = 1; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.currency_codes_.size()); + for (int i = 0, n = _impl_.currency_codes_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + _impl_.currency_codes_.Get(i)); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GetSupportedCurrenciesResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + GetSupportedCurrenciesResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetSupportedCurrenciesResponse::GetClassData() const { return &_class_data_; } + + +void GetSupportedCurrenciesResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.GetSupportedCurrenciesResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.currency_codes_.MergeFrom(from._impl_.currency_codes_); + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GetSupportedCurrenciesResponse::CopyFrom(const GetSupportedCurrenciesResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.GetSupportedCurrenciesResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GetSupportedCurrenciesResponse::IsInitialized() const { + return true; +} + +void GetSupportedCurrenciesResponse::InternalSwap(GetSupportedCurrenciesResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.currency_codes_.InternalSwap(&other->_impl_.currency_codes_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GetSupportedCurrenciesResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[19]); +} + +// =================================================================== + +class CurrencyConversionRequest::_Internal { + public: + static const ::oteldemo::Money& from(const CurrencyConversionRequest* msg); +}; + +const ::oteldemo::Money& +CurrencyConversionRequest::_Internal::from(const CurrencyConversionRequest* msg) { + return *msg->_impl_.from_; +} +CurrencyConversionRequest::CurrencyConversionRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.CurrencyConversionRequest) +} +CurrencyConversionRequest::CurrencyConversionRequest(const CurrencyConversionRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + CurrencyConversionRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.to_code_){} + , decltype(_impl_.from_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.to_code_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.to_code_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_to_code().empty()) { + _this->_impl_.to_code_.Set(from._internal_to_code(), + _this->GetArenaForAllocation()); + } + if (from._internal_has_from()) { + _this->_impl_.from_ = new ::oteldemo::Money(*from._impl_.from_); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.CurrencyConversionRequest) +} + +inline void CurrencyConversionRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.to_code_){} + , decltype(_impl_.from_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.to_code_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.to_code_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +CurrencyConversionRequest::~CurrencyConversionRequest() { + // @@protoc_insertion_point(destructor:oteldemo.CurrencyConversionRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void CurrencyConversionRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.to_code_.Destroy(); + if (this != internal_default_instance()) delete _impl_.from_; +} + +void CurrencyConversionRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void CurrencyConversionRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.CurrencyConversionRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.to_code_.ClearToEmpty(); + if (GetArenaForAllocation() == nullptr && _impl_.from_ != nullptr) { + delete _impl_.from_; + } + _impl_.from_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* CurrencyConversionRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .oteldemo.Money from = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_from(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string to_code = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_to_code(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.CurrencyConversionRequest.to_code")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* CurrencyConversionRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.CurrencyConversionRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .oteldemo.Money from = 1; + if (this->_internal_has_from()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::from(this), + _Internal::from(this).GetCachedSize(), target, stream); + } + + // string to_code = 2; + if (!this->_internal_to_code().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_to_code().data(), static_cast(this->_internal_to_code().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.CurrencyConversionRequest.to_code"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_to_code(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.CurrencyConversionRequest) + return target; +} + +size_t CurrencyConversionRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.CurrencyConversionRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string to_code = 2; + if (!this->_internal_to_code().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_to_code()); + } + + // .oteldemo.Money from = 1; + if (this->_internal_has_from()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.from_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CurrencyConversionRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + CurrencyConversionRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CurrencyConversionRequest::GetClassData() const { return &_class_data_; } + + +void CurrencyConversionRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.CurrencyConversionRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_to_code().empty()) { + _this->_internal_set_to_code(from._internal_to_code()); + } + if (from._internal_has_from()) { + _this->_internal_mutable_from()->::oteldemo::Money::MergeFrom( + from._internal_from()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void CurrencyConversionRequest::CopyFrom(const CurrencyConversionRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.CurrencyConversionRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CurrencyConversionRequest::IsInitialized() const { + return true; +} + +void CurrencyConversionRequest::InternalSwap(CurrencyConversionRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.to_code_, lhs_arena, + &other->_impl_.to_code_, rhs_arena + ); + swap(_impl_.from_, other->_impl_.from_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata CurrencyConversionRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[20]); +} + +// =================================================================== + +class CreditCardInfo::_Internal { + public: +}; + +CreditCardInfo::CreditCardInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.CreditCardInfo) +} +CreditCardInfo::CreditCardInfo(const CreditCardInfo& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + CreditCardInfo* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.credit_card_number_){} + , decltype(_impl_.credit_card_cvv_){} + , decltype(_impl_.credit_card_expiration_year_){} + , decltype(_impl_.credit_card_expiration_month_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.credit_card_number_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.credit_card_number_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_credit_card_number().empty()) { + _this->_impl_.credit_card_number_.Set(from._internal_credit_card_number(), + _this->GetArenaForAllocation()); + } + ::memcpy(&_impl_.credit_card_cvv_, &from._impl_.credit_card_cvv_, + static_cast(reinterpret_cast(&_impl_.credit_card_expiration_month_) - + reinterpret_cast(&_impl_.credit_card_cvv_)) + sizeof(_impl_.credit_card_expiration_month_)); + // @@protoc_insertion_point(copy_constructor:oteldemo.CreditCardInfo) +} + +inline void CreditCardInfo::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.credit_card_number_){} + , decltype(_impl_.credit_card_cvv_){0} + , decltype(_impl_.credit_card_expiration_year_){0} + , decltype(_impl_.credit_card_expiration_month_){0} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.credit_card_number_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.credit_card_number_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +CreditCardInfo::~CreditCardInfo() { + // @@protoc_insertion_point(destructor:oteldemo.CreditCardInfo) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void CreditCardInfo::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.credit_card_number_.Destroy(); +} + +void CreditCardInfo::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void CreditCardInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.CreditCardInfo) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.credit_card_number_.ClearToEmpty(); + ::memset(&_impl_.credit_card_cvv_, 0, static_cast( + reinterpret_cast(&_impl_.credit_card_expiration_month_) - + reinterpret_cast(&_impl_.credit_card_cvv_)) + sizeof(_impl_.credit_card_expiration_month_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* CreditCardInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string credit_card_number = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_credit_card_number(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.CreditCardInfo.credit_card_number")); + } else + goto handle_unusual; + continue; + // int32 credit_card_cvv = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _impl_.credit_card_cvv_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // int32 credit_card_expiration_year = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _impl_.credit_card_expiration_year_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // int32 credit_card_expiration_month = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + _impl_.credit_card_expiration_month_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* CreditCardInfo::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.CreditCardInfo) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string credit_card_number = 1; + if (!this->_internal_credit_card_number().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_credit_card_number().data(), static_cast(this->_internal_credit_card_number().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.CreditCardInfo.credit_card_number"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_credit_card_number(), target); + } + + // int32 credit_card_cvv = 2; + if (this->_internal_credit_card_cvv() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_credit_card_cvv(), target); + } + + // int32 credit_card_expiration_year = 3; + if (this->_internal_credit_card_expiration_year() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_credit_card_expiration_year(), target); + } + + // int32 credit_card_expiration_month = 4; + if (this->_internal_credit_card_expiration_month() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_credit_card_expiration_month(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.CreditCardInfo) + return target; +} + +size_t CreditCardInfo::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.CreditCardInfo) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string credit_card_number = 1; + if (!this->_internal_credit_card_number().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_credit_card_number()); + } + + // int32 credit_card_cvv = 2; + if (this->_internal_credit_card_cvv() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_credit_card_cvv()); + } + + // int32 credit_card_expiration_year = 3; + if (this->_internal_credit_card_expiration_year() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_credit_card_expiration_year()); + } + + // int32 credit_card_expiration_month = 4; + if (this->_internal_credit_card_expiration_month() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_credit_card_expiration_month()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CreditCardInfo::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + CreditCardInfo::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CreditCardInfo::GetClassData() const { return &_class_data_; } + + +void CreditCardInfo::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.CreditCardInfo) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_credit_card_number().empty()) { + _this->_internal_set_credit_card_number(from._internal_credit_card_number()); + } + if (from._internal_credit_card_cvv() != 0) { + _this->_internal_set_credit_card_cvv(from._internal_credit_card_cvv()); + } + if (from._internal_credit_card_expiration_year() != 0) { + _this->_internal_set_credit_card_expiration_year(from._internal_credit_card_expiration_year()); + } + if (from._internal_credit_card_expiration_month() != 0) { + _this->_internal_set_credit_card_expiration_month(from._internal_credit_card_expiration_month()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void CreditCardInfo::CopyFrom(const CreditCardInfo& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.CreditCardInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CreditCardInfo::IsInitialized() const { + return true; +} + +void CreditCardInfo::InternalSwap(CreditCardInfo* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.credit_card_number_, lhs_arena, + &other->_impl_.credit_card_number_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(CreditCardInfo, _impl_.credit_card_expiration_month_) + + sizeof(CreditCardInfo::_impl_.credit_card_expiration_month_) + - PROTOBUF_FIELD_OFFSET(CreditCardInfo, _impl_.credit_card_cvv_)>( + reinterpret_cast(&_impl_.credit_card_cvv_), + reinterpret_cast(&other->_impl_.credit_card_cvv_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata CreditCardInfo::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[21]); +} + +// =================================================================== + +class ChargeRequest::_Internal { + public: + static const ::oteldemo::Money& amount(const ChargeRequest* msg); + static const ::oteldemo::CreditCardInfo& credit_card(const ChargeRequest* msg); +}; + +const ::oteldemo::Money& +ChargeRequest::_Internal::amount(const ChargeRequest* msg) { + return *msg->_impl_.amount_; +} +const ::oteldemo::CreditCardInfo& +ChargeRequest::_Internal::credit_card(const ChargeRequest* msg) { + return *msg->_impl_.credit_card_; +} +ChargeRequest::ChargeRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.ChargeRequest) +} +ChargeRequest::ChargeRequest(const ChargeRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + ChargeRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.amount_){nullptr} + , decltype(_impl_.credit_card_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_amount()) { + _this->_impl_.amount_ = new ::oteldemo::Money(*from._impl_.amount_); + } + if (from._internal_has_credit_card()) { + _this->_impl_.credit_card_ = new ::oteldemo::CreditCardInfo(*from._impl_.credit_card_); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.ChargeRequest) +} + +inline void ChargeRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.amount_){nullptr} + , decltype(_impl_.credit_card_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +ChargeRequest::~ChargeRequest() { + // @@protoc_insertion_point(destructor:oteldemo.ChargeRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ChargeRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete _impl_.amount_; + if (this != internal_default_instance()) delete _impl_.credit_card_; +} + +void ChargeRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ChargeRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.ChargeRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && _impl_.amount_ != nullptr) { + delete _impl_.amount_; + } + _impl_.amount_ = nullptr; + if (GetArenaForAllocation() == nullptr && _impl_.credit_card_ != nullptr) { + delete _impl_.credit_card_; + } + _impl_.credit_card_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ChargeRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .oteldemo.Money amount = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_amount(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .oteldemo.CreditCardInfo credit_card = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_credit_card(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ChargeRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.ChargeRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .oteldemo.Money amount = 1; + if (this->_internal_has_amount()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::amount(this), + _Internal::amount(this).GetCachedSize(), target, stream); + } + + // .oteldemo.CreditCardInfo credit_card = 2; + if (this->_internal_has_credit_card()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, _Internal::credit_card(this), + _Internal::credit_card(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.ChargeRequest) + return target; +} + +size_t ChargeRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.ChargeRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .oteldemo.Money amount = 1; + if (this->_internal_has_amount()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.amount_); + } + + // .oteldemo.CreditCardInfo credit_card = 2; + if (this->_internal_has_credit_card()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.credit_card_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ChargeRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + ChargeRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ChargeRequest::GetClassData() const { return &_class_data_; } + + +void ChargeRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.ChargeRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_amount()) { + _this->_internal_mutable_amount()->::oteldemo::Money::MergeFrom( + from._internal_amount()); + } + if (from._internal_has_credit_card()) { + _this->_internal_mutable_credit_card()->::oteldemo::CreditCardInfo::MergeFrom( + from._internal_credit_card()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ChargeRequest::CopyFrom(const ChargeRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.ChargeRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ChargeRequest::IsInitialized() const { + return true; +} + +void ChargeRequest::InternalSwap(ChargeRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ChargeRequest, _impl_.credit_card_) + + sizeof(ChargeRequest::_impl_.credit_card_) + - PROTOBUF_FIELD_OFFSET(ChargeRequest, _impl_.amount_)>( + reinterpret_cast(&_impl_.amount_), + reinterpret_cast(&other->_impl_.amount_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ChargeRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[22]); +} + +// =================================================================== + +class ChargeResponse::_Internal { + public: +}; + +ChargeResponse::ChargeResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.ChargeResponse) +} +ChargeResponse::ChargeResponse(const ChargeResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + ChargeResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.transaction_id_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.transaction_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.transaction_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_transaction_id().empty()) { + _this->_impl_.transaction_id_.Set(from._internal_transaction_id(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.ChargeResponse) +} + +inline void ChargeResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.transaction_id_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.transaction_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.transaction_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +ChargeResponse::~ChargeResponse() { + // @@protoc_insertion_point(destructor:oteldemo.ChargeResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ChargeResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.transaction_id_.Destroy(); +} + +void ChargeResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ChargeResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.ChargeResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.transaction_id_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ChargeResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string transaction_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_transaction_id(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.ChargeResponse.transaction_id")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ChargeResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.ChargeResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string transaction_id = 1; + if (!this->_internal_transaction_id().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_transaction_id().data(), static_cast(this->_internal_transaction_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.ChargeResponse.transaction_id"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_transaction_id(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.ChargeResponse) + return target; +} + +size_t ChargeResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.ChargeResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string transaction_id = 1; + if (!this->_internal_transaction_id().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_transaction_id()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ChargeResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + ChargeResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ChargeResponse::GetClassData() const { return &_class_data_; } + + +void ChargeResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.ChargeResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_transaction_id().empty()) { + _this->_internal_set_transaction_id(from._internal_transaction_id()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ChargeResponse::CopyFrom(const ChargeResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.ChargeResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ChargeResponse::IsInitialized() const { + return true; +} + +void ChargeResponse::InternalSwap(ChargeResponse* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.transaction_id_, lhs_arena, + &other->_impl_.transaction_id_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ChargeResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[23]); +} + +// =================================================================== + +class OrderItem::_Internal { + public: + static const ::oteldemo::CartItem& item(const OrderItem* msg); + static const ::oteldemo::Money& cost(const OrderItem* msg); +}; + +const ::oteldemo::CartItem& +OrderItem::_Internal::item(const OrderItem* msg) { + return *msg->_impl_.item_; +} +const ::oteldemo::Money& +OrderItem::_Internal::cost(const OrderItem* msg) { + return *msg->_impl_.cost_; +} +OrderItem::OrderItem(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.OrderItem) +} +OrderItem::OrderItem(const OrderItem& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + OrderItem* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.item_){nullptr} + , decltype(_impl_.cost_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_item()) { + _this->_impl_.item_ = new ::oteldemo::CartItem(*from._impl_.item_); + } + if (from._internal_has_cost()) { + _this->_impl_.cost_ = new ::oteldemo::Money(*from._impl_.cost_); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.OrderItem) +} + +inline void OrderItem::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.item_){nullptr} + , decltype(_impl_.cost_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +OrderItem::~OrderItem() { + // @@protoc_insertion_point(destructor:oteldemo.OrderItem) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void OrderItem::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete _impl_.item_; + if (this != internal_default_instance()) delete _impl_.cost_; +} + +void OrderItem::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void OrderItem::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.OrderItem) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && _impl_.item_ != nullptr) { + delete _impl_.item_; + } + _impl_.item_ = nullptr; + if (GetArenaForAllocation() == nullptr && _impl_.cost_ != nullptr) { + delete _impl_.cost_; + } + _impl_.cost_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* OrderItem::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .oteldemo.CartItem item = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_item(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .oteldemo.Money cost = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_cost(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* OrderItem::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.OrderItem) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .oteldemo.CartItem item = 1; + if (this->_internal_has_item()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::item(this), + _Internal::item(this).GetCachedSize(), target, stream); + } + + // .oteldemo.Money cost = 2; + if (this->_internal_has_cost()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, _Internal::cost(this), + _Internal::cost(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.OrderItem) + return target; +} + +size_t OrderItem::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.OrderItem) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .oteldemo.CartItem item = 1; + if (this->_internal_has_item()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.item_); + } + + // .oteldemo.Money cost = 2; + if (this->_internal_has_cost()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.cost_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData OrderItem::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + OrderItem::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*OrderItem::GetClassData() const { return &_class_data_; } + + +void OrderItem::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.OrderItem) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_item()) { + _this->_internal_mutable_item()->::oteldemo::CartItem::MergeFrom( + from._internal_item()); + } + if (from._internal_has_cost()) { + _this->_internal_mutable_cost()->::oteldemo::Money::MergeFrom( + from._internal_cost()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void OrderItem::CopyFrom(const OrderItem& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.OrderItem) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool OrderItem::IsInitialized() const { + return true; +} + +void OrderItem::InternalSwap(OrderItem* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(OrderItem, _impl_.cost_) + + sizeof(OrderItem::_impl_.cost_) + - PROTOBUF_FIELD_OFFSET(OrderItem, _impl_.item_)>( + reinterpret_cast(&_impl_.item_), + reinterpret_cast(&other->_impl_.item_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata OrderItem::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[24]); +} + +// =================================================================== + +class OrderResult::_Internal { + public: + static const ::oteldemo::Money& shipping_cost(const OrderResult* msg); + static const ::oteldemo::Address& shipping_address(const OrderResult* msg); +}; + +const ::oteldemo::Money& +OrderResult::_Internal::shipping_cost(const OrderResult* msg) { + return *msg->_impl_.shipping_cost_; +} +const ::oteldemo::Address& +OrderResult::_Internal::shipping_address(const OrderResult* msg) { + return *msg->_impl_.shipping_address_; +} +OrderResult::OrderResult(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.OrderResult) +} +OrderResult::OrderResult(const OrderResult& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + OrderResult* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.items_){from._impl_.items_} + , decltype(_impl_.order_id_){} + , decltype(_impl_.shipping_tracking_id_){} + , decltype(_impl_.shipping_cost_){nullptr} + , decltype(_impl_.shipping_address_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.order_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.order_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_order_id().empty()) { + _this->_impl_.order_id_.Set(from._internal_order_id(), + _this->GetArenaForAllocation()); + } + _impl_.shipping_tracking_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.shipping_tracking_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_shipping_tracking_id().empty()) { + _this->_impl_.shipping_tracking_id_.Set(from._internal_shipping_tracking_id(), + _this->GetArenaForAllocation()); + } + if (from._internal_has_shipping_cost()) { + _this->_impl_.shipping_cost_ = new ::oteldemo::Money(*from._impl_.shipping_cost_); + } + if (from._internal_has_shipping_address()) { + _this->_impl_.shipping_address_ = new ::oteldemo::Address(*from._impl_.shipping_address_); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.OrderResult) +} + +inline void OrderResult::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.items_){arena} + , decltype(_impl_.order_id_){} + , decltype(_impl_.shipping_tracking_id_){} + , decltype(_impl_.shipping_cost_){nullptr} + , decltype(_impl_.shipping_address_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.order_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.order_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.shipping_tracking_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.shipping_tracking_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +OrderResult::~OrderResult() { + // @@protoc_insertion_point(destructor:oteldemo.OrderResult) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void OrderResult::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.items_.~RepeatedPtrField(); + _impl_.order_id_.Destroy(); + _impl_.shipping_tracking_id_.Destroy(); + if (this != internal_default_instance()) delete _impl_.shipping_cost_; + if (this != internal_default_instance()) delete _impl_.shipping_address_; +} + +void OrderResult::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void OrderResult::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.OrderResult) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.items_.Clear(); + _impl_.order_id_.ClearToEmpty(); + _impl_.shipping_tracking_id_.ClearToEmpty(); + if (GetArenaForAllocation() == nullptr && _impl_.shipping_cost_ != nullptr) { + delete _impl_.shipping_cost_; + } + _impl_.shipping_cost_ = nullptr; + if (GetArenaForAllocation() == nullptr && _impl_.shipping_address_ != nullptr) { + delete _impl_.shipping_address_; + } + _impl_.shipping_address_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* OrderResult::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string order_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_order_id(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.OrderResult.order_id")); + } else + goto handle_unusual; + continue; + // string shipping_tracking_id = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_shipping_tracking_id(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.OrderResult.shipping_tracking_id")); + } else + goto handle_unusual; + continue; + // .oteldemo.Money shipping_cost = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_shipping_cost(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .oteldemo.Address shipping_address = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_shipping_address(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .oteldemo.OrderItem items = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_items(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* OrderResult::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.OrderResult) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string order_id = 1; + if (!this->_internal_order_id().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_order_id().data(), static_cast(this->_internal_order_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.OrderResult.order_id"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_order_id(), target); + } + + // string shipping_tracking_id = 2; + if (!this->_internal_shipping_tracking_id().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_shipping_tracking_id().data(), static_cast(this->_internal_shipping_tracking_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.OrderResult.shipping_tracking_id"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_shipping_tracking_id(), target); + } + + // .oteldemo.Money shipping_cost = 3; + if (this->_internal_has_shipping_cost()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, _Internal::shipping_cost(this), + _Internal::shipping_cost(this).GetCachedSize(), target, stream); + } + + // .oteldemo.Address shipping_address = 4; + if (this->_internal_has_shipping_address()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(4, _Internal::shipping_address(this), + _Internal::shipping_address(this).GetCachedSize(), target, stream); + } + + // repeated .oteldemo.OrderItem items = 5; + for (unsigned i = 0, + n = static_cast(this->_internal_items_size()); i < n; i++) { + const auto& repfield = this->_internal_items(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(5, repfield, repfield.GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.OrderResult) + return target; +} + +size_t OrderResult::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.OrderResult) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .oteldemo.OrderItem items = 5; + total_size += 1UL * this->_internal_items_size(); + for (const auto& msg : this->_impl_.items_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // string order_id = 1; + if (!this->_internal_order_id().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_order_id()); + } + + // string shipping_tracking_id = 2; + if (!this->_internal_shipping_tracking_id().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_shipping_tracking_id()); + } + + // .oteldemo.Money shipping_cost = 3; + if (this->_internal_has_shipping_cost()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.shipping_cost_); + } + + // .oteldemo.Address shipping_address = 4; + if (this->_internal_has_shipping_address()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.shipping_address_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData OrderResult::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + OrderResult::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*OrderResult::GetClassData() const { return &_class_data_; } + + +void OrderResult::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.OrderResult) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.items_.MergeFrom(from._impl_.items_); + if (!from._internal_order_id().empty()) { + _this->_internal_set_order_id(from._internal_order_id()); + } + if (!from._internal_shipping_tracking_id().empty()) { + _this->_internal_set_shipping_tracking_id(from._internal_shipping_tracking_id()); + } + if (from._internal_has_shipping_cost()) { + _this->_internal_mutable_shipping_cost()->::oteldemo::Money::MergeFrom( + from._internal_shipping_cost()); + } + if (from._internal_has_shipping_address()) { + _this->_internal_mutable_shipping_address()->::oteldemo::Address::MergeFrom( + from._internal_shipping_address()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void OrderResult::CopyFrom(const OrderResult& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.OrderResult) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool OrderResult::IsInitialized() const { + return true; +} + +void OrderResult::InternalSwap(OrderResult* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.items_.InternalSwap(&other->_impl_.items_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.order_id_, lhs_arena, + &other->_impl_.order_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.shipping_tracking_id_, lhs_arena, + &other->_impl_.shipping_tracking_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(OrderResult, _impl_.shipping_address_) + + sizeof(OrderResult::_impl_.shipping_address_) + - PROTOBUF_FIELD_OFFSET(OrderResult, _impl_.shipping_cost_)>( + reinterpret_cast(&_impl_.shipping_cost_), + reinterpret_cast(&other->_impl_.shipping_cost_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata OrderResult::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[25]); +} + +// =================================================================== + +class SendOrderConfirmationRequest::_Internal { + public: + static const ::oteldemo::OrderResult& order(const SendOrderConfirmationRequest* msg); +}; + +const ::oteldemo::OrderResult& +SendOrderConfirmationRequest::_Internal::order(const SendOrderConfirmationRequest* msg) { + return *msg->_impl_.order_; +} +SendOrderConfirmationRequest::SendOrderConfirmationRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.SendOrderConfirmationRequest) +} +SendOrderConfirmationRequest::SendOrderConfirmationRequest(const SendOrderConfirmationRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + SendOrderConfirmationRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.email_){} + , decltype(_impl_.order_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.email_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.email_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_email().empty()) { + _this->_impl_.email_.Set(from._internal_email(), + _this->GetArenaForAllocation()); + } + if (from._internal_has_order()) { + _this->_impl_.order_ = new ::oteldemo::OrderResult(*from._impl_.order_); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.SendOrderConfirmationRequest) +} + +inline void SendOrderConfirmationRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.email_){} + , decltype(_impl_.order_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.email_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.email_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +SendOrderConfirmationRequest::~SendOrderConfirmationRequest() { + // @@protoc_insertion_point(destructor:oteldemo.SendOrderConfirmationRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void SendOrderConfirmationRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.email_.Destroy(); + if (this != internal_default_instance()) delete _impl_.order_; +} + +void SendOrderConfirmationRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void SendOrderConfirmationRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.SendOrderConfirmationRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.email_.ClearToEmpty(); + if (GetArenaForAllocation() == nullptr && _impl_.order_ != nullptr) { + delete _impl_.order_; + } + _impl_.order_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* SendOrderConfirmationRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string email = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_email(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.SendOrderConfirmationRequest.email")); + } else + goto handle_unusual; + continue; + // .oteldemo.OrderResult order = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_order(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* SendOrderConfirmationRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.SendOrderConfirmationRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string email = 1; + if (!this->_internal_email().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_email().data(), static_cast(this->_internal_email().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.SendOrderConfirmationRequest.email"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_email(), target); + } + + // .oteldemo.OrderResult order = 2; + if (this->_internal_has_order()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, _Internal::order(this), + _Internal::order(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.SendOrderConfirmationRequest) + return target; +} + +size_t SendOrderConfirmationRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.SendOrderConfirmationRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string email = 1; + if (!this->_internal_email().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_email()); + } + + // .oteldemo.OrderResult order = 2; + if (this->_internal_has_order()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.order_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SendOrderConfirmationRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + SendOrderConfirmationRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SendOrderConfirmationRequest::GetClassData() const { return &_class_data_; } + + +void SendOrderConfirmationRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.SendOrderConfirmationRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_email().empty()) { + _this->_internal_set_email(from._internal_email()); + } + if (from._internal_has_order()) { + _this->_internal_mutable_order()->::oteldemo::OrderResult::MergeFrom( + from._internal_order()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void SendOrderConfirmationRequest::CopyFrom(const SendOrderConfirmationRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.SendOrderConfirmationRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool SendOrderConfirmationRequest::IsInitialized() const { + return true; +} + +void SendOrderConfirmationRequest::InternalSwap(SendOrderConfirmationRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.email_, lhs_arena, + &other->_impl_.email_, rhs_arena + ); + swap(_impl_.order_, other->_impl_.order_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata SendOrderConfirmationRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[26]); +} + +// =================================================================== + +class PlaceOrderRequest::_Internal { + public: + static const ::oteldemo::Address& address(const PlaceOrderRequest* msg); + static const ::oteldemo::CreditCardInfo& credit_card(const PlaceOrderRequest* msg); +}; + +const ::oteldemo::Address& +PlaceOrderRequest::_Internal::address(const PlaceOrderRequest* msg) { + return *msg->_impl_.address_; +} +const ::oteldemo::CreditCardInfo& +PlaceOrderRequest::_Internal::credit_card(const PlaceOrderRequest* msg) { + return *msg->_impl_.credit_card_; +} +PlaceOrderRequest::PlaceOrderRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.PlaceOrderRequest) +} +PlaceOrderRequest::PlaceOrderRequest(const PlaceOrderRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + PlaceOrderRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.user_id_){} + , decltype(_impl_.user_currency_){} + , decltype(_impl_.email_){} + , decltype(_impl_.address_){nullptr} + , decltype(_impl_.credit_card_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.user_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.user_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_user_id().empty()) { + _this->_impl_.user_id_.Set(from._internal_user_id(), + _this->GetArenaForAllocation()); + } + _impl_.user_currency_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.user_currency_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_user_currency().empty()) { + _this->_impl_.user_currency_.Set(from._internal_user_currency(), + _this->GetArenaForAllocation()); + } + _impl_.email_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.email_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_email().empty()) { + _this->_impl_.email_.Set(from._internal_email(), + _this->GetArenaForAllocation()); + } + if (from._internal_has_address()) { + _this->_impl_.address_ = new ::oteldemo::Address(*from._impl_.address_); + } + if (from._internal_has_credit_card()) { + _this->_impl_.credit_card_ = new ::oteldemo::CreditCardInfo(*from._impl_.credit_card_); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.PlaceOrderRequest) +} + +inline void PlaceOrderRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.user_id_){} + , decltype(_impl_.user_currency_){} + , decltype(_impl_.email_){} + , decltype(_impl_.address_){nullptr} + , decltype(_impl_.credit_card_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.user_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.user_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.user_currency_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.user_currency_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.email_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.email_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +PlaceOrderRequest::~PlaceOrderRequest() { + // @@protoc_insertion_point(destructor:oteldemo.PlaceOrderRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void PlaceOrderRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.user_id_.Destroy(); + _impl_.user_currency_.Destroy(); + _impl_.email_.Destroy(); + if (this != internal_default_instance()) delete _impl_.address_; + if (this != internal_default_instance()) delete _impl_.credit_card_; +} + +void PlaceOrderRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void PlaceOrderRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.PlaceOrderRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.user_id_.ClearToEmpty(); + _impl_.user_currency_.ClearToEmpty(); + _impl_.email_.ClearToEmpty(); + if (GetArenaForAllocation() == nullptr && _impl_.address_ != nullptr) { + delete _impl_.address_; + } + _impl_.address_ = nullptr; + if (GetArenaForAllocation() == nullptr && _impl_.credit_card_ != nullptr) { + delete _impl_.credit_card_; + } + _impl_.credit_card_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* PlaceOrderRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string user_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_user_id(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.PlaceOrderRequest.user_id")); + } else + goto handle_unusual; + continue; + // string user_currency = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_user_currency(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.PlaceOrderRequest.user_currency")); + } else + goto handle_unusual; + continue; + // .oteldemo.Address address = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_address(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string email = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + auto str = _internal_mutable_email(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.PlaceOrderRequest.email")); + } else + goto handle_unusual; + continue; + // .oteldemo.CreditCardInfo credit_card = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + ptr = ctx->ParseMessage(_internal_mutable_credit_card(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* PlaceOrderRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.PlaceOrderRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string user_id = 1; + if (!this->_internal_user_id().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_user_id().data(), static_cast(this->_internal_user_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.PlaceOrderRequest.user_id"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_user_id(), target); + } + + // string user_currency = 2; + if (!this->_internal_user_currency().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_user_currency().data(), static_cast(this->_internal_user_currency().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.PlaceOrderRequest.user_currency"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_user_currency(), target); + } + + // .oteldemo.Address address = 3; + if (this->_internal_has_address()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, _Internal::address(this), + _Internal::address(this).GetCachedSize(), target, stream); + } + + // string email = 5; + if (!this->_internal_email().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_email().data(), static_cast(this->_internal_email().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.PlaceOrderRequest.email"); + target = stream->WriteStringMaybeAliased( + 5, this->_internal_email(), target); + } + + // .oteldemo.CreditCardInfo credit_card = 6; + if (this->_internal_has_credit_card()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(6, _Internal::credit_card(this), + _Internal::credit_card(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.PlaceOrderRequest) + return target; +} + +size_t PlaceOrderRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.PlaceOrderRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string user_id = 1; + if (!this->_internal_user_id().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_user_id()); + } + + // string user_currency = 2; + if (!this->_internal_user_currency().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_user_currency()); + } + + // string email = 5; + if (!this->_internal_email().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_email()); + } + + // .oteldemo.Address address = 3; + if (this->_internal_has_address()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.address_); + } + + // .oteldemo.CreditCardInfo credit_card = 6; + if (this->_internal_has_credit_card()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.credit_card_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PlaceOrderRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + PlaceOrderRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PlaceOrderRequest::GetClassData() const { return &_class_data_; } + + +void PlaceOrderRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.PlaceOrderRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_user_id().empty()) { + _this->_internal_set_user_id(from._internal_user_id()); + } + if (!from._internal_user_currency().empty()) { + _this->_internal_set_user_currency(from._internal_user_currency()); + } + if (!from._internal_email().empty()) { + _this->_internal_set_email(from._internal_email()); + } + if (from._internal_has_address()) { + _this->_internal_mutable_address()->::oteldemo::Address::MergeFrom( + from._internal_address()); + } + if (from._internal_has_credit_card()) { + _this->_internal_mutable_credit_card()->::oteldemo::CreditCardInfo::MergeFrom( + from._internal_credit_card()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void PlaceOrderRequest::CopyFrom(const PlaceOrderRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.PlaceOrderRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool PlaceOrderRequest::IsInitialized() const { + return true; +} + +void PlaceOrderRequest::InternalSwap(PlaceOrderRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.user_id_, lhs_arena, + &other->_impl_.user_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.user_currency_, lhs_arena, + &other->_impl_.user_currency_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.email_, lhs_arena, + &other->_impl_.email_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(PlaceOrderRequest, _impl_.credit_card_) + + sizeof(PlaceOrderRequest::_impl_.credit_card_) + - PROTOBUF_FIELD_OFFSET(PlaceOrderRequest, _impl_.address_)>( + reinterpret_cast(&_impl_.address_), + reinterpret_cast(&other->_impl_.address_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata PlaceOrderRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[27]); +} + +// =================================================================== + +class PlaceOrderResponse::_Internal { + public: + static const ::oteldemo::OrderResult& order(const PlaceOrderResponse* msg); +}; + +const ::oteldemo::OrderResult& +PlaceOrderResponse::_Internal::order(const PlaceOrderResponse* msg) { + return *msg->_impl_.order_; +} +PlaceOrderResponse::PlaceOrderResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.PlaceOrderResponse) +} +PlaceOrderResponse::PlaceOrderResponse(const PlaceOrderResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + PlaceOrderResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.order_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_order()) { + _this->_impl_.order_ = new ::oteldemo::OrderResult(*from._impl_.order_); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.PlaceOrderResponse) +} + +inline void PlaceOrderResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.order_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +PlaceOrderResponse::~PlaceOrderResponse() { + // @@protoc_insertion_point(destructor:oteldemo.PlaceOrderResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void PlaceOrderResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete _impl_.order_; +} + +void PlaceOrderResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void PlaceOrderResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.PlaceOrderResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && _impl_.order_ != nullptr) { + delete _impl_.order_; + } + _impl_.order_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* PlaceOrderResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .oteldemo.OrderResult order = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_order(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* PlaceOrderResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.PlaceOrderResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .oteldemo.OrderResult order = 1; + if (this->_internal_has_order()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::order(this), + _Internal::order(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.PlaceOrderResponse) + return target; +} + +size_t PlaceOrderResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.PlaceOrderResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .oteldemo.OrderResult order = 1; + if (this->_internal_has_order()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.order_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PlaceOrderResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + PlaceOrderResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PlaceOrderResponse::GetClassData() const { return &_class_data_; } + + +void PlaceOrderResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.PlaceOrderResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_order()) { + _this->_internal_mutable_order()->::oteldemo::OrderResult::MergeFrom( + from._internal_order()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void PlaceOrderResponse::CopyFrom(const PlaceOrderResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.PlaceOrderResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool PlaceOrderResponse::IsInitialized() const { + return true; +} + +void PlaceOrderResponse::InternalSwap(PlaceOrderResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.order_, other->_impl_.order_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata PlaceOrderResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[28]); +} + +// =================================================================== + +class AdRequest::_Internal { + public: +}; + +AdRequest::AdRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.AdRequest) +} +AdRequest::AdRequest(const AdRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + AdRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.context_keys_){from._impl_.context_keys_} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:oteldemo.AdRequest) +} + +inline void AdRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.context_keys_){arena} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +AdRequest::~AdRequest() { + // @@protoc_insertion_point(destructor:oteldemo.AdRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void AdRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.context_keys_.~RepeatedPtrField(); +} + +void AdRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void AdRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.AdRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.context_keys_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AdRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // repeated string context_keys = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_context_keys(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.AdRequest.context_keys")); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* AdRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.AdRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated string context_keys = 1; + for (int i = 0, n = this->_internal_context_keys_size(); i < n; i++) { + const auto& s = this->_internal_context_keys(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.AdRequest.context_keys"); + target = stream->WriteString(1, s, target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.AdRequest) + return target; +} + +size_t AdRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.AdRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string context_keys = 1; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.context_keys_.size()); + for (int i = 0, n = _impl_.context_keys_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + _impl_.context_keys_.Get(i)); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AdRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + AdRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AdRequest::GetClassData() const { return &_class_data_; } + + +void AdRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.AdRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.context_keys_.MergeFrom(from._impl_.context_keys_); + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void AdRequest::CopyFrom(const AdRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.AdRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AdRequest::IsInitialized() const { + return true; +} + +void AdRequest::InternalSwap(AdRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.context_keys_.InternalSwap(&other->_impl_.context_keys_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AdRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[29]); +} + +// =================================================================== + +class AdResponse::_Internal { + public: +}; + +AdResponse::AdResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.AdResponse) +} +AdResponse::AdResponse(const AdResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + AdResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.ads_){from._impl_.ads_} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:oteldemo.AdResponse) +} + +inline void AdResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.ads_){arena} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +AdResponse::~AdResponse() { + // @@protoc_insertion_point(destructor:oteldemo.AdResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void AdResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.ads_.~RepeatedPtrField(); +} + +void AdResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void AdResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.AdResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.ads_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AdResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // repeated .oteldemo.Ad ads = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_ads(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* AdResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.AdResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .oteldemo.Ad ads = 1; + for (unsigned i = 0, + n = static_cast(this->_internal_ads_size()); i < n; i++) { + const auto& repfield = this->_internal_ads(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.AdResponse) + return target; +} + +size_t AdResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.AdResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .oteldemo.Ad ads = 1; + total_size += 1UL * this->_internal_ads_size(); + for (const auto& msg : this->_impl_.ads_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AdResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + AdResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AdResponse::GetClassData() const { return &_class_data_; } + + +void AdResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.AdResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.ads_.MergeFrom(from._impl_.ads_); + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void AdResponse::CopyFrom(const AdResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.AdResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AdResponse::IsInitialized() const { + return true; +} + +void AdResponse::InternalSwap(AdResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.ads_.InternalSwap(&other->_impl_.ads_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AdResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[30]); +} + +// =================================================================== + +class Ad::_Internal { + public: +}; + +Ad::Ad(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.Ad) +} +Ad::Ad(const Ad& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + Ad* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.redirect_url_){} + , decltype(_impl_.text_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.redirect_url_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.redirect_url_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_redirect_url().empty()) { + _this->_impl_.redirect_url_.Set(from._internal_redirect_url(), + _this->GetArenaForAllocation()); + } + _impl_.text_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.text_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_text().empty()) { + _this->_impl_.text_.Set(from._internal_text(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.Ad) +} + +inline void Ad::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.redirect_url_){} + , decltype(_impl_.text_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.redirect_url_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.redirect_url_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.text_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.text_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +Ad::~Ad() { + // @@protoc_insertion_point(destructor:oteldemo.Ad) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Ad::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.redirect_url_.Destroy(); + _impl_.text_.Destroy(); +} + +void Ad::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Ad::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.Ad) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.redirect_url_.ClearToEmpty(); + _impl_.text_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Ad::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string redirect_url = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_redirect_url(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.Ad.redirect_url")); + } else + goto handle_unusual; + continue; + // string text = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_text(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.Ad.text")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Ad::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.Ad) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string redirect_url = 1; + if (!this->_internal_redirect_url().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_redirect_url().data(), static_cast(this->_internal_redirect_url().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.Ad.redirect_url"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_redirect_url(), target); + } + + // string text = 2; + if (!this->_internal_text().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_text().data(), static_cast(this->_internal_text().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.Ad.text"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_text(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.Ad) + return target; +} + +size_t Ad::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.Ad) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string redirect_url = 1; + if (!this->_internal_redirect_url().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_redirect_url()); + } + + // string text = 2; + if (!this->_internal_text().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_text()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Ad::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + Ad::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Ad::GetClassData() const { return &_class_data_; } + + +void Ad::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.Ad) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_redirect_url().empty()) { + _this->_internal_set_redirect_url(from._internal_redirect_url()); + } + if (!from._internal_text().empty()) { + _this->_internal_set_text(from._internal_text()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void Ad::CopyFrom(const Ad& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.Ad) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Ad::IsInitialized() const { + return true; +} + +void Ad::InternalSwap(Ad* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.redirect_url_, lhs_arena, + &other->_impl_.redirect_url_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.text_, lhs_arena, + &other->_impl_.text_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Ad::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[31]); +} + +// =================================================================== + +class Flag::_Internal { + public: +}; + +Flag::Flag(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.Flag) +} +Flag::Flag(const Flag& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + Flag* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.name_){} + , decltype(_impl_.description_){} + , decltype(_impl_.enabled_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_name().empty()) { + _this->_impl_.name_.Set(from._internal_name(), + _this->GetArenaForAllocation()); + } + _impl_.description_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.description_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_description().empty()) { + _this->_impl_.description_.Set(from._internal_description(), + _this->GetArenaForAllocation()); + } + _this->_impl_.enabled_ = from._impl_.enabled_; + // @@protoc_insertion_point(copy_constructor:oteldemo.Flag) +} + +inline void Flag::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.name_){} + , decltype(_impl_.description_){} + , decltype(_impl_.enabled_){false} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.description_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.description_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +Flag::~Flag() { + // @@protoc_insertion_point(destructor:oteldemo.Flag) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Flag::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.name_.Destroy(); + _impl_.description_.Destroy(); +} + +void Flag::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Flag::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.Flag) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.name_.ClearToEmpty(); + _impl_.description_.ClearToEmpty(); + _impl_.enabled_ = false; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Flag::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.Flag.name")); + } else + goto handle_unusual; + continue; + // string description = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_description(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.Flag.description")); + } else + goto handle_unusual; + continue; + // bool enabled = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _impl_.enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Flag::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.Flag) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string name = 1; + if (!this->_internal_name().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.Flag.name"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); + } + + // string description = 2; + if (!this->_internal_description().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_description().data(), static_cast(this->_internal_description().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.Flag.description"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_description(), target); + } + + // bool enabled = 3; + if (this->_internal_enabled() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_enabled(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.Flag) + return target; +} + +size_t Flag::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.Flag) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string name = 1; + if (!this->_internal_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // string description = 2; + if (!this->_internal_description().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_description()); + } + + // bool enabled = 3; + if (this->_internal_enabled() != 0) { + total_size += 1 + 1; + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Flag::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + Flag::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Flag::GetClassData() const { return &_class_data_; } + + +void Flag::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.Flag) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_name().empty()) { + _this->_internal_set_name(from._internal_name()); + } + if (!from._internal_description().empty()) { + _this->_internal_set_description(from._internal_description()); + } + if (from._internal_enabled() != 0) { + _this->_internal_set_enabled(from._internal_enabled()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void Flag::CopyFrom(const Flag& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.Flag) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Flag::IsInitialized() const { + return true; +} + +void Flag::InternalSwap(Flag* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.description_, lhs_arena, + &other->_impl_.description_, rhs_arena + ); + swap(_impl_.enabled_, other->_impl_.enabled_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Flag::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[32]); +} + +// =================================================================== + +class GetFlagRequest::_Internal { + public: +}; + +GetFlagRequest::GetFlagRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.GetFlagRequest) +} +GetFlagRequest::GetFlagRequest(const GetFlagRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + GetFlagRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.name_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_name().empty()) { + _this->_impl_.name_.Set(from._internal_name(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.GetFlagRequest) +} + +inline void GetFlagRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.name_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +GetFlagRequest::~GetFlagRequest() { + // @@protoc_insertion_point(destructor:oteldemo.GetFlagRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void GetFlagRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.name_.Destroy(); +} + +void GetFlagRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void GetFlagRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.GetFlagRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.name_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GetFlagRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.GetFlagRequest.name")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* GetFlagRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.GetFlagRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string name = 1; + if (!this->_internal_name().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.GetFlagRequest.name"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.GetFlagRequest) + return target; +} + +size_t GetFlagRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.GetFlagRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string name = 1; + if (!this->_internal_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GetFlagRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + GetFlagRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetFlagRequest::GetClassData() const { return &_class_data_; } + + +void GetFlagRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.GetFlagRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_name().empty()) { + _this->_internal_set_name(from._internal_name()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GetFlagRequest::CopyFrom(const GetFlagRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.GetFlagRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GetFlagRequest::IsInitialized() const { + return true; +} + +void GetFlagRequest::InternalSwap(GetFlagRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GetFlagRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[33]); +} + +// =================================================================== + +class GetFlagResponse::_Internal { + public: + static const ::oteldemo::Flag& flag(const GetFlagResponse* msg); +}; + +const ::oteldemo::Flag& +GetFlagResponse::_Internal::flag(const GetFlagResponse* msg) { + return *msg->_impl_.flag_; +} +GetFlagResponse::GetFlagResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.GetFlagResponse) +} +GetFlagResponse::GetFlagResponse(const GetFlagResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + GetFlagResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.flag_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_flag()) { + _this->_impl_.flag_ = new ::oteldemo::Flag(*from._impl_.flag_); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.GetFlagResponse) +} + +inline void GetFlagResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.flag_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +GetFlagResponse::~GetFlagResponse() { + // @@protoc_insertion_point(destructor:oteldemo.GetFlagResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void GetFlagResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete _impl_.flag_; +} + +void GetFlagResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void GetFlagResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.GetFlagResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && _impl_.flag_ != nullptr) { + delete _impl_.flag_; + } + _impl_.flag_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GetFlagResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .oteldemo.Flag flag = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_flag(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* GetFlagResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.GetFlagResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .oteldemo.Flag flag = 1; + if (this->_internal_has_flag()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::flag(this), + _Internal::flag(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.GetFlagResponse) + return target; +} + +size_t GetFlagResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.GetFlagResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .oteldemo.Flag flag = 1; + if (this->_internal_has_flag()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.flag_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GetFlagResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + GetFlagResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetFlagResponse::GetClassData() const { return &_class_data_; } + + +void GetFlagResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.GetFlagResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_flag()) { + _this->_internal_mutable_flag()->::oteldemo::Flag::MergeFrom( + from._internal_flag()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GetFlagResponse::CopyFrom(const GetFlagResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.GetFlagResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GetFlagResponse::IsInitialized() const { + return true; +} + +void GetFlagResponse::InternalSwap(GetFlagResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.flag_, other->_impl_.flag_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GetFlagResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[34]); +} + +// =================================================================== + +class CreateFlagRequest::_Internal { + public: +}; + +CreateFlagRequest::CreateFlagRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.CreateFlagRequest) +} +CreateFlagRequest::CreateFlagRequest(const CreateFlagRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + CreateFlagRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.name_){} + , decltype(_impl_.description_){} + , decltype(_impl_.enabled_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_name().empty()) { + _this->_impl_.name_.Set(from._internal_name(), + _this->GetArenaForAllocation()); + } + _impl_.description_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.description_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_description().empty()) { + _this->_impl_.description_.Set(from._internal_description(), + _this->GetArenaForAllocation()); + } + _this->_impl_.enabled_ = from._impl_.enabled_; + // @@protoc_insertion_point(copy_constructor:oteldemo.CreateFlagRequest) +} + +inline void CreateFlagRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.name_){} + , decltype(_impl_.description_){} + , decltype(_impl_.enabled_){false} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.description_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.description_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +CreateFlagRequest::~CreateFlagRequest() { + // @@protoc_insertion_point(destructor:oteldemo.CreateFlagRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void CreateFlagRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.name_.Destroy(); + _impl_.description_.Destroy(); +} + +void CreateFlagRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void CreateFlagRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.CreateFlagRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.name_.ClearToEmpty(); + _impl_.description_.ClearToEmpty(); + _impl_.enabled_ = false; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* CreateFlagRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.CreateFlagRequest.name")); + } else + goto handle_unusual; + continue; + // string description = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_description(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.CreateFlagRequest.description")); + } else + goto handle_unusual; + continue; + // bool enabled = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _impl_.enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* CreateFlagRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.CreateFlagRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string name = 1; + if (!this->_internal_name().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.CreateFlagRequest.name"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); + } + + // string description = 2; + if (!this->_internal_description().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_description().data(), static_cast(this->_internal_description().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.CreateFlagRequest.description"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_description(), target); + } + + // bool enabled = 3; + if (this->_internal_enabled() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_enabled(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.CreateFlagRequest) + return target; +} + +size_t CreateFlagRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.CreateFlagRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string name = 1; + if (!this->_internal_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // string description = 2; + if (!this->_internal_description().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_description()); + } + + // bool enabled = 3; + if (this->_internal_enabled() != 0) { + total_size += 1 + 1; + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CreateFlagRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + CreateFlagRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CreateFlagRequest::GetClassData() const { return &_class_data_; } + + +void CreateFlagRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.CreateFlagRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_name().empty()) { + _this->_internal_set_name(from._internal_name()); + } + if (!from._internal_description().empty()) { + _this->_internal_set_description(from._internal_description()); + } + if (from._internal_enabled() != 0) { + _this->_internal_set_enabled(from._internal_enabled()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void CreateFlagRequest::CopyFrom(const CreateFlagRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.CreateFlagRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CreateFlagRequest::IsInitialized() const { + return true; +} + +void CreateFlagRequest::InternalSwap(CreateFlagRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.description_, lhs_arena, + &other->_impl_.description_, rhs_arena + ); + swap(_impl_.enabled_, other->_impl_.enabled_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata CreateFlagRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[35]); +} + +// =================================================================== + +class CreateFlagResponse::_Internal { + public: + static const ::oteldemo::Flag& flag(const CreateFlagResponse* msg); +}; + +const ::oteldemo::Flag& +CreateFlagResponse::_Internal::flag(const CreateFlagResponse* msg) { + return *msg->_impl_.flag_; +} +CreateFlagResponse::CreateFlagResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.CreateFlagResponse) +} +CreateFlagResponse::CreateFlagResponse(const CreateFlagResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + CreateFlagResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.flag_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_flag()) { + _this->_impl_.flag_ = new ::oteldemo::Flag(*from._impl_.flag_); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.CreateFlagResponse) +} + +inline void CreateFlagResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.flag_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +CreateFlagResponse::~CreateFlagResponse() { + // @@protoc_insertion_point(destructor:oteldemo.CreateFlagResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void CreateFlagResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete _impl_.flag_; +} + +void CreateFlagResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void CreateFlagResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.CreateFlagResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && _impl_.flag_ != nullptr) { + delete _impl_.flag_; + } + _impl_.flag_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* CreateFlagResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .oteldemo.Flag flag = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_flag(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* CreateFlagResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.CreateFlagResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .oteldemo.Flag flag = 1; + if (this->_internal_has_flag()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::flag(this), + _Internal::flag(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.CreateFlagResponse) + return target; +} + +size_t CreateFlagResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.CreateFlagResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .oteldemo.Flag flag = 1; + if (this->_internal_has_flag()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.flag_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CreateFlagResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + CreateFlagResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CreateFlagResponse::GetClassData() const { return &_class_data_; } + + +void CreateFlagResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.CreateFlagResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_flag()) { + _this->_internal_mutable_flag()->::oteldemo::Flag::MergeFrom( + from._internal_flag()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void CreateFlagResponse::CopyFrom(const CreateFlagResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.CreateFlagResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CreateFlagResponse::IsInitialized() const { + return true; +} + +void CreateFlagResponse::InternalSwap(CreateFlagResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.flag_, other->_impl_.flag_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata CreateFlagResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[36]); +} + +// =================================================================== + +class UpdateFlagRequest::_Internal { + public: +}; + +UpdateFlagRequest::UpdateFlagRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.UpdateFlagRequest) +} +UpdateFlagRequest::UpdateFlagRequest(const UpdateFlagRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + UpdateFlagRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.name_){} + , decltype(_impl_.enabled_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_name().empty()) { + _this->_impl_.name_.Set(from._internal_name(), + _this->GetArenaForAllocation()); + } + _this->_impl_.enabled_ = from._impl_.enabled_; + // @@protoc_insertion_point(copy_constructor:oteldemo.UpdateFlagRequest) +} + +inline void UpdateFlagRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.name_){} + , decltype(_impl_.enabled_){false} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +UpdateFlagRequest::~UpdateFlagRequest() { + // @@protoc_insertion_point(destructor:oteldemo.UpdateFlagRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void UpdateFlagRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.name_.Destroy(); +} + +void UpdateFlagRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void UpdateFlagRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.UpdateFlagRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.name_.ClearToEmpty(); + _impl_.enabled_ = false; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* UpdateFlagRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.UpdateFlagRequest.name")); + } else + goto handle_unusual; + continue; + // bool enabled = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _impl_.enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* UpdateFlagRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.UpdateFlagRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string name = 1; + if (!this->_internal_name().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.UpdateFlagRequest.name"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); + } + + // bool enabled = 2; + if (this->_internal_enabled() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_enabled(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.UpdateFlagRequest) + return target; +} + +size_t UpdateFlagRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.UpdateFlagRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string name = 1; + if (!this->_internal_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // bool enabled = 2; + if (this->_internal_enabled() != 0) { + total_size += 1 + 1; + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData UpdateFlagRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + UpdateFlagRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*UpdateFlagRequest::GetClassData() const { return &_class_data_; } + + +void UpdateFlagRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.UpdateFlagRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_name().empty()) { + _this->_internal_set_name(from._internal_name()); + } + if (from._internal_enabled() != 0) { + _this->_internal_set_enabled(from._internal_enabled()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void UpdateFlagRequest::CopyFrom(const UpdateFlagRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.UpdateFlagRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool UpdateFlagRequest::IsInitialized() const { + return true; +} + +void UpdateFlagRequest::InternalSwap(UpdateFlagRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + swap(_impl_.enabled_, other->_impl_.enabled_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata UpdateFlagRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[37]); +} + +// =================================================================== + +class UpdateFlagResponse::_Internal { + public: +}; + +UpdateFlagResponse::UpdateFlagResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase(arena, is_message_owned) { + // @@protoc_insertion_point(arena_constructor:oteldemo.UpdateFlagResponse) +} +UpdateFlagResponse::UpdateFlagResponse(const UpdateFlagResponse& from) + : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase() { + UpdateFlagResponse* const _this = this; (void)_this; + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:oteldemo.UpdateFlagResponse) +} + + + + + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData UpdateFlagResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl, + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl, +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*UpdateFlagResponse::GetClassData() const { return &_class_data_; } + + + + + + + +::PROTOBUF_NAMESPACE_ID::Metadata UpdateFlagResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[38]); +} + +// =================================================================== + +class ListFlagsRequest::_Internal { + public: +}; + +ListFlagsRequest::ListFlagsRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase(arena, is_message_owned) { + // @@protoc_insertion_point(arena_constructor:oteldemo.ListFlagsRequest) +} +ListFlagsRequest::ListFlagsRequest(const ListFlagsRequest& from) + : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase() { + ListFlagsRequest* const _this = this; (void)_this; + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:oteldemo.ListFlagsRequest) +} + + + + + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ListFlagsRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl, + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl, +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ListFlagsRequest::GetClassData() const { return &_class_data_; } + + + + + + + +::PROTOBUF_NAMESPACE_ID::Metadata ListFlagsRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[39]); +} + +// =================================================================== + +class ListFlagsResponse::_Internal { + public: +}; + +ListFlagsResponse::ListFlagsResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.ListFlagsResponse) +} +ListFlagsResponse::ListFlagsResponse(const ListFlagsResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + ListFlagsResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.flag_){from._impl_.flag_} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:oteldemo.ListFlagsResponse) +} + +inline void ListFlagsResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.flag_){arena} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +ListFlagsResponse::~ListFlagsResponse() { + // @@protoc_insertion_point(destructor:oteldemo.ListFlagsResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ListFlagsResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.flag_.~RepeatedPtrField(); +} + +void ListFlagsResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ListFlagsResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.ListFlagsResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.flag_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ListFlagsResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // repeated .oteldemo.Flag flag = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_flag(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ListFlagsResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.ListFlagsResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .oteldemo.Flag flag = 1; + for (unsigned i = 0, + n = static_cast(this->_internal_flag_size()); i < n; i++) { + const auto& repfield = this->_internal_flag(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.ListFlagsResponse) + return target; +} + +size_t ListFlagsResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.ListFlagsResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .oteldemo.Flag flag = 1; + total_size += 1UL * this->_internal_flag_size(); + for (const auto& msg : this->_impl_.flag_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ListFlagsResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + ListFlagsResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ListFlagsResponse::GetClassData() const { return &_class_data_; } + + +void ListFlagsResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.ListFlagsResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.flag_.MergeFrom(from._impl_.flag_); + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ListFlagsResponse::CopyFrom(const ListFlagsResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.ListFlagsResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ListFlagsResponse::IsInitialized() const { + return true; +} + +void ListFlagsResponse::InternalSwap(ListFlagsResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.flag_.InternalSwap(&other->_impl_.flag_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ListFlagsResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[40]); +} + +// =================================================================== + +class DeleteFlagRequest::_Internal { + public: +}; + +DeleteFlagRequest::DeleteFlagRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:oteldemo.DeleteFlagRequest) +} +DeleteFlagRequest::DeleteFlagRequest(const DeleteFlagRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + DeleteFlagRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.name_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_name().empty()) { + _this->_impl_.name_.Set(from._internal_name(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:oteldemo.DeleteFlagRequest) +} + +inline void DeleteFlagRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.name_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +DeleteFlagRequest::~DeleteFlagRequest() { + // @@protoc_insertion_point(destructor:oteldemo.DeleteFlagRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void DeleteFlagRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.name_.Destroy(); +} + +void DeleteFlagRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void DeleteFlagRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.DeleteFlagRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.name_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* DeleteFlagRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "oteldemo.DeleteFlagRequest.name")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* DeleteFlagRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.DeleteFlagRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string name = 1; + if (!this->_internal_name().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "oteldemo.DeleteFlagRequest.name"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.DeleteFlagRequest) + return target; +} + +size_t DeleteFlagRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.DeleteFlagRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string name = 1; + if (!this->_internal_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData DeleteFlagRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + DeleteFlagRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*DeleteFlagRequest::GetClassData() const { return &_class_data_; } + + +void DeleteFlagRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.DeleteFlagRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_name().empty()) { + _this->_internal_set_name(from._internal_name()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void DeleteFlagRequest::CopyFrom(const DeleteFlagRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.DeleteFlagRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool DeleteFlagRequest::IsInitialized() const { + return true; +} + +void DeleteFlagRequest::InternalSwap(DeleteFlagRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata DeleteFlagRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[41]); +} + +// =================================================================== + +class DeleteFlagResponse::_Internal { + public: +}; + +DeleteFlagResponse::DeleteFlagResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase(arena, is_message_owned) { + // @@protoc_insertion_point(arena_constructor:oteldemo.DeleteFlagResponse) +} +DeleteFlagResponse::DeleteFlagResponse(const DeleteFlagResponse& from) + : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase() { + DeleteFlagResponse* const _this = this; (void)_this; + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:oteldemo.DeleteFlagResponse) +} + + + + + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData DeleteFlagResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl, + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl, +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*DeleteFlagResponse::GetClassData() const { return &_class_data_; } + + + + + + + +::PROTOBUF_NAMESPACE_ID::Metadata DeleteFlagResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[42]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace oteldemo +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::oteldemo::CartItem* +Arena::CreateMaybeMessage< ::oteldemo::CartItem >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::CartItem >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::AddItemRequest* +Arena::CreateMaybeMessage< ::oteldemo::AddItemRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::AddItemRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::EmptyCartRequest* +Arena::CreateMaybeMessage< ::oteldemo::EmptyCartRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::EmptyCartRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::GetCartRequest* +Arena::CreateMaybeMessage< ::oteldemo::GetCartRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::GetCartRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::Cart* +Arena::CreateMaybeMessage< ::oteldemo::Cart >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::Cart >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::Empty* +Arena::CreateMaybeMessage< ::oteldemo::Empty >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::Empty >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::ListRecommendationsRequest* +Arena::CreateMaybeMessage< ::oteldemo::ListRecommendationsRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::ListRecommendationsRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::ListRecommendationsResponse* +Arena::CreateMaybeMessage< ::oteldemo::ListRecommendationsResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::ListRecommendationsResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::Product* +Arena::CreateMaybeMessage< ::oteldemo::Product >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::Product >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::ListProductsResponse* +Arena::CreateMaybeMessage< ::oteldemo::ListProductsResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::ListProductsResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::GetProductRequest* +Arena::CreateMaybeMessage< ::oteldemo::GetProductRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::GetProductRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::SearchProductsRequest* +Arena::CreateMaybeMessage< ::oteldemo::SearchProductsRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::SearchProductsRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::SearchProductsResponse* +Arena::CreateMaybeMessage< ::oteldemo::SearchProductsResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::SearchProductsResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::GetQuoteRequest* +Arena::CreateMaybeMessage< ::oteldemo::GetQuoteRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::GetQuoteRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::GetQuoteResponse* +Arena::CreateMaybeMessage< ::oteldemo::GetQuoteResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::GetQuoteResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::ShipOrderRequest* +Arena::CreateMaybeMessage< ::oteldemo::ShipOrderRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::ShipOrderRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::ShipOrderResponse* +Arena::CreateMaybeMessage< ::oteldemo::ShipOrderResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::ShipOrderResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::Address* +Arena::CreateMaybeMessage< ::oteldemo::Address >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::Address >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::Money* +Arena::CreateMaybeMessage< ::oteldemo::Money >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::Money >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::GetSupportedCurrenciesResponse* +Arena::CreateMaybeMessage< ::oteldemo::GetSupportedCurrenciesResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::GetSupportedCurrenciesResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::CurrencyConversionRequest* +Arena::CreateMaybeMessage< ::oteldemo::CurrencyConversionRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::CurrencyConversionRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::CreditCardInfo* +Arena::CreateMaybeMessage< ::oteldemo::CreditCardInfo >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::CreditCardInfo >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::ChargeRequest* +Arena::CreateMaybeMessage< ::oteldemo::ChargeRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::ChargeRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::ChargeResponse* +Arena::CreateMaybeMessage< ::oteldemo::ChargeResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::ChargeResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::OrderItem* +Arena::CreateMaybeMessage< ::oteldemo::OrderItem >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::OrderItem >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::OrderResult* +Arena::CreateMaybeMessage< ::oteldemo::OrderResult >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::OrderResult >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::SendOrderConfirmationRequest* +Arena::CreateMaybeMessage< ::oteldemo::SendOrderConfirmationRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::SendOrderConfirmationRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::PlaceOrderRequest* +Arena::CreateMaybeMessage< ::oteldemo::PlaceOrderRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::PlaceOrderRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::PlaceOrderResponse* +Arena::CreateMaybeMessage< ::oteldemo::PlaceOrderResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::PlaceOrderResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::AdRequest* +Arena::CreateMaybeMessage< ::oteldemo::AdRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::AdRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::AdResponse* +Arena::CreateMaybeMessage< ::oteldemo::AdResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::AdResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::Ad* +Arena::CreateMaybeMessage< ::oteldemo::Ad >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::Ad >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::Flag* +Arena::CreateMaybeMessage< ::oteldemo::Flag >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::Flag >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::GetFlagRequest* +Arena::CreateMaybeMessage< ::oteldemo::GetFlagRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::GetFlagRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::GetFlagResponse* +Arena::CreateMaybeMessage< ::oteldemo::GetFlagResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::GetFlagResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::CreateFlagRequest* +Arena::CreateMaybeMessage< ::oteldemo::CreateFlagRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::CreateFlagRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::CreateFlagResponse* +Arena::CreateMaybeMessage< ::oteldemo::CreateFlagResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::CreateFlagResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::UpdateFlagRequest* +Arena::CreateMaybeMessage< ::oteldemo::UpdateFlagRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::UpdateFlagRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::UpdateFlagResponse* +Arena::CreateMaybeMessage< ::oteldemo::UpdateFlagResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::UpdateFlagResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::ListFlagsRequest* +Arena::CreateMaybeMessage< ::oteldemo::ListFlagsRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::ListFlagsRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::ListFlagsResponse* +Arena::CreateMaybeMessage< ::oteldemo::ListFlagsResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::ListFlagsResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::DeleteFlagRequest* +Arena::CreateMaybeMessage< ::oteldemo::DeleteFlagRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::DeleteFlagRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::oteldemo::DeleteFlagResponse* +Arena::CreateMaybeMessage< ::oteldemo::DeleteFlagResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::oteldemo::DeleteFlagResponse >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/src/currency/build/generated/proto/demo.pb.h b/src/currency/build/generated/proto/demo.pb.h new file mode 100644 index 0000000000..e1606a794f --- /dev/null +++ b/src/currency/build/generated/proto/demo.pb.h @@ -0,0 +1,12001 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: demo.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_demo_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_demo_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#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 3021012 < 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 // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_demo_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_demo_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_demo_2eproto; +namespace oteldemo { +class Ad; +struct AdDefaultTypeInternal; +extern AdDefaultTypeInternal _Ad_default_instance_; +class AdRequest; +struct AdRequestDefaultTypeInternal; +extern AdRequestDefaultTypeInternal _AdRequest_default_instance_; +class AdResponse; +struct AdResponseDefaultTypeInternal; +extern AdResponseDefaultTypeInternal _AdResponse_default_instance_; +class AddItemRequest; +struct AddItemRequestDefaultTypeInternal; +extern AddItemRequestDefaultTypeInternal _AddItemRequest_default_instance_; +class Address; +struct AddressDefaultTypeInternal; +extern AddressDefaultTypeInternal _Address_default_instance_; +class Cart; +struct CartDefaultTypeInternal; +extern CartDefaultTypeInternal _Cart_default_instance_; +class CartItem; +struct CartItemDefaultTypeInternal; +extern CartItemDefaultTypeInternal _CartItem_default_instance_; +class ChargeRequest; +struct ChargeRequestDefaultTypeInternal; +extern ChargeRequestDefaultTypeInternal _ChargeRequest_default_instance_; +class ChargeResponse; +struct ChargeResponseDefaultTypeInternal; +extern ChargeResponseDefaultTypeInternal _ChargeResponse_default_instance_; +class CreateFlagRequest; +struct CreateFlagRequestDefaultTypeInternal; +extern CreateFlagRequestDefaultTypeInternal _CreateFlagRequest_default_instance_; +class CreateFlagResponse; +struct CreateFlagResponseDefaultTypeInternal; +extern CreateFlagResponseDefaultTypeInternal _CreateFlagResponse_default_instance_; +class CreditCardInfo; +struct CreditCardInfoDefaultTypeInternal; +extern CreditCardInfoDefaultTypeInternal _CreditCardInfo_default_instance_; +class CurrencyConversionRequest; +struct CurrencyConversionRequestDefaultTypeInternal; +extern CurrencyConversionRequestDefaultTypeInternal _CurrencyConversionRequest_default_instance_; +class DeleteFlagRequest; +struct DeleteFlagRequestDefaultTypeInternal; +extern DeleteFlagRequestDefaultTypeInternal _DeleteFlagRequest_default_instance_; +class DeleteFlagResponse; +struct DeleteFlagResponseDefaultTypeInternal; +extern DeleteFlagResponseDefaultTypeInternal _DeleteFlagResponse_default_instance_; +class Empty; +struct EmptyDefaultTypeInternal; +extern EmptyDefaultTypeInternal _Empty_default_instance_; +class EmptyCartRequest; +struct EmptyCartRequestDefaultTypeInternal; +extern EmptyCartRequestDefaultTypeInternal _EmptyCartRequest_default_instance_; +class Flag; +struct FlagDefaultTypeInternal; +extern FlagDefaultTypeInternal _Flag_default_instance_; +class GetCartRequest; +struct GetCartRequestDefaultTypeInternal; +extern GetCartRequestDefaultTypeInternal _GetCartRequest_default_instance_; +class GetFlagRequest; +struct GetFlagRequestDefaultTypeInternal; +extern GetFlagRequestDefaultTypeInternal _GetFlagRequest_default_instance_; +class GetFlagResponse; +struct GetFlagResponseDefaultTypeInternal; +extern GetFlagResponseDefaultTypeInternal _GetFlagResponse_default_instance_; +class GetProductRequest; +struct GetProductRequestDefaultTypeInternal; +extern GetProductRequestDefaultTypeInternal _GetProductRequest_default_instance_; +class GetQuoteRequest; +struct GetQuoteRequestDefaultTypeInternal; +extern GetQuoteRequestDefaultTypeInternal _GetQuoteRequest_default_instance_; +class GetQuoteResponse; +struct GetQuoteResponseDefaultTypeInternal; +extern GetQuoteResponseDefaultTypeInternal _GetQuoteResponse_default_instance_; +class GetSupportedCurrenciesResponse; +struct GetSupportedCurrenciesResponseDefaultTypeInternal; +extern GetSupportedCurrenciesResponseDefaultTypeInternal _GetSupportedCurrenciesResponse_default_instance_; +class ListFlagsRequest; +struct ListFlagsRequestDefaultTypeInternal; +extern ListFlagsRequestDefaultTypeInternal _ListFlagsRequest_default_instance_; +class ListFlagsResponse; +struct ListFlagsResponseDefaultTypeInternal; +extern ListFlagsResponseDefaultTypeInternal _ListFlagsResponse_default_instance_; +class ListProductsResponse; +struct ListProductsResponseDefaultTypeInternal; +extern ListProductsResponseDefaultTypeInternal _ListProductsResponse_default_instance_; +class ListRecommendationsRequest; +struct ListRecommendationsRequestDefaultTypeInternal; +extern ListRecommendationsRequestDefaultTypeInternal _ListRecommendationsRequest_default_instance_; +class ListRecommendationsResponse; +struct ListRecommendationsResponseDefaultTypeInternal; +extern ListRecommendationsResponseDefaultTypeInternal _ListRecommendationsResponse_default_instance_; +class Money; +struct MoneyDefaultTypeInternal; +extern MoneyDefaultTypeInternal _Money_default_instance_; +class OrderItem; +struct OrderItemDefaultTypeInternal; +extern OrderItemDefaultTypeInternal _OrderItem_default_instance_; +class OrderResult; +struct OrderResultDefaultTypeInternal; +extern OrderResultDefaultTypeInternal _OrderResult_default_instance_; +class PlaceOrderRequest; +struct PlaceOrderRequestDefaultTypeInternal; +extern PlaceOrderRequestDefaultTypeInternal _PlaceOrderRequest_default_instance_; +class PlaceOrderResponse; +struct PlaceOrderResponseDefaultTypeInternal; +extern PlaceOrderResponseDefaultTypeInternal _PlaceOrderResponse_default_instance_; +class Product; +struct ProductDefaultTypeInternal; +extern ProductDefaultTypeInternal _Product_default_instance_; +class SearchProductsRequest; +struct SearchProductsRequestDefaultTypeInternal; +extern SearchProductsRequestDefaultTypeInternal _SearchProductsRequest_default_instance_; +class SearchProductsResponse; +struct SearchProductsResponseDefaultTypeInternal; +extern SearchProductsResponseDefaultTypeInternal _SearchProductsResponse_default_instance_; +class SendOrderConfirmationRequest; +struct SendOrderConfirmationRequestDefaultTypeInternal; +extern SendOrderConfirmationRequestDefaultTypeInternal _SendOrderConfirmationRequest_default_instance_; +class ShipOrderRequest; +struct ShipOrderRequestDefaultTypeInternal; +extern ShipOrderRequestDefaultTypeInternal _ShipOrderRequest_default_instance_; +class ShipOrderResponse; +struct ShipOrderResponseDefaultTypeInternal; +extern ShipOrderResponseDefaultTypeInternal _ShipOrderResponse_default_instance_; +class UpdateFlagRequest; +struct UpdateFlagRequestDefaultTypeInternal; +extern UpdateFlagRequestDefaultTypeInternal _UpdateFlagRequest_default_instance_; +class UpdateFlagResponse; +struct UpdateFlagResponseDefaultTypeInternal; +extern UpdateFlagResponseDefaultTypeInternal _UpdateFlagResponse_default_instance_; +} // namespace oteldemo +PROTOBUF_NAMESPACE_OPEN +template<> ::oteldemo::Ad* Arena::CreateMaybeMessage<::oteldemo::Ad>(Arena*); +template<> ::oteldemo::AdRequest* Arena::CreateMaybeMessage<::oteldemo::AdRequest>(Arena*); +template<> ::oteldemo::AdResponse* Arena::CreateMaybeMessage<::oteldemo::AdResponse>(Arena*); +template<> ::oteldemo::AddItemRequest* Arena::CreateMaybeMessage<::oteldemo::AddItemRequest>(Arena*); +template<> ::oteldemo::Address* Arena::CreateMaybeMessage<::oteldemo::Address>(Arena*); +template<> ::oteldemo::Cart* Arena::CreateMaybeMessage<::oteldemo::Cart>(Arena*); +template<> ::oteldemo::CartItem* Arena::CreateMaybeMessage<::oteldemo::CartItem>(Arena*); +template<> ::oteldemo::ChargeRequest* Arena::CreateMaybeMessage<::oteldemo::ChargeRequest>(Arena*); +template<> ::oteldemo::ChargeResponse* Arena::CreateMaybeMessage<::oteldemo::ChargeResponse>(Arena*); +template<> ::oteldemo::CreateFlagRequest* Arena::CreateMaybeMessage<::oteldemo::CreateFlagRequest>(Arena*); +template<> ::oteldemo::CreateFlagResponse* Arena::CreateMaybeMessage<::oteldemo::CreateFlagResponse>(Arena*); +template<> ::oteldemo::CreditCardInfo* Arena::CreateMaybeMessage<::oteldemo::CreditCardInfo>(Arena*); +template<> ::oteldemo::CurrencyConversionRequest* Arena::CreateMaybeMessage<::oteldemo::CurrencyConversionRequest>(Arena*); +template<> ::oteldemo::DeleteFlagRequest* Arena::CreateMaybeMessage<::oteldemo::DeleteFlagRequest>(Arena*); +template<> ::oteldemo::DeleteFlagResponse* Arena::CreateMaybeMessage<::oteldemo::DeleteFlagResponse>(Arena*); +template<> ::oteldemo::Empty* Arena::CreateMaybeMessage<::oteldemo::Empty>(Arena*); +template<> ::oteldemo::EmptyCartRequest* Arena::CreateMaybeMessage<::oteldemo::EmptyCartRequest>(Arena*); +template<> ::oteldemo::Flag* Arena::CreateMaybeMessage<::oteldemo::Flag>(Arena*); +template<> ::oteldemo::GetCartRequest* Arena::CreateMaybeMessage<::oteldemo::GetCartRequest>(Arena*); +template<> ::oteldemo::GetFlagRequest* Arena::CreateMaybeMessage<::oteldemo::GetFlagRequest>(Arena*); +template<> ::oteldemo::GetFlagResponse* Arena::CreateMaybeMessage<::oteldemo::GetFlagResponse>(Arena*); +template<> ::oteldemo::GetProductRequest* Arena::CreateMaybeMessage<::oteldemo::GetProductRequest>(Arena*); +template<> ::oteldemo::GetQuoteRequest* Arena::CreateMaybeMessage<::oteldemo::GetQuoteRequest>(Arena*); +template<> ::oteldemo::GetQuoteResponse* Arena::CreateMaybeMessage<::oteldemo::GetQuoteResponse>(Arena*); +template<> ::oteldemo::GetSupportedCurrenciesResponse* Arena::CreateMaybeMessage<::oteldemo::GetSupportedCurrenciesResponse>(Arena*); +template<> ::oteldemo::ListFlagsRequest* Arena::CreateMaybeMessage<::oteldemo::ListFlagsRequest>(Arena*); +template<> ::oteldemo::ListFlagsResponse* Arena::CreateMaybeMessage<::oteldemo::ListFlagsResponse>(Arena*); +template<> ::oteldemo::ListProductsResponse* Arena::CreateMaybeMessage<::oteldemo::ListProductsResponse>(Arena*); +template<> ::oteldemo::ListRecommendationsRequest* Arena::CreateMaybeMessage<::oteldemo::ListRecommendationsRequest>(Arena*); +template<> ::oteldemo::ListRecommendationsResponse* Arena::CreateMaybeMessage<::oteldemo::ListRecommendationsResponse>(Arena*); +template<> ::oteldemo::Money* Arena::CreateMaybeMessage<::oteldemo::Money>(Arena*); +template<> ::oteldemo::OrderItem* Arena::CreateMaybeMessage<::oteldemo::OrderItem>(Arena*); +template<> ::oteldemo::OrderResult* Arena::CreateMaybeMessage<::oteldemo::OrderResult>(Arena*); +template<> ::oteldemo::PlaceOrderRequest* Arena::CreateMaybeMessage<::oteldemo::PlaceOrderRequest>(Arena*); +template<> ::oteldemo::PlaceOrderResponse* Arena::CreateMaybeMessage<::oteldemo::PlaceOrderResponse>(Arena*); +template<> ::oteldemo::Product* Arena::CreateMaybeMessage<::oteldemo::Product>(Arena*); +template<> ::oteldemo::SearchProductsRequest* Arena::CreateMaybeMessage<::oteldemo::SearchProductsRequest>(Arena*); +template<> ::oteldemo::SearchProductsResponse* Arena::CreateMaybeMessage<::oteldemo::SearchProductsResponse>(Arena*); +template<> ::oteldemo::SendOrderConfirmationRequest* Arena::CreateMaybeMessage<::oteldemo::SendOrderConfirmationRequest>(Arena*); +template<> ::oteldemo::ShipOrderRequest* Arena::CreateMaybeMessage<::oteldemo::ShipOrderRequest>(Arena*); +template<> ::oteldemo::ShipOrderResponse* Arena::CreateMaybeMessage<::oteldemo::ShipOrderResponse>(Arena*); +template<> ::oteldemo::UpdateFlagRequest* Arena::CreateMaybeMessage<::oteldemo::UpdateFlagRequest>(Arena*); +template<> ::oteldemo::UpdateFlagResponse* Arena::CreateMaybeMessage<::oteldemo::UpdateFlagResponse>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace oteldemo { + +// =================================================================== + +class CartItem final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.CartItem) */ { + public: + inline CartItem() : CartItem(nullptr) {} + ~CartItem() override; + explicit PROTOBUF_CONSTEXPR CartItem(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CartItem(const CartItem& from); + CartItem(CartItem&& from) noexcept + : CartItem() { + *this = ::std::move(from); + } + + inline CartItem& operator=(const CartItem& from) { + CopyFrom(from); + return *this; + } + inline CartItem& operator=(CartItem&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CartItem& default_instance() { + return *internal_default_instance(); + } + static inline const CartItem* internal_default_instance() { + return reinterpret_cast( + &_CartItem_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(CartItem& a, CartItem& b) { + a.Swap(&b); + } + inline void Swap(CartItem* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CartItem* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CartItem* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CartItem& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CartItem& from) { + CartItem::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CartItem* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.CartItem"; + } + protected: + explicit CartItem(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kProductIdFieldNumber = 1, + kQuantityFieldNumber = 2, + }; + // string product_id = 1; + void clear_product_id(); + const std::string& product_id() const; + template + void set_product_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_product_id(); + PROTOBUF_NODISCARD std::string* release_product_id(); + void set_allocated_product_id(std::string* product_id); + private: + const std::string& _internal_product_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_product_id(const std::string& value); + std::string* _internal_mutable_product_id(); + public: + + // int32 quantity = 2; + void clear_quantity(); + int32_t quantity() const; + void set_quantity(int32_t value); + private: + int32_t _internal_quantity() const; + void _internal_set_quantity(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:oteldemo.CartItem) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr product_id_; + int32_t quantity_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class AddItemRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.AddItemRequest) */ { + public: + inline AddItemRequest() : AddItemRequest(nullptr) {} + ~AddItemRequest() override; + explicit PROTOBUF_CONSTEXPR AddItemRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AddItemRequest(const AddItemRequest& from); + AddItemRequest(AddItemRequest&& from) noexcept + : AddItemRequest() { + *this = ::std::move(from); + } + + inline AddItemRequest& operator=(const AddItemRequest& from) { + CopyFrom(from); + return *this; + } + inline AddItemRequest& operator=(AddItemRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AddItemRequest& default_instance() { + return *internal_default_instance(); + } + static inline const AddItemRequest* internal_default_instance() { + return reinterpret_cast( + &_AddItemRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(AddItemRequest& a, AddItemRequest& b) { + a.Swap(&b); + } + inline void Swap(AddItemRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AddItemRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + AddItemRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const AddItemRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const AddItemRequest& from) { + AddItemRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AddItemRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.AddItemRequest"; + } + protected: + explicit AddItemRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kUserIdFieldNumber = 1, + kItemFieldNumber = 2, + }; + // string user_id = 1; + void clear_user_id(); + const std::string& user_id() const; + template + void set_user_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_user_id(); + PROTOBUF_NODISCARD std::string* release_user_id(); + void set_allocated_user_id(std::string* user_id); + private: + const std::string& _internal_user_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_user_id(const std::string& value); + std::string* _internal_mutable_user_id(); + public: + + // .oteldemo.CartItem item = 2; + bool has_item() const; + private: + bool _internal_has_item() const; + public: + void clear_item(); + const ::oteldemo::CartItem& item() const; + PROTOBUF_NODISCARD ::oteldemo::CartItem* release_item(); + ::oteldemo::CartItem* mutable_item(); + void set_allocated_item(::oteldemo::CartItem* item); + private: + const ::oteldemo::CartItem& _internal_item() const; + ::oteldemo::CartItem* _internal_mutable_item(); + public: + void unsafe_arena_set_allocated_item( + ::oteldemo::CartItem* item); + ::oteldemo::CartItem* unsafe_arena_release_item(); + + // @@protoc_insertion_point(class_scope:oteldemo.AddItemRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr user_id_; + ::oteldemo::CartItem* item_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class EmptyCartRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.EmptyCartRequest) */ { + public: + inline EmptyCartRequest() : EmptyCartRequest(nullptr) {} + ~EmptyCartRequest() override; + explicit PROTOBUF_CONSTEXPR EmptyCartRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + EmptyCartRequest(const EmptyCartRequest& from); + EmptyCartRequest(EmptyCartRequest&& from) noexcept + : EmptyCartRequest() { + *this = ::std::move(from); + } + + inline EmptyCartRequest& operator=(const EmptyCartRequest& from) { + CopyFrom(from); + return *this; + } + inline EmptyCartRequest& operator=(EmptyCartRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const EmptyCartRequest& default_instance() { + return *internal_default_instance(); + } + static inline const EmptyCartRequest* internal_default_instance() { + return reinterpret_cast( + &_EmptyCartRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(EmptyCartRequest& a, EmptyCartRequest& b) { + a.Swap(&b); + } + inline void Swap(EmptyCartRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(EmptyCartRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + EmptyCartRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const EmptyCartRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const EmptyCartRequest& from) { + EmptyCartRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(EmptyCartRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.EmptyCartRequest"; + } + protected: + explicit EmptyCartRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kUserIdFieldNumber = 1, + }; + // string user_id = 1; + void clear_user_id(); + const std::string& user_id() const; + template + void set_user_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_user_id(); + PROTOBUF_NODISCARD std::string* release_user_id(); + void set_allocated_user_id(std::string* user_id); + private: + const std::string& _internal_user_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_user_id(const std::string& value); + std::string* _internal_mutable_user_id(); + public: + + // @@protoc_insertion_point(class_scope:oteldemo.EmptyCartRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr user_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class GetCartRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.GetCartRequest) */ { + public: + inline GetCartRequest() : GetCartRequest(nullptr) {} + ~GetCartRequest() override; + explicit PROTOBUF_CONSTEXPR GetCartRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GetCartRequest(const GetCartRequest& from); + GetCartRequest(GetCartRequest&& from) noexcept + : GetCartRequest() { + *this = ::std::move(from); + } + + inline GetCartRequest& operator=(const GetCartRequest& from) { + CopyFrom(from); + return *this; + } + inline GetCartRequest& operator=(GetCartRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GetCartRequest& default_instance() { + return *internal_default_instance(); + } + static inline const GetCartRequest* internal_default_instance() { + return reinterpret_cast( + &_GetCartRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(GetCartRequest& a, GetCartRequest& b) { + a.Swap(&b); + } + inline void Swap(GetCartRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetCartRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetCartRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GetCartRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const GetCartRequest& from) { + GetCartRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GetCartRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.GetCartRequest"; + } + protected: + explicit GetCartRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kUserIdFieldNumber = 1, + }; + // string user_id = 1; + void clear_user_id(); + const std::string& user_id() const; + template + void set_user_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_user_id(); + PROTOBUF_NODISCARD std::string* release_user_id(); + void set_allocated_user_id(std::string* user_id); + private: + const std::string& _internal_user_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_user_id(const std::string& value); + std::string* _internal_mutable_user_id(); + public: + + // @@protoc_insertion_point(class_scope:oteldemo.GetCartRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr user_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class Cart final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.Cart) */ { + public: + inline Cart() : Cart(nullptr) {} + ~Cart() override; + explicit PROTOBUF_CONSTEXPR Cart(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Cart(const Cart& from); + Cart(Cart&& from) noexcept + : Cart() { + *this = ::std::move(from); + } + + inline Cart& operator=(const Cart& from) { + CopyFrom(from); + return *this; + } + inline Cart& operator=(Cart&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Cart& default_instance() { + return *internal_default_instance(); + } + static inline const Cart* internal_default_instance() { + return reinterpret_cast( + &_Cart_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(Cart& a, Cart& b) { + a.Swap(&b); + } + inline void Swap(Cart* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Cart* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Cart* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Cart& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const Cart& from) { + Cart::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Cart* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.Cart"; + } + protected: + explicit Cart(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kItemsFieldNumber = 2, + kUserIdFieldNumber = 1, + }; + // repeated .oteldemo.CartItem items = 2; + int items_size() const; + private: + int _internal_items_size() const; + public: + void clear_items(); + ::oteldemo::CartItem* mutable_items(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::CartItem >* + mutable_items(); + private: + const ::oteldemo::CartItem& _internal_items(int index) const; + ::oteldemo::CartItem* _internal_add_items(); + public: + const ::oteldemo::CartItem& items(int index) const; + ::oteldemo::CartItem* add_items(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::CartItem >& + items() const; + + // string user_id = 1; + void clear_user_id(); + const std::string& user_id() const; + template + void set_user_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_user_id(); + PROTOBUF_NODISCARD std::string* release_user_id(); + void set_allocated_user_id(std::string* user_id); + private: + const std::string& _internal_user_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_user_id(const std::string& value); + std::string* _internal_mutable_user_id(); + public: + + // @@protoc_insertion_point(class_scope:oteldemo.Cart) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::CartItem > items_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr user_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class Empty final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:oteldemo.Empty) */ { + public: + inline Empty() : Empty(nullptr) {} + explicit PROTOBUF_CONSTEXPR Empty(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + 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 (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Empty& default_instance() { + return *internal_default_instance(); + } + static inline const Empty* internal_default_instance() { + return reinterpret_cast( + &_Empty_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(Empty& a, Empty& b) { + a.Swap(&b); + } + inline void Swap(Empty* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Empty* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Empty* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const Empty& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const Empty& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.Empty"; + } + protected: + explicit Empty(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:oteldemo.Empty) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class ListRecommendationsRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.ListRecommendationsRequest) */ { + public: + inline ListRecommendationsRequest() : ListRecommendationsRequest(nullptr) {} + ~ListRecommendationsRequest() override; + explicit PROTOBUF_CONSTEXPR ListRecommendationsRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ListRecommendationsRequest(const ListRecommendationsRequest& from); + ListRecommendationsRequest(ListRecommendationsRequest&& from) noexcept + : ListRecommendationsRequest() { + *this = ::std::move(from); + } + + inline ListRecommendationsRequest& operator=(const ListRecommendationsRequest& from) { + CopyFrom(from); + return *this; + } + inline ListRecommendationsRequest& operator=(ListRecommendationsRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ListRecommendationsRequest& default_instance() { + return *internal_default_instance(); + } + static inline const ListRecommendationsRequest* internal_default_instance() { + return reinterpret_cast( + &_ListRecommendationsRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(ListRecommendationsRequest& a, ListRecommendationsRequest& b) { + a.Swap(&b); + } + inline void Swap(ListRecommendationsRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ListRecommendationsRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ListRecommendationsRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ListRecommendationsRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ListRecommendationsRequest& from) { + ListRecommendationsRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ListRecommendationsRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.ListRecommendationsRequest"; + } + protected: + explicit ListRecommendationsRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kProductIdsFieldNumber = 2, + kUserIdFieldNumber = 1, + }; + // repeated string product_ids = 2; + int product_ids_size() const; + private: + int _internal_product_ids_size() const; + public: + void clear_product_ids(); + const std::string& product_ids(int index) const; + std::string* mutable_product_ids(int index); + void set_product_ids(int index, const std::string& value); + void set_product_ids(int index, std::string&& value); + void set_product_ids(int index, const char* value); + void set_product_ids(int index, const char* value, size_t size); + std::string* add_product_ids(); + void add_product_ids(const std::string& value); + void add_product_ids(std::string&& value); + void add_product_ids(const char* value); + void add_product_ids(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& product_ids() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_product_ids(); + private: + const std::string& _internal_product_ids(int index) const; + std::string* _internal_add_product_ids(); + public: + + // string user_id = 1; + void clear_user_id(); + const std::string& user_id() const; + template + void set_user_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_user_id(); + PROTOBUF_NODISCARD std::string* release_user_id(); + void set_allocated_user_id(std::string* user_id); + private: + const std::string& _internal_user_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_user_id(const std::string& value); + std::string* _internal_mutable_user_id(); + public: + + // @@protoc_insertion_point(class_scope:oteldemo.ListRecommendationsRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField product_ids_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr user_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class ListRecommendationsResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.ListRecommendationsResponse) */ { + public: + inline ListRecommendationsResponse() : ListRecommendationsResponse(nullptr) {} + ~ListRecommendationsResponse() override; + explicit PROTOBUF_CONSTEXPR ListRecommendationsResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ListRecommendationsResponse(const ListRecommendationsResponse& from); + ListRecommendationsResponse(ListRecommendationsResponse&& from) noexcept + : ListRecommendationsResponse() { + *this = ::std::move(from); + } + + inline ListRecommendationsResponse& operator=(const ListRecommendationsResponse& from) { + CopyFrom(from); + return *this; + } + inline ListRecommendationsResponse& operator=(ListRecommendationsResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ListRecommendationsResponse& default_instance() { + return *internal_default_instance(); + } + static inline const ListRecommendationsResponse* internal_default_instance() { + return reinterpret_cast( + &_ListRecommendationsResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(ListRecommendationsResponse& a, ListRecommendationsResponse& b) { + a.Swap(&b); + } + inline void Swap(ListRecommendationsResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ListRecommendationsResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ListRecommendationsResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ListRecommendationsResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ListRecommendationsResponse& from) { + ListRecommendationsResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ListRecommendationsResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.ListRecommendationsResponse"; + } + protected: + explicit ListRecommendationsResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kProductIdsFieldNumber = 1, + }; + // repeated string product_ids = 1; + int product_ids_size() const; + private: + int _internal_product_ids_size() const; + public: + void clear_product_ids(); + const std::string& product_ids(int index) const; + std::string* mutable_product_ids(int index); + void set_product_ids(int index, const std::string& value); + void set_product_ids(int index, std::string&& value); + void set_product_ids(int index, const char* value); + void set_product_ids(int index, const char* value, size_t size); + std::string* add_product_ids(); + void add_product_ids(const std::string& value); + void add_product_ids(std::string&& value); + void add_product_ids(const char* value); + void add_product_ids(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& product_ids() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_product_ids(); + private: + const std::string& _internal_product_ids(int index) const; + std::string* _internal_add_product_ids(); + public: + + // @@protoc_insertion_point(class_scope:oteldemo.ListRecommendationsResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField product_ids_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class Product final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.Product) */ { + public: + inline Product() : Product(nullptr) {} + ~Product() override; + explicit PROTOBUF_CONSTEXPR Product(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Product(const Product& from); + Product(Product&& from) noexcept + : Product() { + *this = ::std::move(from); + } + + inline Product& operator=(const Product& from) { + CopyFrom(from); + return *this; + } + inline Product& operator=(Product&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Product& default_instance() { + return *internal_default_instance(); + } + static inline const Product* internal_default_instance() { + return reinterpret_cast( + &_Product_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(Product& a, Product& b) { + a.Swap(&b); + } + inline void Swap(Product* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Product* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Product* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Product& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const Product& from) { + Product::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Product* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.Product"; + } + protected: + explicit Product(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kCategoriesFieldNumber = 6, + kIdFieldNumber = 1, + kNameFieldNumber = 2, + kDescriptionFieldNumber = 3, + kPictureFieldNumber = 4, + kPriceUsdFieldNumber = 5, + }; + // repeated string categories = 6; + int categories_size() const; + private: + int _internal_categories_size() const; + public: + void clear_categories(); + const std::string& categories(int index) const; + std::string* mutable_categories(int index); + void set_categories(int index, const std::string& value); + void set_categories(int index, std::string&& value); + void set_categories(int index, const char* value); + void set_categories(int index, const char* value, size_t size); + std::string* add_categories(); + void add_categories(const std::string& value); + void add_categories(std::string&& value); + void add_categories(const char* value); + void add_categories(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& categories() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_categories(); + private: + const std::string& _internal_categories(int index) const; + std::string* _internal_add_categories(); + public: + + // string id = 1; + void clear_id(); + const std::string& id() const; + template + void set_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_id(); + PROTOBUF_NODISCARD std::string* release_id(); + void set_allocated_id(std::string* id); + private: + const std::string& _internal_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_id(const std::string& value); + std::string* _internal_mutable_id(); + public: + + // string name = 2; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // string description = 3; + void clear_description(); + const std::string& description() const; + template + void set_description(ArgT0&& arg0, ArgT... args); + std::string* mutable_description(); + PROTOBUF_NODISCARD std::string* release_description(); + void set_allocated_description(std::string* description); + private: + const std::string& _internal_description() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_description(const std::string& value); + std::string* _internal_mutable_description(); + public: + + // string picture = 4; + void clear_picture(); + const std::string& picture() const; + template + void set_picture(ArgT0&& arg0, ArgT... args); + std::string* mutable_picture(); + PROTOBUF_NODISCARD std::string* release_picture(); + void set_allocated_picture(std::string* picture); + private: + const std::string& _internal_picture() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_picture(const std::string& value); + std::string* _internal_mutable_picture(); + public: + + // .oteldemo.Money price_usd = 5; + bool has_price_usd() const; + private: + bool _internal_has_price_usd() const; + public: + void clear_price_usd(); + const ::oteldemo::Money& price_usd() const; + PROTOBUF_NODISCARD ::oteldemo::Money* release_price_usd(); + ::oteldemo::Money* mutable_price_usd(); + void set_allocated_price_usd(::oteldemo::Money* price_usd); + private: + const ::oteldemo::Money& _internal_price_usd() const; + ::oteldemo::Money* _internal_mutable_price_usd(); + public: + void unsafe_arena_set_allocated_price_usd( + ::oteldemo::Money* price_usd); + ::oteldemo::Money* unsafe_arena_release_price_usd(); + + // @@protoc_insertion_point(class_scope:oteldemo.Product) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField categories_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr description_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr picture_; + ::oteldemo::Money* price_usd_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class ListProductsResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.ListProductsResponse) */ { + public: + inline ListProductsResponse() : ListProductsResponse(nullptr) {} + ~ListProductsResponse() override; + explicit PROTOBUF_CONSTEXPR ListProductsResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ListProductsResponse(const ListProductsResponse& from); + ListProductsResponse(ListProductsResponse&& from) noexcept + : ListProductsResponse() { + *this = ::std::move(from); + } + + inline ListProductsResponse& operator=(const ListProductsResponse& from) { + CopyFrom(from); + return *this; + } + inline ListProductsResponse& operator=(ListProductsResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ListProductsResponse& default_instance() { + return *internal_default_instance(); + } + static inline const ListProductsResponse* internal_default_instance() { + return reinterpret_cast( + &_ListProductsResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + friend void swap(ListProductsResponse& a, ListProductsResponse& b) { + a.Swap(&b); + } + inline void Swap(ListProductsResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ListProductsResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ListProductsResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ListProductsResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ListProductsResponse& from) { + ListProductsResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ListProductsResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.ListProductsResponse"; + } + protected: + explicit ListProductsResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kProductsFieldNumber = 1, + }; + // repeated .oteldemo.Product products = 1; + int products_size() const; + private: + int _internal_products_size() const; + public: + void clear_products(); + ::oteldemo::Product* mutable_products(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::Product >* + mutable_products(); + private: + const ::oteldemo::Product& _internal_products(int index) const; + ::oteldemo::Product* _internal_add_products(); + public: + const ::oteldemo::Product& products(int index) const; + ::oteldemo::Product* add_products(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::Product >& + products() const; + + // @@protoc_insertion_point(class_scope:oteldemo.ListProductsResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::Product > products_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class GetProductRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.GetProductRequest) */ { + public: + inline GetProductRequest() : GetProductRequest(nullptr) {} + ~GetProductRequest() override; + explicit PROTOBUF_CONSTEXPR GetProductRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GetProductRequest(const GetProductRequest& from); + GetProductRequest(GetProductRequest&& from) noexcept + : GetProductRequest() { + *this = ::std::move(from); + } + + inline GetProductRequest& operator=(const GetProductRequest& from) { + CopyFrom(from); + return *this; + } + inline GetProductRequest& operator=(GetProductRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GetProductRequest& default_instance() { + return *internal_default_instance(); + } + static inline const GetProductRequest* internal_default_instance() { + return reinterpret_cast( + &_GetProductRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 10; + + friend void swap(GetProductRequest& a, GetProductRequest& b) { + a.Swap(&b); + } + inline void Swap(GetProductRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetProductRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetProductRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GetProductRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const GetProductRequest& from) { + GetProductRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GetProductRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.GetProductRequest"; + } + protected: + explicit GetProductRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kIdFieldNumber = 1, + }; + // string id = 1; + void clear_id(); + const std::string& id() const; + template + void set_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_id(); + PROTOBUF_NODISCARD std::string* release_id(); + void set_allocated_id(std::string* id); + private: + const std::string& _internal_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_id(const std::string& value); + std::string* _internal_mutable_id(); + public: + + // @@protoc_insertion_point(class_scope:oteldemo.GetProductRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class SearchProductsRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.SearchProductsRequest) */ { + public: + inline SearchProductsRequest() : SearchProductsRequest(nullptr) {} + ~SearchProductsRequest() override; + explicit PROTOBUF_CONSTEXPR SearchProductsRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SearchProductsRequest(const SearchProductsRequest& from); + SearchProductsRequest(SearchProductsRequest&& from) noexcept + : SearchProductsRequest() { + *this = ::std::move(from); + } + + inline SearchProductsRequest& operator=(const SearchProductsRequest& from) { + CopyFrom(from); + return *this; + } + inline SearchProductsRequest& operator=(SearchProductsRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SearchProductsRequest& default_instance() { + return *internal_default_instance(); + } + static inline const SearchProductsRequest* internal_default_instance() { + return reinterpret_cast( + &_SearchProductsRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 11; + + friend void swap(SearchProductsRequest& a, SearchProductsRequest& b) { + a.Swap(&b); + } + inline void Swap(SearchProductsRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SearchProductsRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SearchProductsRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SearchProductsRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SearchProductsRequest& from) { + SearchProductsRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SearchProductsRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.SearchProductsRequest"; + } + protected: + explicit SearchProductsRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kQueryFieldNumber = 1, + }; + // string query = 1; + void clear_query(); + const std::string& query() const; + template + void set_query(ArgT0&& arg0, ArgT... args); + std::string* mutable_query(); + PROTOBUF_NODISCARD std::string* release_query(); + void set_allocated_query(std::string* query); + private: + const std::string& _internal_query() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_query(const std::string& value); + std::string* _internal_mutable_query(); + public: + + // @@protoc_insertion_point(class_scope:oteldemo.SearchProductsRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr query_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class SearchProductsResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.SearchProductsResponse) */ { + public: + inline SearchProductsResponse() : SearchProductsResponse(nullptr) {} + ~SearchProductsResponse() override; + explicit PROTOBUF_CONSTEXPR SearchProductsResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SearchProductsResponse(const SearchProductsResponse& from); + SearchProductsResponse(SearchProductsResponse&& from) noexcept + : SearchProductsResponse() { + *this = ::std::move(from); + } + + inline SearchProductsResponse& operator=(const SearchProductsResponse& from) { + CopyFrom(from); + return *this; + } + inline SearchProductsResponse& operator=(SearchProductsResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SearchProductsResponse& default_instance() { + return *internal_default_instance(); + } + static inline const SearchProductsResponse* internal_default_instance() { + return reinterpret_cast( + &_SearchProductsResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 12; + + friend void swap(SearchProductsResponse& a, SearchProductsResponse& b) { + a.Swap(&b); + } + inline void Swap(SearchProductsResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SearchProductsResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SearchProductsResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SearchProductsResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SearchProductsResponse& from) { + SearchProductsResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SearchProductsResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.SearchProductsResponse"; + } + protected: + explicit SearchProductsResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kResultsFieldNumber = 1, + }; + // repeated .oteldemo.Product results = 1; + int results_size() const; + private: + int _internal_results_size() const; + public: + void clear_results(); + ::oteldemo::Product* mutable_results(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::Product >* + mutable_results(); + private: + const ::oteldemo::Product& _internal_results(int index) const; + ::oteldemo::Product* _internal_add_results(); + public: + const ::oteldemo::Product& results(int index) const; + ::oteldemo::Product* add_results(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::Product >& + results() const; + + // @@protoc_insertion_point(class_scope:oteldemo.SearchProductsResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::Product > results_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class GetQuoteRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.GetQuoteRequest) */ { + public: + inline GetQuoteRequest() : GetQuoteRequest(nullptr) {} + ~GetQuoteRequest() override; + explicit PROTOBUF_CONSTEXPR GetQuoteRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GetQuoteRequest(const GetQuoteRequest& from); + GetQuoteRequest(GetQuoteRequest&& from) noexcept + : GetQuoteRequest() { + *this = ::std::move(from); + } + + inline GetQuoteRequest& operator=(const GetQuoteRequest& from) { + CopyFrom(from); + return *this; + } + inline GetQuoteRequest& operator=(GetQuoteRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GetQuoteRequest& default_instance() { + return *internal_default_instance(); + } + static inline const GetQuoteRequest* internal_default_instance() { + return reinterpret_cast( + &_GetQuoteRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 13; + + friend void swap(GetQuoteRequest& a, GetQuoteRequest& b) { + a.Swap(&b); + } + inline void Swap(GetQuoteRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetQuoteRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetQuoteRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GetQuoteRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const GetQuoteRequest& from) { + GetQuoteRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GetQuoteRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.GetQuoteRequest"; + } + protected: + explicit GetQuoteRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kItemsFieldNumber = 2, + kAddressFieldNumber = 1, + }; + // repeated .oteldemo.CartItem items = 2; + int items_size() const; + private: + int _internal_items_size() const; + public: + void clear_items(); + ::oteldemo::CartItem* mutable_items(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::CartItem >* + mutable_items(); + private: + const ::oteldemo::CartItem& _internal_items(int index) const; + ::oteldemo::CartItem* _internal_add_items(); + public: + const ::oteldemo::CartItem& items(int index) const; + ::oteldemo::CartItem* add_items(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::CartItem >& + items() const; + + // .oteldemo.Address address = 1; + bool has_address() const; + private: + bool _internal_has_address() const; + public: + void clear_address(); + const ::oteldemo::Address& address() const; + PROTOBUF_NODISCARD ::oteldemo::Address* release_address(); + ::oteldemo::Address* mutable_address(); + void set_allocated_address(::oteldemo::Address* address); + private: + const ::oteldemo::Address& _internal_address() const; + ::oteldemo::Address* _internal_mutable_address(); + public: + void unsafe_arena_set_allocated_address( + ::oteldemo::Address* address); + ::oteldemo::Address* unsafe_arena_release_address(); + + // @@protoc_insertion_point(class_scope:oteldemo.GetQuoteRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::CartItem > items_; + ::oteldemo::Address* address_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class GetQuoteResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.GetQuoteResponse) */ { + public: + inline GetQuoteResponse() : GetQuoteResponse(nullptr) {} + ~GetQuoteResponse() override; + explicit PROTOBUF_CONSTEXPR GetQuoteResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GetQuoteResponse(const GetQuoteResponse& from); + GetQuoteResponse(GetQuoteResponse&& from) noexcept + : GetQuoteResponse() { + *this = ::std::move(from); + } + + inline GetQuoteResponse& operator=(const GetQuoteResponse& from) { + CopyFrom(from); + return *this; + } + inline GetQuoteResponse& operator=(GetQuoteResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GetQuoteResponse& default_instance() { + return *internal_default_instance(); + } + static inline const GetQuoteResponse* internal_default_instance() { + return reinterpret_cast( + &_GetQuoteResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 14; + + friend void swap(GetQuoteResponse& a, GetQuoteResponse& b) { + a.Swap(&b); + } + inline void Swap(GetQuoteResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetQuoteResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetQuoteResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GetQuoteResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const GetQuoteResponse& from) { + GetQuoteResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GetQuoteResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.GetQuoteResponse"; + } + protected: + explicit GetQuoteResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kCostUsdFieldNumber = 1, + }; + // .oteldemo.Money cost_usd = 1; + bool has_cost_usd() const; + private: + bool _internal_has_cost_usd() const; + public: + void clear_cost_usd(); + const ::oteldemo::Money& cost_usd() const; + PROTOBUF_NODISCARD ::oteldemo::Money* release_cost_usd(); + ::oteldemo::Money* mutable_cost_usd(); + void set_allocated_cost_usd(::oteldemo::Money* cost_usd); + private: + const ::oteldemo::Money& _internal_cost_usd() const; + ::oteldemo::Money* _internal_mutable_cost_usd(); + public: + void unsafe_arena_set_allocated_cost_usd( + ::oteldemo::Money* cost_usd); + ::oteldemo::Money* unsafe_arena_release_cost_usd(); + + // @@protoc_insertion_point(class_scope:oteldemo.GetQuoteResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::oteldemo::Money* cost_usd_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class ShipOrderRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.ShipOrderRequest) */ { + public: + inline ShipOrderRequest() : ShipOrderRequest(nullptr) {} + ~ShipOrderRequest() override; + explicit PROTOBUF_CONSTEXPR ShipOrderRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ShipOrderRequest(const ShipOrderRequest& from); + ShipOrderRequest(ShipOrderRequest&& from) noexcept + : ShipOrderRequest() { + *this = ::std::move(from); + } + + inline ShipOrderRequest& operator=(const ShipOrderRequest& from) { + CopyFrom(from); + return *this; + } + inline ShipOrderRequest& operator=(ShipOrderRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ShipOrderRequest& default_instance() { + return *internal_default_instance(); + } + static inline const ShipOrderRequest* internal_default_instance() { + return reinterpret_cast( + &_ShipOrderRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 15; + + friend void swap(ShipOrderRequest& a, ShipOrderRequest& b) { + a.Swap(&b); + } + inline void Swap(ShipOrderRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ShipOrderRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ShipOrderRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ShipOrderRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ShipOrderRequest& from) { + ShipOrderRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ShipOrderRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.ShipOrderRequest"; + } + protected: + explicit ShipOrderRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kItemsFieldNumber = 2, + kAddressFieldNumber = 1, + }; + // repeated .oteldemo.CartItem items = 2; + int items_size() const; + private: + int _internal_items_size() const; + public: + void clear_items(); + ::oteldemo::CartItem* mutable_items(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::CartItem >* + mutable_items(); + private: + const ::oteldemo::CartItem& _internal_items(int index) const; + ::oteldemo::CartItem* _internal_add_items(); + public: + const ::oteldemo::CartItem& items(int index) const; + ::oteldemo::CartItem* add_items(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::CartItem >& + items() const; + + // .oteldemo.Address address = 1; + bool has_address() const; + private: + bool _internal_has_address() const; + public: + void clear_address(); + const ::oteldemo::Address& address() const; + PROTOBUF_NODISCARD ::oteldemo::Address* release_address(); + ::oteldemo::Address* mutable_address(); + void set_allocated_address(::oteldemo::Address* address); + private: + const ::oteldemo::Address& _internal_address() const; + ::oteldemo::Address* _internal_mutable_address(); + public: + void unsafe_arena_set_allocated_address( + ::oteldemo::Address* address); + ::oteldemo::Address* unsafe_arena_release_address(); + + // @@protoc_insertion_point(class_scope:oteldemo.ShipOrderRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::CartItem > items_; + ::oteldemo::Address* address_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class ShipOrderResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.ShipOrderResponse) */ { + public: + inline ShipOrderResponse() : ShipOrderResponse(nullptr) {} + ~ShipOrderResponse() override; + explicit PROTOBUF_CONSTEXPR ShipOrderResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ShipOrderResponse(const ShipOrderResponse& from); + ShipOrderResponse(ShipOrderResponse&& from) noexcept + : ShipOrderResponse() { + *this = ::std::move(from); + } + + inline ShipOrderResponse& operator=(const ShipOrderResponse& from) { + CopyFrom(from); + return *this; + } + inline ShipOrderResponse& operator=(ShipOrderResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ShipOrderResponse& default_instance() { + return *internal_default_instance(); + } + static inline const ShipOrderResponse* internal_default_instance() { + return reinterpret_cast( + &_ShipOrderResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 16; + + friend void swap(ShipOrderResponse& a, ShipOrderResponse& b) { + a.Swap(&b); + } + inline void Swap(ShipOrderResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ShipOrderResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ShipOrderResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ShipOrderResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ShipOrderResponse& from) { + ShipOrderResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ShipOrderResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.ShipOrderResponse"; + } + protected: + explicit ShipOrderResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTrackingIdFieldNumber = 1, + }; + // string tracking_id = 1; + void clear_tracking_id(); + const std::string& tracking_id() const; + template + void set_tracking_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_tracking_id(); + PROTOBUF_NODISCARD std::string* release_tracking_id(); + void set_allocated_tracking_id(std::string* tracking_id); + private: + const std::string& _internal_tracking_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_tracking_id(const std::string& value); + std::string* _internal_mutable_tracking_id(); + public: + + // @@protoc_insertion_point(class_scope:oteldemo.ShipOrderResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tracking_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class Address final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.Address) */ { + public: + inline Address() : Address(nullptr) {} + ~Address() override; + explicit PROTOBUF_CONSTEXPR Address(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Address(const Address& from); + Address(Address&& from) noexcept + : Address() { + *this = ::std::move(from); + } + + inline Address& operator=(const Address& from) { + CopyFrom(from); + return *this; + } + inline Address& operator=(Address&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Address& default_instance() { + return *internal_default_instance(); + } + static inline const Address* internal_default_instance() { + return reinterpret_cast( + &_Address_default_instance_); + } + static constexpr int kIndexInFileMessages = + 17; + + friend void swap(Address& a, Address& b) { + a.Swap(&b); + } + inline void Swap(Address* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Address* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Address* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage
(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Address& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const Address& from) { + Address::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Address* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.Address"; + } + protected: + explicit Address(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kStreetAddressFieldNumber = 1, + kCityFieldNumber = 2, + kStateFieldNumber = 3, + kCountryFieldNumber = 4, + kZipCodeFieldNumber = 5, + }; + // string street_address = 1; + void clear_street_address(); + const std::string& street_address() const; + template + void set_street_address(ArgT0&& arg0, ArgT... args); + std::string* mutable_street_address(); + PROTOBUF_NODISCARD std::string* release_street_address(); + void set_allocated_street_address(std::string* street_address); + private: + const std::string& _internal_street_address() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_street_address(const std::string& value); + std::string* _internal_mutable_street_address(); + public: + + // string city = 2; + void clear_city(); + const std::string& city() const; + template + void set_city(ArgT0&& arg0, ArgT... args); + std::string* mutable_city(); + PROTOBUF_NODISCARD std::string* release_city(); + void set_allocated_city(std::string* city); + private: + const std::string& _internal_city() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_city(const std::string& value); + std::string* _internal_mutable_city(); + public: + + // string state = 3; + void clear_state(); + const std::string& state() const; + template + void set_state(ArgT0&& arg0, ArgT... args); + std::string* mutable_state(); + PROTOBUF_NODISCARD std::string* release_state(); + void set_allocated_state(std::string* state); + private: + const std::string& _internal_state() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_state(const std::string& value); + std::string* _internal_mutable_state(); + public: + + // string country = 4; + void clear_country(); + const std::string& country() const; + template + void set_country(ArgT0&& arg0, ArgT... args); + std::string* mutable_country(); + PROTOBUF_NODISCARD std::string* release_country(); + void set_allocated_country(std::string* country); + private: + const std::string& _internal_country() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_country(const std::string& value); + std::string* _internal_mutable_country(); + public: + + // string zip_code = 5; + void clear_zip_code(); + const std::string& zip_code() const; + template + void set_zip_code(ArgT0&& arg0, ArgT... args); + std::string* mutable_zip_code(); + PROTOBUF_NODISCARD std::string* release_zip_code(); + void set_allocated_zip_code(std::string* zip_code); + private: + const std::string& _internal_zip_code() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_zip_code(const std::string& value); + std::string* _internal_mutable_zip_code(); + public: + + // @@protoc_insertion_point(class_scope:oteldemo.Address) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr street_address_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr city_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr state_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr country_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr zip_code_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class Money final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.Money) */ { + public: + inline Money() : Money(nullptr) {} + ~Money() override; + explicit PROTOBUF_CONSTEXPR Money(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Money(const Money& from); + Money(Money&& from) noexcept + : Money() { + *this = ::std::move(from); + } + + inline Money& operator=(const Money& from) { + CopyFrom(from); + return *this; + } + inline Money& operator=(Money&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Money& default_instance() { + return *internal_default_instance(); + } + static inline const Money* internal_default_instance() { + return reinterpret_cast( + &_Money_default_instance_); + } + static constexpr int kIndexInFileMessages = + 18; + + friend void swap(Money& a, Money& b) { + a.Swap(&b); + } + inline void Swap(Money* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Money* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Money* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Money& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const Money& from) { + Money::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Money* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.Money"; + } + protected: + explicit Money(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kCurrencyCodeFieldNumber = 1, + kUnitsFieldNumber = 2, + kNanosFieldNumber = 3, + }; + // string currency_code = 1; + void clear_currency_code(); + const std::string& currency_code() const; + template + void set_currency_code(ArgT0&& arg0, ArgT... args); + std::string* mutable_currency_code(); + PROTOBUF_NODISCARD std::string* release_currency_code(); + void set_allocated_currency_code(std::string* currency_code); + private: + const std::string& _internal_currency_code() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_currency_code(const std::string& value); + std::string* _internal_mutable_currency_code(); + public: + + // int64 units = 2; + void clear_units(); + int64_t units() const; + void set_units(int64_t value); + private: + int64_t _internal_units() const; + void _internal_set_units(int64_t value); + public: + + // int32 nanos = 3; + void clear_nanos(); + int32_t nanos() const; + void set_nanos(int32_t value); + private: + int32_t _internal_nanos() const; + void _internal_set_nanos(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:oteldemo.Money) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr currency_code_; + int64_t units_; + int32_t nanos_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class GetSupportedCurrenciesResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.GetSupportedCurrenciesResponse) */ { + public: + inline GetSupportedCurrenciesResponse() : GetSupportedCurrenciesResponse(nullptr) {} + ~GetSupportedCurrenciesResponse() override; + explicit PROTOBUF_CONSTEXPR GetSupportedCurrenciesResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GetSupportedCurrenciesResponse(const GetSupportedCurrenciesResponse& from); + GetSupportedCurrenciesResponse(GetSupportedCurrenciesResponse&& from) noexcept + : GetSupportedCurrenciesResponse() { + *this = ::std::move(from); + } + + inline GetSupportedCurrenciesResponse& operator=(const GetSupportedCurrenciesResponse& from) { + CopyFrom(from); + return *this; + } + inline GetSupportedCurrenciesResponse& operator=(GetSupportedCurrenciesResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GetSupportedCurrenciesResponse& default_instance() { + return *internal_default_instance(); + } + static inline const GetSupportedCurrenciesResponse* internal_default_instance() { + return reinterpret_cast( + &_GetSupportedCurrenciesResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 19; + + friend void swap(GetSupportedCurrenciesResponse& a, GetSupportedCurrenciesResponse& b) { + a.Swap(&b); + } + inline void Swap(GetSupportedCurrenciesResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetSupportedCurrenciesResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetSupportedCurrenciesResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GetSupportedCurrenciesResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const GetSupportedCurrenciesResponse& from) { + GetSupportedCurrenciesResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GetSupportedCurrenciesResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.GetSupportedCurrenciesResponse"; + } + protected: + explicit GetSupportedCurrenciesResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kCurrencyCodesFieldNumber = 1, + }; + // repeated string currency_codes = 1; + int currency_codes_size() const; + private: + int _internal_currency_codes_size() const; + public: + void clear_currency_codes(); + const std::string& currency_codes(int index) const; + std::string* mutable_currency_codes(int index); + void set_currency_codes(int index, const std::string& value); + void set_currency_codes(int index, std::string&& value); + void set_currency_codes(int index, const char* value); + void set_currency_codes(int index, const char* value, size_t size); + std::string* add_currency_codes(); + void add_currency_codes(const std::string& value); + void add_currency_codes(std::string&& value); + void add_currency_codes(const char* value); + void add_currency_codes(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& currency_codes() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_currency_codes(); + private: + const std::string& _internal_currency_codes(int index) const; + std::string* _internal_add_currency_codes(); + public: + + // @@protoc_insertion_point(class_scope:oteldemo.GetSupportedCurrenciesResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField currency_codes_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class CurrencyConversionRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.CurrencyConversionRequest) */ { + public: + inline CurrencyConversionRequest() : CurrencyConversionRequest(nullptr) {} + ~CurrencyConversionRequest() override; + explicit PROTOBUF_CONSTEXPR CurrencyConversionRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CurrencyConversionRequest(const CurrencyConversionRequest& from); + CurrencyConversionRequest(CurrencyConversionRequest&& from) noexcept + : CurrencyConversionRequest() { + *this = ::std::move(from); + } + + inline CurrencyConversionRequest& operator=(const CurrencyConversionRequest& from) { + CopyFrom(from); + return *this; + } + inline CurrencyConversionRequest& operator=(CurrencyConversionRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CurrencyConversionRequest& default_instance() { + return *internal_default_instance(); + } + static inline const CurrencyConversionRequest* internal_default_instance() { + return reinterpret_cast( + &_CurrencyConversionRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 20; + + friend void swap(CurrencyConversionRequest& a, CurrencyConversionRequest& b) { + a.Swap(&b); + } + inline void Swap(CurrencyConversionRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CurrencyConversionRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CurrencyConversionRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CurrencyConversionRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CurrencyConversionRequest& from) { + CurrencyConversionRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CurrencyConversionRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.CurrencyConversionRequest"; + } + protected: + explicit CurrencyConversionRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kToCodeFieldNumber = 2, + kFromFieldNumber = 1, + }; + // string to_code = 2; + void clear_to_code(); + const std::string& to_code() const; + template + void set_to_code(ArgT0&& arg0, ArgT... args); + std::string* mutable_to_code(); + PROTOBUF_NODISCARD std::string* release_to_code(); + void set_allocated_to_code(std::string* to_code); + private: + const std::string& _internal_to_code() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_to_code(const std::string& value); + std::string* _internal_mutable_to_code(); + public: + + // .oteldemo.Money from = 1; + bool has_from() const; + private: + bool _internal_has_from() const; + public: + void clear_from(); + const ::oteldemo::Money& from() const; + PROTOBUF_NODISCARD ::oteldemo::Money* release_from(); + ::oteldemo::Money* mutable_from(); + void set_allocated_from(::oteldemo::Money* from); + private: + const ::oteldemo::Money& _internal_from() const; + ::oteldemo::Money* _internal_mutable_from(); + public: + void unsafe_arena_set_allocated_from( + ::oteldemo::Money* from); + ::oteldemo::Money* unsafe_arena_release_from(); + + // @@protoc_insertion_point(class_scope:oteldemo.CurrencyConversionRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr to_code_; + ::oteldemo::Money* from_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class CreditCardInfo final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.CreditCardInfo) */ { + public: + inline CreditCardInfo() : CreditCardInfo(nullptr) {} + ~CreditCardInfo() override; + explicit PROTOBUF_CONSTEXPR CreditCardInfo(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CreditCardInfo(const CreditCardInfo& from); + CreditCardInfo(CreditCardInfo&& from) noexcept + : CreditCardInfo() { + *this = ::std::move(from); + } + + inline CreditCardInfo& operator=(const CreditCardInfo& from) { + CopyFrom(from); + return *this; + } + inline CreditCardInfo& operator=(CreditCardInfo&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CreditCardInfo& default_instance() { + return *internal_default_instance(); + } + static inline const CreditCardInfo* internal_default_instance() { + return reinterpret_cast( + &_CreditCardInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = + 21; + + friend void swap(CreditCardInfo& a, CreditCardInfo& b) { + a.Swap(&b); + } + inline void Swap(CreditCardInfo* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CreditCardInfo* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CreditCardInfo* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CreditCardInfo& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CreditCardInfo& from) { + CreditCardInfo::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CreditCardInfo* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.CreditCardInfo"; + } + protected: + explicit CreditCardInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kCreditCardNumberFieldNumber = 1, + kCreditCardCvvFieldNumber = 2, + kCreditCardExpirationYearFieldNumber = 3, + kCreditCardExpirationMonthFieldNumber = 4, + }; + // string credit_card_number = 1; + void clear_credit_card_number(); + const std::string& credit_card_number() const; + template + void set_credit_card_number(ArgT0&& arg0, ArgT... args); + std::string* mutable_credit_card_number(); + PROTOBUF_NODISCARD std::string* release_credit_card_number(); + void set_allocated_credit_card_number(std::string* credit_card_number); + private: + const std::string& _internal_credit_card_number() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_credit_card_number(const std::string& value); + std::string* _internal_mutable_credit_card_number(); + public: + + // int32 credit_card_cvv = 2; + void clear_credit_card_cvv(); + int32_t credit_card_cvv() const; + void set_credit_card_cvv(int32_t value); + private: + int32_t _internal_credit_card_cvv() const; + void _internal_set_credit_card_cvv(int32_t value); + public: + + // int32 credit_card_expiration_year = 3; + void clear_credit_card_expiration_year(); + int32_t credit_card_expiration_year() const; + void set_credit_card_expiration_year(int32_t value); + private: + int32_t _internal_credit_card_expiration_year() const; + void _internal_set_credit_card_expiration_year(int32_t value); + public: + + // int32 credit_card_expiration_month = 4; + void clear_credit_card_expiration_month(); + int32_t credit_card_expiration_month() const; + void set_credit_card_expiration_month(int32_t value); + private: + int32_t _internal_credit_card_expiration_month() const; + void _internal_set_credit_card_expiration_month(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:oteldemo.CreditCardInfo) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr credit_card_number_; + int32_t credit_card_cvv_; + int32_t credit_card_expiration_year_; + int32_t credit_card_expiration_month_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class ChargeRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.ChargeRequest) */ { + public: + inline ChargeRequest() : ChargeRequest(nullptr) {} + ~ChargeRequest() override; + explicit PROTOBUF_CONSTEXPR ChargeRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ChargeRequest(const ChargeRequest& from); + ChargeRequest(ChargeRequest&& from) noexcept + : ChargeRequest() { + *this = ::std::move(from); + } + + inline ChargeRequest& operator=(const ChargeRequest& from) { + CopyFrom(from); + return *this; + } + inline ChargeRequest& operator=(ChargeRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ChargeRequest& default_instance() { + return *internal_default_instance(); + } + static inline const ChargeRequest* internal_default_instance() { + return reinterpret_cast( + &_ChargeRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 22; + + friend void swap(ChargeRequest& a, ChargeRequest& b) { + a.Swap(&b); + } + inline void Swap(ChargeRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ChargeRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ChargeRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ChargeRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ChargeRequest& from) { + ChargeRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ChargeRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.ChargeRequest"; + } + protected: + explicit ChargeRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kAmountFieldNumber = 1, + kCreditCardFieldNumber = 2, + }; + // .oteldemo.Money amount = 1; + bool has_amount() const; + private: + bool _internal_has_amount() const; + public: + void clear_amount(); + const ::oteldemo::Money& amount() const; + PROTOBUF_NODISCARD ::oteldemo::Money* release_amount(); + ::oteldemo::Money* mutable_amount(); + void set_allocated_amount(::oteldemo::Money* amount); + private: + const ::oteldemo::Money& _internal_amount() const; + ::oteldemo::Money* _internal_mutable_amount(); + public: + void unsafe_arena_set_allocated_amount( + ::oteldemo::Money* amount); + ::oteldemo::Money* unsafe_arena_release_amount(); + + // .oteldemo.CreditCardInfo credit_card = 2; + bool has_credit_card() const; + private: + bool _internal_has_credit_card() const; + public: + void clear_credit_card(); + const ::oteldemo::CreditCardInfo& credit_card() const; + PROTOBUF_NODISCARD ::oteldemo::CreditCardInfo* release_credit_card(); + ::oteldemo::CreditCardInfo* mutable_credit_card(); + void set_allocated_credit_card(::oteldemo::CreditCardInfo* credit_card); + private: + const ::oteldemo::CreditCardInfo& _internal_credit_card() const; + ::oteldemo::CreditCardInfo* _internal_mutable_credit_card(); + public: + void unsafe_arena_set_allocated_credit_card( + ::oteldemo::CreditCardInfo* credit_card); + ::oteldemo::CreditCardInfo* unsafe_arena_release_credit_card(); + + // @@protoc_insertion_point(class_scope:oteldemo.ChargeRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::oteldemo::Money* amount_; + ::oteldemo::CreditCardInfo* credit_card_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class ChargeResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.ChargeResponse) */ { + public: + inline ChargeResponse() : ChargeResponse(nullptr) {} + ~ChargeResponse() override; + explicit PROTOBUF_CONSTEXPR ChargeResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ChargeResponse(const ChargeResponse& from); + ChargeResponse(ChargeResponse&& from) noexcept + : ChargeResponse() { + *this = ::std::move(from); + } + + inline ChargeResponse& operator=(const ChargeResponse& from) { + CopyFrom(from); + return *this; + } + inline ChargeResponse& operator=(ChargeResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ChargeResponse& default_instance() { + return *internal_default_instance(); + } + static inline const ChargeResponse* internal_default_instance() { + return reinterpret_cast( + &_ChargeResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 23; + + friend void swap(ChargeResponse& a, ChargeResponse& b) { + a.Swap(&b); + } + inline void Swap(ChargeResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ChargeResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ChargeResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ChargeResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ChargeResponse& from) { + ChargeResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ChargeResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.ChargeResponse"; + } + protected: + explicit ChargeResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTransactionIdFieldNumber = 1, + }; + // string transaction_id = 1; + void clear_transaction_id(); + const std::string& transaction_id() const; + template + void set_transaction_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_transaction_id(); + PROTOBUF_NODISCARD std::string* release_transaction_id(); + void set_allocated_transaction_id(std::string* transaction_id); + private: + const std::string& _internal_transaction_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_transaction_id(const std::string& value); + std::string* _internal_mutable_transaction_id(); + public: + + // @@protoc_insertion_point(class_scope:oteldemo.ChargeResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr transaction_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class OrderItem final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.OrderItem) */ { + public: + inline OrderItem() : OrderItem(nullptr) {} + ~OrderItem() override; + explicit PROTOBUF_CONSTEXPR OrderItem(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + OrderItem(const OrderItem& from); + OrderItem(OrderItem&& from) noexcept + : OrderItem() { + *this = ::std::move(from); + } + + inline OrderItem& operator=(const OrderItem& from) { + CopyFrom(from); + return *this; + } + inline OrderItem& operator=(OrderItem&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const OrderItem& default_instance() { + return *internal_default_instance(); + } + static inline const OrderItem* internal_default_instance() { + return reinterpret_cast( + &_OrderItem_default_instance_); + } + static constexpr int kIndexInFileMessages = + 24; + + friend void swap(OrderItem& a, OrderItem& b) { + a.Swap(&b); + } + inline void Swap(OrderItem* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(OrderItem* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + OrderItem* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const OrderItem& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const OrderItem& from) { + OrderItem::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(OrderItem* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.OrderItem"; + } + protected: + explicit OrderItem(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kItemFieldNumber = 1, + kCostFieldNumber = 2, + }; + // .oteldemo.CartItem item = 1; + bool has_item() const; + private: + bool _internal_has_item() const; + public: + void clear_item(); + const ::oteldemo::CartItem& item() const; + PROTOBUF_NODISCARD ::oteldemo::CartItem* release_item(); + ::oteldemo::CartItem* mutable_item(); + void set_allocated_item(::oteldemo::CartItem* item); + private: + const ::oteldemo::CartItem& _internal_item() const; + ::oteldemo::CartItem* _internal_mutable_item(); + public: + void unsafe_arena_set_allocated_item( + ::oteldemo::CartItem* item); + ::oteldemo::CartItem* unsafe_arena_release_item(); + + // .oteldemo.Money cost = 2; + bool has_cost() const; + private: + bool _internal_has_cost() const; + public: + void clear_cost(); + const ::oteldemo::Money& cost() const; + PROTOBUF_NODISCARD ::oteldemo::Money* release_cost(); + ::oteldemo::Money* mutable_cost(); + void set_allocated_cost(::oteldemo::Money* cost); + private: + const ::oteldemo::Money& _internal_cost() const; + ::oteldemo::Money* _internal_mutable_cost(); + public: + void unsafe_arena_set_allocated_cost( + ::oteldemo::Money* cost); + ::oteldemo::Money* unsafe_arena_release_cost(); + + // @@protoc_insertion_point(class_scope:oteldemo.OrderItem) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::oteldemo::CartItem* item_; + ::oteldemo::Money* cost_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class OrderResult final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.OrderResult) */ { + public: + inline OrderResult() : OrderResult(nullptr) {} + ~OrderResult() override; + explicit PROTOBUF_CONSTEXPR OrderResult(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + OrderResult(const OrderResult& from); + OrderResult(OrderResult&& from) noexcept + : OrderResult() { + *this = ::std::move(from); + } + + inline OrderResult& operator=(const OrderResult& from) { + CopyFrom(from); + return *this; + } + inline OrderResult& operator=(OrderResult&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const OrderResult& default_instance() { + return *internal_default_instance(); + } + static inline const OrderResult* internal_default_instance() { + return reinterpret_cast( + &_OrderResult_default_instance_); + } + static constexpr int kIndexInFileMessages = + 25; + + friend void swap(OrderResult& a, OrderResult& b) { + a.Swap(&b); + } + inline void Swap(OrderResult* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(OrderResult* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + OrderResult* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const OrderResult& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const OrderResult& from) { + OrderResult::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(OrderResult* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.OrderResult"; + } + protected: + explicit OrderResult(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kItemsFieldNumber = 5, + kOrderIdFieldNumber = 1, + kShippingTrackingIdFieldNumber = 2, + kShippingCostFieldNumber = 3, + kShippingAddressFieldNumber = 4, + }; + // repeated .oteldemo.OrderItem items = 5; + int items_size() const; + private: + int _internal_items_size() const; + public: + void clear_items(); + ::oteldemo::OrderItem* mutable_items(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::OrderItem >* + mutable_items(); + private: + const ::oteldemo::OrderItem& _internal_items(int index) const; + ::oteldemo::OrderItem* _internal_add_items(); + public: + const ::oteldemo::OrderItem& items(int index) const; + ::oteldemo::OrderItem* add_items(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::OrderItem >& + items() const; + + // string order_id = 1; + void clear_order_id(); + const std::string& order_id() const; + template + void set_order_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_order_id(); + PROTOBUF_NODISCARD std::string* release_order_id(); + void set_allocated_order_id(std::string* order_id); + private: + const std::string& _internal_order_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_order_id(const std::string& value); + std::string* _internal_mutable_order_id(); + public: + + // string shipping_tracking_id = 2; + void clear_shipping_tracking_id(); + const std::string& shipping_tracking_id() const; + template + void set_shipping_tracking_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_shipping_tracking_id(); + PROTOBUF_NODISCARD std::string* release_shipping_tracking_id(); + void set_allocated_shipping_tracking_id(std::string* shipping_tracking_id); + private: + const std::string& _internal_shipping_tracking_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_shipping_tracking_id(const std::string& value); + std::string* _internal_mutable_shipping_tracking_id(); + public: + + // .oteldemo.Money shipping_cost = 3; + bool has_shipping_cost() const; + private: + bool _internal_has_shipping_cost() const; + public: + void clear_shipping_cost(); + const ::oteldemo::Money& shipping_cost() const; + PROTOBUF_NODISCARD ::oteldemo::Money* release_shipping_cost(); + ::oteldemo::Money* mutable_shipping_cost(); + void set_allocated_shipping_cost(::oteldemo::Money* shipping_cost); + private: + const ::oteldemo::Money& _internal_shipping_cost() const; + ::oteldemo::Money* _internal_mutable_shipping_cost(); + public: + void unsafe_arena_set_allocated_shipping_cost( + ::oteldemo::Money* shipping_cost); + ::oteldemo::Money* unsafe_arena_release_shipping_cost(); + + // .oteldemo.Address shipping_address = 4; + bool has_shipping_address() const; + private: + bool _internal_has_shipping_address() const; + public: + void clear_shipping_address(); + const ::oteldemo::Address& shipping_address() const; + PROTOBUF_NODISCARD ::oteldemo::Address* release_shipping_address(); + ::oteldemo::Address* mutable_shipping_address(); + void set_allocated_shipping_address(::oteldemo::Address* shipping_address); + private: + const ::oteldemo::Address& _internal_shipping_address() const; + ::oteldemo::Address* _internal_mutable_shipping_address(); + public: + void unsafe_arena_set_allocated_shipping_address( + ::oteldemo::Address* shipping_address); + ::oteldemo::Address* unsafe_arena_release_shipping_address(); + + // @@protoc_insertion_point(class_scope:oteldemo.OrderResult) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::OrderItem > items_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr order_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr shipping_tracking_id_; + ::oteldemo::Money* shipping_cost_; + ::oteldemo::Address* shipping_address_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class SendOrderConfirmationRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.SendOrderConfirmationRequest) */ { + public: + inline SendOrderConfirmationRequest() : SendOrderConfirmationRequest(nullptr) {} + ~SendOrderConfirmationRequest() override; + explicit PROTOBUF_CONSTEXPR SendOrderConfirmationRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SendOrderConfirmationRequest(const SendOrderConfirmationRequest& from); + SendOrderConfirmationRequest(SendOrderConfirmationRequest&& from) noexcept + : SendOrderConfirmationRequest() { + *this = ::std::move(from); + } + + inline SendOrderConfirmationRequest& operator=(const SendOrderConfirmationRequest& from) { + CopyFrom(from); + return *this; + } + inline SendOrderConfirmationRequest& operator=(SendOrderConfirmationRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SendOrderConfirmationRequest& default_instance() { + return *internal_default_instance(); + } + static inline const SendOrderConfirmationRequest* internal_default_instance() { + return reinterpret_cast( + &_SendOrderConfirmationRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 26; + + friend void swap(SendOrderConfirmationRequest& a, SendOrderConfirmationRequest& b) { + a.Swap(&b); + } + inline void Swap(SendOrderConfirmationRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SendOrderConfirmationRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SendOrderConfirmationRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SendOrderConfirmationRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const SendOrderConfirmationRequest& from) { + SendOrderConfirmationRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SendOrderConfirmationRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.SendOrderConfirmationRequest"; + } + protected: + explicit SendOrderConfirmationRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kEmailFieldNumber = 1, + kOrderFieldNumber = 2, + }; + // string email = 1; + void clear_email(); + const std::string& email() const; + template + void set_email(ArgT0&& arg0, ArgT... args); + std::string* mutable_email(); + PROTOBUF_NODISCARD std::string* release_email(); + void set_allocated_email(std::string* email); + private: + const std::string& _internal_email() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_email(const std::string& value); + std::string* _internal_mutable_email(); + public: + + // .oteldemo.OrderResult order = 2; + bool has_order() const; + private: + bool _internal_has_order() const; + public: + void clear_order(); + const ::oteldemo::OrderResult& order() const; + PROTOBUF_NODISCARD ::oteldemo::OrderResult* release_order(); + ::oteldemo::OrderResult* mutable_order(); + void set_allocated_order(::oteldemo::OrderResult* order); + private: + const ::oteldemo::OrderResult& _internal_order() const; + ::oteldemo::OrderResult* _internal_mutable_order(); + public: + void unsafe_arena_set_allocated_order( + ::oteldemo::OrderResult* order); + ::oteldemo::OrderResult* unsafe_arena_release_order(); + + // @@protoc_insertion_point(class_scope:oteldemo.SendOrderConfirmationRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr email_; + ::oteldemo::OrderResult* order_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class PlaceOrderRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.PlaceOrderRequest) */ { + public: + inline PlaceOrderRequest() : PlaceOrderRequest(nullptr) {} + ~PlaceOrderRequest() override; + explicit PROTOBUF_CONSTEXPR PlaceOrderRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + PlaceOrderRequest(const PlaceOrderRequest& from); + PlaceOrderRequest(PlaceOrderRequest&& from) noexcept + : PlaceOrderRequest() { + *this = ::std::move(from); + } + + inline PlaceOrderRequest& operator=(const PlaceOrderRequest& from) { + CopyFrom(from); + return *this; + } + inline PlaceOrderRequest& operator=(PlaceOrderRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const PlaceOrderRequest& default_instance() { + return *internal_default_instance(); + } + static inline const PlaceOrderRequest* internal_default_instance() { + return reinterpret_cast( + &_PlaceOrderRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 27; + + friend void swap(PlaceOrderRequest& a, PlaceOrderRequest& b) { + a.Swap(&b); + } + inline void Swap(PlaceOrderRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(PlaceOrderRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + PlaceOrderRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const PlaceOrderRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const PlaceOrderRequest& from) { + PlaceOrderRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(PlaceOrderRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.PlaceOrderRequest"; + } + protected: + explicit PlaceOrderRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kUserIdFieldNumber = 1, + kUserCurrencyFieldNumber = 2, + kEmailFieldNumber = 5, + kAddressFieldNumber = 3, + kCreditCardFieldNumber = 6, + }; + // string user_id = 1; + void clear_user_id(); + const std::string& user_id() const; + template + void set_user_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_user_id(); + PROTOBUF_NODISCARD std::string* release_user_id(); + void set_allocated_user_id(std::string* user_id); + private: + const std::string& _internal_user_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_user_id(const std::string& value); + std::string* _internal_mutable_user_id(); + public: + + // string user_currency = 2; + void clear_user_currency(); + const std::string& user_currency() const; + template + void set_user_currency(ArgT0&& arg0, ArgT... args); + std::string* mutable_user_currency(); + PROTOBUF_NODISCARD std::string* release_user_currency(); + void set_allocated_user_currency(std::string* user_currency); + private: + const std::string& _internal_user_currency() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_user_currency(const std::string& value); + std::string* _internal_mutable_user_currency(); + public: + + // string email = 5; + void clear_email(); + const std::string& email() const; + template + void set_email(ArgT0&& arg0, ArgT... args); + std::string* mutable_email(); + PROTOBUF_NODISCARD std::string* release_email(); + void set_allocated_email(std::string* email); + private: + const std::string& _internal_email() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_email(const std::string& value); + std::string* _internal_mutable_email(); + public: + + // .oteldemo.Address address = 3; + bool has_address() const; + private: + bool _internal_has_address() const; + public: + void clear_address(); + const ::oteldemo::Address& address() const; + PROTOBUF_NODISCARD ::oteldemo::Address* release_address(); + ::oteldemo::Address* mutable_address(); + void set_allocated_address(::oteldemo::Address* address); + private: + const ::oteldemo::Address& _internal_address() const; + ::oteldemo::Address* _internal_mutable_address(); + public: + void unsafe_arena_set_allocated_address( + ::oteldemo::Address* address); + ::oteldemo::Address* unsafe_arena_release_address(); + + // .oteldemo.CreditCardInfo credit_card = 6; + bool has_credit_card() const; + private: + bool _internal_has_credit_card() const; + public: + void clear_credit_card(); + const ::oteldemo::CreditCardInfo& credit_card() const; + PROTOBUF_NODISCARD ::oteldemo::CreditCardInfo* release_credit_card(); + ::oteldemo::CreditCardInfo* mutable_credit_card(); + void set_allocated_credit_card(::oteldemo::CreditCardInfo* credit_card); + private: + const ::oteldemo::CreditCardInfo& _internal_credit_card() const; + ::oteldemo::CreditCardInfo* _internal_mutable_credit_card(); + public: + void unsafe_arena_set_allocated_credit_card( + ::oteldemo::CreditCardInfo* credit_card); + ::oteldemo::CreditCardInfo* unsafe_arena_release_credit_card(); + + // @@protoc_insertion_point(class_scope:oteldemo.PlaceOrderRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr user_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr user_currency_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr email_; + ::oteldemo::Address* address_; + ::oteldemo::CreditCardInfo* credit_card_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class PlaceOrderResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.PlaceOrderResponse) */ { + public: + inline PlaceOrderResponse() : PlaceOrderResponse(nullptr) {} + ~PlaceOrderResponse() override; + explicit PROTOBUF_CONSTEXPR PlaceOrderResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + PlaceOrderResponse(const PlaceOrderResponse& from); + PlaceOrderResponse(PlaceOrderResponse&& from) noexcept + : PlaceOrderResponse() { + *this = ::std::move(from); + } + + inline PlaceOrderResponse& operator=(const PlaceOrderResponse& from) { + CopyFrom(from); + return *this; + } + inline PlaceOrderResponse& operator=(PlaceOrderResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const PlaceOrderResponse& default_instance() { + return *internal_default_instance(); + } + static inline const PlaceOrderResponse* internal_default_instance() { + return reinterpret_cast( + &_PlaceOrderResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 28; + + friend void swap(PlaceOrderResponse& a, PlaceOrderResponse& b) { + a.Swap(&b); + } + inline void Swap(PlaceOrderResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(PlaceOrderResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + PlaceOrderResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const PlaceOrderResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const PlaceOrderResponse& from) { + PlaceOrderResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(PlaceOrderResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.PlaceOrderResponse"; + } + protected: + explicit PlaceOrderResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kOrderFieldNumber = 1, + }; + // .oteldemo.OrderResult order = 1; + bool has_order() const; + private: + bool _internal_has_order() const; + public: + void clear_order(); + const ::oteldemo::OrderResult& order() const; + PROTOBUF_NODISCARD ::oteldemo::OrderResult* release_order(); + ::oteldemo::OrderResult* mutable_order(); + void set_allocated_order(::oteldemo::OrderResult* order); + private: + const ::oteldemo::OrderResult& _internal_order() const; + ::oteldemo::OrderResult* _internal_mutable_order(); + public: + void unsafe_arena_set_allocated_order( + ::oteldemo::OrderResult* order); + ::oteldemo::OrderResult* unsafe_arena_release_order(); + + // @@protoc_insertion_point(class_scope:oteldemo.PlaceOrderResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::oteldemo::OrderResult* order_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class AdRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.AdRequest) */ { + public: + inline AdRequest() : AdRequest(nullptr) {} + ~AdRequest() override; + explicit PROTOBUF_CONSTEXPR AdRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AdRequest(const AdRequest& from); + AdRequest(AdRequest&& from) noexcept + : AdRequest() { + *this = ::std::move(from); + } + + inline AdRequest& operator=(const AdRequest& from) { + CopyFrom(from); + return *this; + } + inline AdRequest& operator=(AdRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AdRequest& default_instance() { + return *internal_default_instance(); + } + static inline const AdRequest* internal_default_instance() { + return reinterpret_cast( + &_AdRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 29; + + friend void swap(AdRequest& a, AdRequest& b) { + a.Swap(&b); + } + inline void Swap(AdRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AdRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + AdRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const AdRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const AdRequest& from) { + AdRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AdRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.AdRequest"; + } + protected: + explicit AdRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kContextKeysFieldNumber = 1, + }; + // repeated string context_keys = 1; + int context_keys_size() const; + private: + int _internal_context_keys_size() const; + public: + void clear_context_keys(); + const std::string& context_keys(int index) const; + std::string* mutable_context_keys(int index); + void set_context_keys(int index, const std::string& value); + void set_context_keys(int index, std::string&& value); + void set_context_keys(int index, const char* value); + void set_context_keys(int index, const char* value, size_t size); + std::string* add_context_keys(); + void add_context_keys(const std::string& value); + void add_context_keys(std::string&& value); + void add_context_keys(const char* value); + void add_context_keys(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& context_keys() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_context_keys(); + private: + const std::string& _internal_context_keys(int index) const; + std::string* _internal_add_context_keys(); + public: + + // @@protoc_insertion_point(class_scope:oteldemo.AdRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField context_keys_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class AdResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.AdResponse) */ { + public: + inline AdResponse() : AdResponse(nullptr) {} + ~AdResponse() override; + explicit PROTOBUF_CONSTEXPR AdResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AdResponse(const AdResponse& from); + AdResponse(AdResponse&& from) noexcept + : AdResponse() { + *this = ::std::move(from); + } + + inline AdResponse& operator=(const AdResponse& from) { + CopyFrom(from); + return *this; + } + inline AdResponse& operator=(AdResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AdResponse& default_instance() { + return *internal_default_instance(); + } + static inline const AdResponse* internal_default_instance() { + return reinterpret_cast( + &_AdResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 30; + + friend void swap(AdResponse& a, AdResponse& b) { + a.Swap(&b); + } + inline void Swap(AdResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AdResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + AdResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const AdResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const AdResponse& from) { + AdResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AdResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.AdResponse"; + } + protected: + explicit AdResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kAdsFieldNumber = 1, + }; + // repeated .oteldemo.Ad ads = 1; + int ads_size() const; + private: + int _internal_ads_size() const; + public: + void clear_ads(); + ::oteldemo::Ad* mutable_ads(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::Ad >* + mutable_ads(); + private: + const ::oteldemo::Ad& _internal_ads(int index) const; + ::oteldemo::Ad* _internal_add_ads(); + public: + const ::oteldemo::Ad& ads(int index) const; + ::oteldemo::Ad* add_ads(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::Ad >& + ads() const; + + // @@protoc_insertion_point(class_scope:oteldemo.AdResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::Ad > ads_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class Ad final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.Ad) */ { + public: + inline Ad() : Ad(nullptr) {} + ~Ad() override; + explicit PROTOBUF_CONSTEXPR Ad(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Ad(const Ad& from); + Ad(Ad&& from) noexcept + : Ad() { + *this = ::std::move(from); + } + + inline Ad& operator=(const Ad& from) { + CopyFrom(from); + return *this; + } + inline Ad& operator=(Ad&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Ad& default_instance() { + return *internal_default_instance(); + } + static inline const Ad* internal_default_instance() { + return reinterpret_cast( + &_Ad_default_instance_); + } + static constexpr int kIndexInFileMessages = + 31; + + friend void swap(Ad& a, Ad& b) { + a.Swap(&b); + } + inline void Swap(Ad* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Ad* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Ad* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Ad& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const Ad& from) { + Ad::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Ad* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.Ad"; + } + protected: + explicit Ad(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kRedirectUrlFieldNumber = 1, + kTextFieldNumber = 2, + }; + // string redirect_url = 1; + void clear_redirect_url(); + const std::string& redirect_url() const; + template + void set_redirect_url(ArgT0&& arg0, ArgT... args); + std::string* mutable_redirect_url(); + PROTOBUF_NODISCARD std::string* release_redirect_url(); + void set_allocated_redirect_url(std::string* redirect_url); + private: + const std::string& _internal_redirect_url() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_redirect_url(const std::string& value); + std::string* _internal_mutable_redirect_url(); + public: + + // string text = 2; + void clear_text(); + const std::string& text() const; + template + void set_text(ArgT0&& arg0, ArgT... args); + std::string* mutable_text(); + PROTOBUF_NODISCARD std::string* release_text(); + void set_allocated_text(std::string* text); + private: + const std::string& _internal_text() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_text(const std::string& value); + std::string* _internal_mutable_text(); + public: + + // @@protoc_insertion_point(class_scope:oteldemo.Ad) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr redirect_url_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr text_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class Flag final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.Flag) */ { + public: + inline Flag() : Flag(nullptr) {} + ~Flag() override; + explicit PROTOBUF_CONSTEXPR Flag(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Flag(const Flag& from); + Flag(Flag&& from) noexcept + : Flag() { + *this = ::std::move(from); + } + + inline Flag& operator=(const Flag& from) { + CopyFrom(from); + return *this; + } + inline Flag& operator=(Flag&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Flag& default_instance() { + return *internal_default_instance(); + } + static inline const Flag* internal_default_instance() { + return reinterpret_cast( + &_Flag_default_instance_); + } + static constexpr int kIndexInFileMessages = + 32; + + friend void swap(Flag& a, Flag& b) { + a.Swap(&b); + } + inline void Swap(Flag* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Flag* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Flag* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Flag& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const Flag& from) { + Flag::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Flag* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.Flag"; + } + protected: + explicit Flag(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + kDescriptionFieldNumber = 2, + kEnabledFieldNumber = 3, + }; + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // string description = 2; + void clear_description(); + const std::string& description() const; + template + void set_description(ArgT0&& arg0, ArgT... args); + std::string* mutable_description(); + PROTOBUF_NODISCARD std::string* release_description(); + void set_allocated_description(std::string* description); + private: + const std::string& _internal_description() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_description(const std::string& value); + std::string* _internal_mutable_description(); + public: + + // bool enabled = 3; + void clear_enabled(); + bool enabled() const; + void set_enabled(bool value); + private: + bool _internal_enabled() const; + void _internal_set_enabled(bool value); + public: + + // @@protoc_insertion_point(class_scope:oteldemo.Flag) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr description_; + bool enabled_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class GetFlagRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.GetFlagRequest) */ { + public: + inline GetFlagRequest() : GetFlagRequest(nullptr) {} + ~GetFlagRequest() override; + explicit PROTOBUF_CONSTEXPR GetFlagRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GetFlagRequest(const GetFlagRequest& from); + GetFlagRequest(GetFlagRequest&& from) noexcept + : GetFlagRequest() { + *this = ::std::move(from); + } + + inline GetFlagRequest& operator=(const GetFlagRequest& from) { + CopyFrom(from); + return *this; + } + inline GetFlagRequest& operator=(GetFlagRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GetFlagRequest& default_instance() { + return *internal_default_instance(); + } + static inline const GetFlagRequest* internal_default_instance() { + return reinterpret_cast( + &_GetFlagRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 33; + + friend void swap(GetFlagRequest& a, GetFlagRequest& b) { + a.Swap(&b); + } + inline void Swap(GetFlagRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetFlagRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetFlagRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GetFlagRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const GetFlagRequest& from) { + GetFlagRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GetFlagRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.GetFlagRequest"; + } + protected: + explicit GetFlagRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + }; + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // @@protoc_insertion_point(class_scope:oteldemo.GetFlagRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class GetFlagResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.GetFlagResponse) */ { + public: + inline GetFlagResponse() : GetFlagResponse(nullptr) {} + ~GetFlagResponse() override; + explicit PROTOBUF_CONSTEXPR GetFlagResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GetFlagResponse(const GetFlagResponse& from); + GetFlagResponse(GetFlagResponse&& from) noexcept + : GetFlagResponse() { + *this = ::std::move(from); + } + + inline GetFlagResponse& operator=(const GetFlagResponse& from) { + CopyFrom(from); + return *this; + } + inline GetFlagResponse& operator=(GetFlagResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GetFlagResponse& default_instance() { + return *internal_default_instance(); + } + static inline const GetFlagResponse* internal_default_instance() { + return reinterpret_cast( + &_GetFlagResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 34; + + friend void swap(GetFlagResponse& a, GetFlagResponse& b) { + a.Swap(&b); + } + inline void Swap(GetFlagResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetFlagResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetFlagResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GetFlagResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const GetFlagResponse& from) { + GetFlagResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GetFlagResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.GetFlagResponse"; + } + protected: + explicit GetFlagResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kFlagFieldNumber = 1, + }; + // .oteldemo.Flag flag = 1; + bool has_flag() const; + private: + bool _internal_has_flag() const; + public: + void clear_flag(); + const ::oteldemo::Flag& flag() const; + PROTOBUF_NODISCARD ::oteldemo::Flag* release_flag(); + ::oteldemo::Flag* mutable_flag(); + void set_allocated_flag(::oteldemo::Flag* flag); + private: + const ::oteldemo::Flag& _internal_flag() const; + ::oteldemo::Flag* _internal_mutable_flag(); + public: + void unsafe_arena_set_allocated_flag( + ::oteldemo::Flag* flag); + ::oteldemo::Flag* unsafe_arena_release_flag(); + + // @@protoc_insertion_point(class_scope:oteldemo.GetFlagResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::oteldemo::Flag* flag_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class CreateFlagRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.CreateFlagRequest) */ { + public: + inline CreateFlagRequest() : CreateFlagRequest(nullptr) {} + ~CreateFlagRequest() override; + explicit PROTOBUF_CONSTEXPR CreateFlagRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CreateFlagRequest(const CreateFlagRequest& from); + CreateFlagRequest(CreateFlagRequest&& from) noexcept + : CreateFlagRequest() { + *this = ::std::move(from); + } + + inline CreateFlagRequest& operator=(const CreateFlagRequest& from) { + CopyFrom(from); + return *this; + } + inline CreateFlagRequest& operator=(CreateFlagRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CreateFlagRequest& default_instance() { + return *internal_default_instance(); + } + static inline const CreateFlagRequest* internal_default_instance() { + return reinterpret_cast( + &_CreateFlagRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 35; + + friend void swap(CreateFlagRequest& a, CreateFlagRequest& b) { + a.Swap(&b); + } + inline void Swap(CreateFlagRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CreateFlagRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CreateFlagRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CreateFlagRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CreateFlagRequest& from) { + CreateFlagRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CreateFlagRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.CreateFlagRequest"; + } + protected: + explicit CreateFlagRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + kDescriptionFieldNumber = 2, + kEnabledFieldNumber = 3, + }; + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // string description = 2; + void clear_description(); + const std::string& description() const; + template + void set_description(ArgT0&& arg0, ArgT... args); + std::string* mutable_description(); + PROTOBUF_NODISCARD std::string* release_description(); + void set_allocated_description(std::string* description); + private: + const std::string& _internal_description() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_description(const std::string& value); + std::string* _internal_mutable_description(); + public: + + // bool enabled = 3; + void clear_enabled(); + bool enabled() const; + void set_enabled(bool value); + private: + bool _internal_enabled() const; + void _internal_set_enabled(bool value); + public: + + // @@protoc_insertion_point(class_scope:oteldemo.CreateFlagRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr description_; + bool enabled_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class CreateFlagResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.CreateFlagResponse) */ { + public: + inline CreateFlagResponse() : CreateFlagResponse(nullptr) {} + ~CreateFlagResponse() override; + explicit PROTOBUF_CONSTEXPR CreateFlagResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CreateFlagResponse(const CreateFlagResponse& from); + CreateFlagResponse(CreateFlagResponse&& from) noexcept + : CreateFlagResponse() { + *this = ::std::move(from); + } + + inline CreateFlagResponse& operator=(const CreateFlagResponse& from) { + CopyFrom(from); + return *this; + } + inline CreateFlagResponse& operator=(CreateFlagResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CreateFlagResponse& default_instance() { + return *internal_default_instance(); + } + static inline const CreateFlagResponse* internal_default_instance() { + return reinterpret_cast( + &_CreateFlagResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 36; + + friend void swap(CreateFlagResponse& a, CreateFlagResponse& b) { + a.Swap(&b); + } + inline void Swap(CreateFlagResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CreateFlagResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CreateFlagResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CreateFlagResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CreateFlagResponse& from) { + CreateFlagResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CreateFlagResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.CreateFlagResponse"; + } + protected: + explicit CreateFlagResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kFlagFieldNumber = 1, + }; + // .oteldemo.Flag flag = 1; + bool has_flag() const; + private: + bool _internal_has_flag() const; + public: + void clear_flag(); + const ::oteldemo::Flag& flag() const; + PROTOBUF_NODISCARD ::oteldemo::Flag* release_flag(); + ::oteldemo::Flag* mutable_flag(); + void set_allocated_flag(::oteldemo::Flag* flag); + private: + const ::oteldemo::Flag& _internal_flag() const; + ::oteldemo::Flag* _internal_mutable_flag(); + public: + void unsafe_arena_set_allocated_flag( + ::oteldemo::Flag* flag); + ::oteldemo::Flag* unsafe_arena_release_flag(); + + // @@protoc_insertion_point(class_scope:oteldemo.CreateFlagResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::oteldemo::Flag* flag_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class UpdateFlagRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.UpdateFlagRequest) */ { + public: + inline UpdateFlagRequest() : UpdateFlagRequest(nullptr) {} + ~UpdateFlagRequest() override; + explicit PROTOBUF_CONSTEXPR UpdateFlagRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + UpdateFlagRequest(const UpdateFlagRequest& from); + UpdateFlagRequest(UpdateFlagRequest&& from) noexcept + : UpdateFlagRequest() { + *this = ::std::move(from); + } + + inline UpdateFlagRequest& operator=(const UpdateFlagRequest& from) { + CopyFrom(from); + return *this; + } + inline UpdateFlagRequest& operator=(UpdateFlagRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const UpdateFlagRequest& default_instance() { + return *internal_default_instance(); + } + static inline const UpdateFlagRequest* internal_default_instance() { + return reinterpret_cast( + &_UpdateFlagRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 37; + + friend void swap(UpdateFlagRequest& a, UpdateFlagRequest& b) { + a.Swap(&b); + } + inline void Swap(UpdateFlagRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(UpdateFlagRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + UpdateFlagRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const UpdateFlagRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const UpdateFlagRequest& from) { + UpdateFlagRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(UpdateFlagRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.UpdateFlagRequest"; + } + protected: + explicit UpdateFlagRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + kEnabledFieldNumber = 2, + }; + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // bool enabled = 2; + void clear_enabled(); + bool enabled() const; + void set_enabled(bool value); + private: + bool _internal_enabled() const; + void _internal_set_enabled(bool value); + public: + + // @@protoc_insertion_point(class_scope:oteldemo.UpdateFlagRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + bool enabled_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class UpdateFlagResponse final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:oteldemo.UpdateFlagResponse) */ { + public: + inline UpdateFlagResponse() : UpdateFlagResponse(nullptr) {} + explicit PROTOBUF_CONSTEXPR UpdateFlagResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + UpdateFlagResponse(const UpdateFlagResponse& from); + UpdateFlagResponse(UpdateFlagResponse&& from) noexcept + : UpdateFlagResponse() { + *this = ::std::move(from); + } + + inline UpdateFlagResponse& operator=(const UpdateFlagResponse& from) { + CopyFrom(from); + return *this; + } + inline UpdateFlagResponse& operator=(UpdateFlagResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const UpdateFlagResponse& default_instance() { + return *internal_default_instance(); + } + static inline const UpdateFlagResponse* internal_default_instance() { + return reinterpret_cast( + &_UpdateFlagResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 38; + + friend void swap(UpdateFlagResponse& a, UpdateFlagResponse& b) { + a.Swap(&b); + } + inline void Swap(UpdateFlagResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(UpdateFlagResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + UpdateFlagResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const UpdateFlagResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const UpdateFlagResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.UpdateFlagResponse"; + } + protected: + explicit UpdateFlagResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:oteldemo.UpdateFlagResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class ListFlagsRequest final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:oteldemo.ListFlagsRequest) */ { + public: + inline ListFlagsRequest() : ListFlagsRequest(nullptr) {} + explicit PROTOBUF_CONSTEXPR ListFlagsRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ListFlagsRequest(const ListFlagsRequest& from); + ListFlagsRequest(ListFlagsRequest&& from) noexcept + : ListFlagsRequest() { + *this = ::std::move(from); + } + + inline ListFlagsRequest& operator=(const ListFlagsRequest& from) { + CopyFrom(from); + return *this; + } + inline ListFlagsRequest& operator=(ListFlagsRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ListFlagsRequest& default_instance() { + return *internal_default_instance(); + } + static inline const ListFlagsRequest* internal_default_instance() { + return reinterpret_cast( + &_ListFlagsRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 39; + + friend void swap(ListFlagsRequest& a, ListFlagsRequest& b) { + a.Swap(&b); + } + inline void Swap(ListFlagsRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ListFlagsRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ListFlagsRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const ListFlagsRequest& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const ListFlagsRequest& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.ListFlagsRequest"; + } + protected: + explicit ListFlagsRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:oteldemo.ListFlagsRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class ListFlagsResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.ListFlagsResponse) */ { + public: + inline ListFlagsResponse() : ListFlagsResponse(nullptr) {} + ~ListFlagsResponse() override; + explicit PROTOBUF_CONSTEXPR ListFlagsResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ListFlagsResponse(const ListFlagsResponse& from); + ListFlagsResponse(ListFlagsResponse&& from) noexcept + : ListFlagsResponse() { + *this = ::std::move(from); + } + + inline ListFlagsResponse& operator=(const ListFlagsResponse& from) { + CopyFrom(from); + return *this; + } + inline ListFlagsResponse& operator=(ListFlagsResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ListFlagsResponse& default_instance() { + return *internal_default_instance(); + } + static inline const ListFlagsResponse* internal_default_instance() { + return reinterpret_cast( + &_ListFlagsResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 40; + + friend void swap(ListFlagsResponse& a, ListFlagsResponse& b) { + a.Swap(&b); + } + inline void Swap(ListFlagsResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ListFlagsResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ListFlagsResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ListFlagsResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ListFlagsResponse& from) { + ListFlagsResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ListFlagsResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.ListFlagsResponse"; + } + protected: + explicit ListFlagsResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kFlagFieldNumber = 1, + }; + // repeated .oteldemo.Flag flag = 1; + int flag_size() const; + private: + int _internal_flag_size() const; + public: + void clear_flag(); + ::oteldemo::Flag* mutable_flag(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::Flag >* + mutable_flag(); + private: + const ::oteldemo::Flag& _internal_flag(int index) const; + ::oteldemo::Flag* _internal_add_flag(); + public: + const ::oteldemo::Flag& flag(int index) const; + ::oteldemo::Flag* add_flag(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::Flag >& + flag() const; + + // @@protoc_insertion_point(class_scope:oteldemo.ListFlagsResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::Flag > flag_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class DeleteFlagRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:oteldemo.DeleteFlagRequest) */ { + public: + inline DeleteFlagRequest() : DeleteFlagRequest(nullptr) {} + ~DeleteFlagRequest() override; + explicit PROTOBUF_CONSTEXPR DeleteFlagRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DeleteFlagRequest(const DeleteFlagRequest& from); + DeleteFlagRequest(DeleteFlagRequest&& from) noexcept + : DeleteFlagRequest() { + *this = ::std::move(from); + } + + inline DeleteFlagRequest& operator=(const DeleteFlagRequest& from) { + CopyFrom(from); + return *this; + } + inline DeleteFlagRequest& operator=(DeleteFlagRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DeleteFlagRequest& default_instance() { + return *internal_default_instance(); + } + static inline const DeleteFlagRequest* internal_default_instance() { + return reinterpret_cast( + &_DeleteFlagRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 41; + + friend void swap(DeleteFlagRequest& a, DeleteFlagRequest& b) { + a.Swap(&b); + } + inline void Swap(DeleteFlagRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DeleteFlagRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DeleteFlagRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DeleteFlagRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const DeleteFlagRequest& from) { + DeleteFlagRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DeleteFlagRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.DeleteFlagRequest"; + } + protected: + explicit DeleteFlagRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + }; + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // @@protoc_insertion_point(class_scope:oteldemo.DeleteFlagRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +}; +// ------------------------------------------------------------------- + +class DeleteFlagResponse final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:oteldemo.DeleteFlagResponse) */ { + public: + inline DeleteFlagResponse() : DeleteFlagResponse(nullptr) {} + explicit PROTOBUF_CONSTEXPR DeleteFlagResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DeleteFlagResponse(const DeleteFlagResponse& from); + DeleteFlagResponse(DeleteFlagResponse&& from) noexcept + : DeleteFlagResponse() { + *this = ::std::move(from); + } + + inline DeleteFlagResponse& operator=(const DeleteFlagResponse& from) { + CopyFrom(from); + return *this; + } + inline DeleteFlagResponse& operator=(DeleteFlagResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DeleteFlagResponse& default_instance() { + return *internal_default_instance(); + } + static inline const DeleteFlagResponse* internal_default_instance() { + return reinterpret_cast( + &_DeleteFlagResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 42; + + friend void swap(DeleteFlagResponse& a, DeleteFlagResponse& b) { + a.Swap(&b); + } + inline void Swap(DeleteFlagResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DeleteFlagResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DeleteFlagResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const DeleteFlagResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const DeleteFlagResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "oteldemo.DeleteFlagResponse"; + } + protected: + explicit DeleteFlagResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:oteldemo.DeleteFlagResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + }; + friend struct ::TableStruct_demo_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// CartItem + +// string product_id = 1; +inline void CartItem::clear_product_id() { + _impl_.product_id_.ClearToEmpty(); +} +inline const std::string& CartItem::product_id() const { + // @@protoc_insertion_point(field_get:oteldemo.CartItem.product_id) + return _internal_product_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CartItem::set_product_id(ArgT0&& arg0, ArgT... args) { + + _impl_.product_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.CartItem.product_id) +} +inline std::string* CartItem::mutable_product_id() { + std::string* _s = _internal_mutable_product_id(); + // @@protoc_insertion_point(field_mutable:oteldemo.CartItem.product_id) + return _s; +} +inline const std::string& CartItem::_internal_product_id() const { + return _impl_.product_id_.Get(); +} +inline void CartItem::_internal_set_product_id(const std::string& value) { + + _impl_.product_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* CartItem::_internal_mutable_product_id() { + + return _impl_.product_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* CartItem::release_product_id() { + // @@protoc_insertion_point(field_release:oteldemo.CartItem.product_id) + return _impl_.product_id_.Release(); +} +inline void CartItem::set_allocated_product_id(std::string* product_id) { + if (product_id != nullptr) { + + } else { + + } + _impl_.product_id_.SetAllocated(product_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.product_id_.IsDefault()) { + _impl_.product_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.CartItem.product_id) +} + +// int32 quantity = 2; +inline void CartItem::clear_quantity() { + _impl_.quantity_ = 0; +} +inline int32_t CartItem::_internal_quantity() const { + return _impl_.quantity_; +} +inline int32_t CartItem::quantity() const { + // @@protoc_insertion_point(field_get:oteldemo.CartItem.quantity) + return _internal_quantity(); +} +inline void CartItem::_internal_set_quantity(int32_t value) { + + _impl_.quantity_ = value; +} +inline void CartItem::set_quantity(int32_t value) { + _internal_set_quantity(value); + // @@protoc_insertion_point(field_set:oteldemo.CartItem.quantity) +} + +// ------------------------------------------------------------------- + +// AddItemRequest + +// string user_id = 1; +inline void AddItemRequest::clear_user_id() { + _impl_.user_id_.ClearToEmpty(); +} +inline const std::string& AddItemRequest::user_id() const { + // @@protoc_insertion_point(field_get:oteldemo.AddItemRequest.user_id) + return _internal_user_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void AddItemRequest::set_user_id(ArgT0&& arg0, ArgT... args) { + + _impl_.user_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.AddItemRequest.user_id) +} +inline std::string* AddItemRequest::mutable_user_id() { + std::string* _s = _internal_mutable_user_id(); + // @@protoc_insertion_point(field_mutable:oteldemo.AddItemRequest.user_id) + return _s; +} +inline const std::string& AddItemRequest::_internal_user_id() const { + return _impl_.user_id_.Get(); +} +inline void AddItemRequest::_internal_set_user_id(const std::string& value) { + + _impl_.user_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* AddItemRequest::_internal_mutable_user_id() { + + return _impl_.user_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* AddItemRequest::release_user_id() { + // @@protoc_insertion_point(field_release:oteldemo.AddItemRequest.user_id) + return _impl_.user_id_.Release(); +} +inline void AddItemRequest::set_allocated_user_id(std::string* user_id) { + if (user_id != nullptr) { + + } else { + + } + _impl_.user_id_.SetAllocated(user_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.user_id_.IsDefault()) { + _impl_.user_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.AddItemRequest.user_id) +} + +// .oteldemo.CartItem item = 2; +inline bool AddItemRequest::_internal_has_item() const { + return this != internal_default_instance() && _impl_.item_ != nullptr; +} +inline bool AddItemRequest::has_item() const { + return _internal_has_item(); +} +inline void AddItemRequest::clear_item() { + if (GetArenaForAllocation() == nullptr && _impl_.item_ != nullptr) { + delete _impl_.item_; + } + _impl_.item_ = nullptr; +} +inline const ::oteldemo::CartItem& AddItemRequest::_internal_item() const { + const ::oteldemo::CartItem* p = _impl_.item_; + return p != nullptr ? *p : reinterpret_cast( + ::oteldemo::_CartItem_default_instance_); +} +inline const ::oteldemo::CartItem& AddItemRequest::item() const { + // @@protoc_insertion_point(field_get:oteldemo.AddItemRequest.item) + return _internal_item(); +} +inline void AddItemRequest::unsafe_arena_set_allocated_item( + ::oteldemo::CartItem* item) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.item_); + } + _impl_.item_ = item; + if (item) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:oteldemo.AddItemRequest.item) +} +inline ::oteldemo::CartItem* AddItemRequest::release_item() { + + ::oteldemo::CartItem* temp = _impl_.item_; + _impl_.item_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::oteldemo::CartItem* AddItemRequest::unsafe_arena_release_item() { + // @@protoc_insertion_point(field_release:oteldemo.AddItemRequest.item) + + ::oteldemo::CartItem* temp = _impl_.item_; + _impl_.item_ = nullptr; + return temp; +} +inline ::oteldemo::CartItem* AddItemRequest::_internal_mutable_item() { + + if (_impl_.item_ == nullptr) { + auto* p = CreateMaybeMessage<::oteldemo::CartItem>(GetArenaForAllocation()); + _impl_.item_ = p; + } + return _impl_.item_; +} +inline ::oteldemo::CartItem* AddItemRequest::mutable_item() { + ::oteldemo::CartItem* _msg = _internal_mutable_item(); + // @@protoc_insertion_point(field_mutable:oteldemo.AddItemRequest.item) + return _msg; +} +inline void AddItemRequest::set_allocated_item(::oteldemo::CartItem* item) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.item_; + } + if (item) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(item); + if (message_arena != submessage_arena) { + item = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, item, submessage_arena); + } + + } else { + + } + _impl_.item_ = item; + // @@protoc_insertion_point(field_set_allocated:oteldemo.AddItemRequest.item) +} + +// ------------------------------------------------------------------- + +// EmptyCartRequest + +// string user_id = 1; +inline void EmptyCartRequest::clear_user_id() { + _impl_.user_id_.ClearToEmpty(); +} +inline const std::string& EmptyCartRequest::user_id() const { + // @@protoc_insertion_point(field_get:oteldemo.EmptyCartRequest.user_id) + return _internal_user_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void EmptyCartRequest::set_user_id(ArgT0&& arg0, ArgT... args) { + + _impl_.user_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.EmptyCartRequest.user_id) +} +inline std::string* EmptyCartRequest::mutable_user_id() { + std::string* _s = _internal_mutable_user_id(); + // @@protoc_insertion_point(field_mutable:oteldemo.EmptyCartRequest.user_id) + return _s; +} +inline const std::string& EmptyCartRequest::_internal_user_id() const { + return _impl_.user_id_.Get(); +} +inline void EmptyCartRequest::_internal_set_user_id(const std::string& value) { + + _impl_.user_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* EmptyCartRequest::_internal_mutable_user_id() { + + return _impl_.user_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* EmptyCartRequest::release_user_id() { + // @@protoc_insertion_point(field_release:oteldemo.EmptyCartRequest.user_id) + return _impl_.user_id_.Release(); +} +inline void EmptyCartRequest::set_allocated_user_id(std::string* user_id) { + if (user_id != nullptr) { + + } else { + + } + _impl_.user_id_.SetAllocated(user_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.user_id_.IsDefault()) { + _impl_.user_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.EmptyCartRequest.user_id) +} + +// ------------------------------------------------------------------- + +// GetCartRequest + +// string user_id = 1; +inline void GetCartRequest::clear_user_id() { + _impl_.user_id_.ClearToEmpty(); +} +inline const std::string& GetCartRequest::user_id() const { + // @@protoc_insertion_point(field_get:oteldemo.GetCartRequest.user_id) + return _internal_user_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GetCartRequest::set_user_id(ArgT0&& arg0, ArgT... args) { + + _impl_.user_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.GetCartRequest.user_id) +} +inline std::string* GetCartRequest::mutable_user_id() { + std::string* _s = _internal_mutable_user_id(); + // @@protoc_insertion_point(field_mutable:oteldemo.GetCartRequest.user_id) + return _s; +} +inline const std::string& GetCartRequest::_internal_user_id() const { + return _impl_.user_id_.Get(); +} +inline void GetCartRequest::_internal_set_user_id(const std::string& value) { + + _impl_.user_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* GetCartRequest::_internal_mutable_user_id() { + + return _impl_.user_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* GetCartRequest::release_user_id() { + // @@protoc_insertion_point(field_release:oteldemo.GetCartRequest.user_id) + return _impl_.user_id_.Release(); +} +inline void GetCartRequest::set_allocated_user_id(std::string* user_id) { + if (user_id != nullptr) { + + } else { + + } + _impl_.user_id_.SetAllocated(user_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.user_id_.IsDefault()) { + _impl_.user_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.GetCartRequest.user_id) +} + +// ------------------------------------------------------------------- + +// Cart + +// string user_id = 1; +inline void Cart::clear_user_id() { + _impl_.user_id_.ClearToEmpty(); +} +inline const std::string& Cart::user_id() const { + // @@protoc_insertion_point(field_get:oteldemo.Cart.user_id) + return _internal_user_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Cart::set_user_id(ArgT0&& arg0, ArgT... args) { + + _impl_.user_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.Cart.user_id) +} +inline std::string* Cart::mutable_user_id() { + std::string* _s = _internal_mutable_user_id(); + // @@protoc_insertion_point(field_mutable:oteldemo.Cart.user_id) + return _s; +} +inline const std::string& Cart::_internal_user_id() const { + return _impl_.user_id_.Get(); +} +inline void Cart::_internal_set_user_id(const std::string& value) { + + _impl_.user_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* Cart::_internal_mutable_user_id() { + + return _impl_.user_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* Cart::release_user_id() { + // @@protoc_insertion_point(field_release:oteldemo.Cart.user_id) + return _impl_.user_id_.Release(); +} +inline void Cart::set_allocated_user_id(std::string* user_id) { + if (user_id != nullptr) { + + } else { + + } + _impl_.user_id_.SetAllocated(user_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.user_id_.IsDefault()) { + _impl_.user_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.Cart.user_id) +} + +// repeated .oteldemo.CartItem items = 2; +inline int Cart::_internal_items_size() const { + return _impl_.items_.size(); +} +inline int Cart::items_size() const { + return _internal_items_size(); +} +inline void Cart::clear_items() { + _impl_.items_.Clear(); +} +inline ::oteldemo::CartItem* Cart::mutable_items(int index) { + // @@protoc_insertion_point(field_mutable:oteldemo.Cart.items) + return _impl_.items_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::CartItem >* +Cart::mutable_items() { + // @@protoc_insertion_point(field_mutable_list:oteldemo.Cart.items) + return &_impl_.items_; +} +inline const ::oteldemo::CartItem& Cart::_internal_items(int index) const { + return _impl_.items_.Get(index); +} +inline const ::oteldemo::CartItem& Cart::items(int index) const { + // @@protoc_insertion_point(field_get:oteldemo.Cart.items) + return _internal_items(index); +} +inline ::oteldemo::CartItem* Cart::_internal_add_items() { + return _impl_.items_.Add(); +} +inline ::oteldemo::CartItem* Cart::add_items() { + ::oteldemo::CartItem* _add = _internal_add_items(); + // @@protoc_insertion_point(field_add:oteldemo.Cart.items) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::CartItem >& +Cart::items() const { + // @@protoc_insertion_point(field_list:oteldemo.Cart.items) + return _impl_.items_; +} + +// ------------------------------------------------------------------- + +// Empty + +// ------------------------------------------------------------------- + +// ListRecommendationsRequest + +// string user_id = 1; +inline void ListRecommendationsRequest::clear_user_id() { + _impl_.user_id_.ClearToEmpty(); +} +inline const std::string& ListRecommendationsRequest::user_id() const { + // @@protoc_insertion_point(field_get:oteldemo.ListRecommendationsRequest.user_id) + return _internal_user_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ListRecommendationsRequest::set_user_id(ArgT0&& arg0, ArgT... args) { + + _impl_.user_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.ListRecommendationsRequest.user_id) +} +inline std::string* ListRecommendationsRequest::mutable_user_id() { + std::string* _s = _internal_mutable_user_id(); + // @@protoc_insertion_point(field_mutable:oteldemo.ListRecommendationsRequest.user_id) + return _s; +} +inline const std::string& ListRecommendationsRequest::_internal_user_id() const { + return _impl_.user_id_.Get(); +} +inline void ListRecommendationsRequest::_internal_set_user_id(const std::string& value) { + + _impl_.user_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* ListRecommendationsRequest::_internal_mutable_user_id() { + + return _impl_.user_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* ListRecommendationsRequest::release_user_id() { + // @@protoc_insertion_point(field_release:oteldemo.ListRecommendationsRequest.user_id) + return _impl_.user_id_.Release(); +} +inline void ListRecommendationsRequest::set_allocated_user_id(std::string* user_id) { + if (user_id != nullptr) { + + } else { + + } + _impl_.user_id_.SetAllocated(user_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.user_id_.IsDefault()) { + _impl_.user_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.ListRecommendationsRequest.user_id) +} + +// repeated string product_ids = 2; +inline int ListRecommendationsRequest::_internal_product_ids_size() const { + return _impl_.product_ids_.size(); +} +inline int ListRecommendationsRequest::product_ids_size() const { + return _internal_product_ids_size(); +} +inline void ListRecommendationsRequest::clear_product_ids() { + _impl_.product_ids_.Clear(); +} +inline std::string* ListRecommendationsRequest::add_product_ids() { + std::string* _s = _internal_add_product_ids(); + // @@protoc_insertion_point(field_add_mutable:oteldemo.ListRecommendationsRequest.product_ids) + return _s; +} +inline const std::string& ListRecommendationsRequest::_internal_product_ids(int index) const { + return _impl_.product_ids_.Get(index); +} +inline const std::string& ListRecommendationsRequest::product_ids(int index) const { + // @@protoc_insertion_point(field_get:oteldemo.ListRecommendationsRequest.product_ids) + return _internal_product_ids(index); +} +inline std::string* ListRecommendationsRequest::mutable_product_ids(int index) { + // @@protoc_insertion_point(field_mutable:oteldemo.ListRecommendationsRequest.product_ids) + return _impl_.product_ids_.Mutable(index); +} +inline void ListRecommendationsRequest::set_product_ids(int index, const std::string& value) { + _impl_.product_ids_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:oteldemo.ListRecommendationsRequest.product_ids) +} +inline void ListRecommendationsRequest::set_product_ids(int index, std::string&& value) { + _impl_.product_ids_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:oteldemo.ListRecommendationsRequest.product_ids) +} +inline void ListRecommendationsRequest::set_product_ids(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.product_ids_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:oteldemo.ListRecommendationsRequest.product_ids) +} +inline void ListRecommendationsRequest::set_product_ids(int index, const char* value, size_t size) { + _impl_.product_ids_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:oteldemo.ListRecommendationsRequest.product_ids) +} +inline std::string* ListRecommendationsRequest::_internal_add_product_ids() { + return _impl_.product_ids_.Add(); +} +inline void ListRecommendationsRequest::add_product_ids(const std::string& value) { + _impl_.product_ids_.Add()->assign(value); + // @@protoc_insertion_point(field_add:oteldemo.ListRecommendationsRequest.product_ids) +} +inline void ListRecommendationsRequest::add_product_ids(std::string&& value) { + _impl_.product_ids_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:oteldemo.ListRecommendationsRequest.product_ids) +} +inline void ListRecommendationsRequest::add_product_ids(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.product_ids_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:oteldemo.ListRecommendationsRequest.product_ids) +} +inline void ListRecommendationsRequest::add_product_ids(const char* value, size_t size) { + _impl_.product_ids_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:oteldemo.ListRecommendationsRequest.product_ids) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +ListRecommendationsRequest::product_ids() const { + // @@protoc_insertion_point(field_list:oteldemo.ListRecommendationsRequest.product_ids) + return _impl_.product_ids_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +ListRecommendationsRequest::mutable_product_ids() { + // @@protoc_insertion_point(field_mutable_list:oteldemo.ListRecommendationsRequest.product_ids) + return &_impl_.product_ids_; +} + +// ------------------------------------------------------------------- + +// ListRecommendationsResponse + +// repeated string product_ids = 1; +inline int ListRecommendationsResponse::_internal_product_ids_size() const { + return _impl_.product_ids_.size(); +} +inline int ListRecommendationsResponse::product_ids_size() const { + return _internal_product_ids_size(); +} +inline void ListRecommendationsResponse::clear_product_ids() { + _impl_.product_ids_.Clear(); +} +inline std::string* ListRecommendationsResponse::add_product_ids() { + std::string* _s = _internal_add_product_ids(); + // @@protoc_insertion_point(field_add_mutable:oteldemo.ListRecommendationsResponse.product_ids) + return _s; +} +inline const std::string& ListRecommendationsResponse::_internal_product_ids(int index) const { + return _impl_.product_ids_.Get(index); +} +inline const std::string& ListRecommendationsResponse::product_ids(int index) const { + // @@protoc_insertion_point(field_get:oteldemo.ListRecommendationsResponse.product_ids) + return _internal_product_ids(index); +} +inline std::string* ListRecommendationsResponse::mutable_product_ids(int index) { + // @@protoc_insertion_point(field_mutable:oteldemo.ListRecommendationsResponse.product_ids) + return _impl_.product_ids_.Mutable(index); +} +inline void ListRecommendationsResponse::set_product_ids(int index, const std::string& value) { + _impl_.product_ids_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:oteldemo.ListRecommendationsResponse.product_ids) +} +inline void ListRecommendationsResponse::set_product_ids(int index, std::string&& value) { + _impl_.product_ids_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:oteldemo.ListRecommendationsResponse.product_ids) +} +inline void ListRecommendationsResponse::set_product_ids(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.product_ids_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:oteldemo.ListRecommendationsResponse.product_ids) +} +inline void ListRecommendationsResponse::set_product_ids(int index, const char* value, size_t size) { + _impl_.product_ids_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:oteldemo.ListRecommendationsResponse.product_ids) +} +inline std::string* ListRecommendationsResponse::_internal_add_product_ids() { + return _impl_.product_ids_.Add(); +} +inline void ListRecommendationsResponse::add_product_ids(const std::string& value) { + _impl_.product_ids_.Add()->assign(value); + // @@protoc_insertion_point(field_add:oteldemo.ListRecommendationsResponse.product_ids) +} +inline void ListRecommendationsResponse::add_product_ids(std::string&& value) { + _impl_.product_ids_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:oteldemo.ListRecommendationsResponse.product_ids) +} +inline void ListRecommendationsResponse::add_product_ids(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.product_ids_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:oteldemo.ListRecommendationsResponse.product_ids) +} +inline void ListRecommendationsResponse::add_product_ids(const char* value, size_t size) { + _impl_.product_ids_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:oteldemo.ListRecommendationsResponse.product_ids) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +ListRecommendationsResponse::product_ids() const { + // @@protoc_insertion_point(field_list:oteldemo.ListRecommendationsResponse.product_ids) + return _impl_.product_ids_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +ListRecommendationsResponse::mutable_product_ids() { + // @@protoc_insertion_point(field_mutable_list:oteldemo.ListRecommendationsResponse.product_ids) + return &_impl_.product_ids_; +} + +// ------------------------------------------------------------------- + +// Product + +// string id = 1; +inline void Product::clear_id() { + _impl_.id_.ClearToEmpty(); +} +inline const std::string& Product::id() const { + // @@protoc_insertion_point(field_get:oteldemo.Product.id) + return _internal_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Product::set_id(ArgT0&& arg0, ArgT... args) { + + _impl_.id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.Product.id) +} +inline std::string* Product::mutable_id() { + std::string* _s = _internal_mutable_id(); + // @@protoc_insertion_point(field_mutable:oteldemo.Product.id) + return _s; +} +inline const std::string& Product::_internal_id() const { + return _impl_.id_.Get(); +} +inline void Product::_internal_set_id(const std::string& value) { + + _impl_.id_.Set(value, GetArenaForAllocation()); +} +inline std::string* Product::_internal_mutable_id() { + + return _impl_.id_.Mutable(GetArenaForAllocation()); +} +inline std::string* Product::release_id() { + // @@protoc_insertion_point(field_release:oteldemo.Product.id) + return _impl_.id_.Release(); +} +inline void Product::set_allocated_id(std::string* id) { + if (id != nullptr) { + + } else { + + } + _impl_.id_.SetAllocated(id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.id_.IsDefault()) { + _impl_.id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.Product.id) +} + +// string name = 2; +inline void Product::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& Product::name() const { + // @@protoc_insertion_point(field_get:oteldemo.Product.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Product::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.Product.name) +} +inline std::string* Product::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:oteldemo.Product.name) + return _s; +} +inline const std::string& Product::_internal_name() const { + return _impl_.name_.Get(); +} +inline void Product::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* Product::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* Product::release_name() { + // @@protoc_insertion_point(field_release:oteldemo.Product.name) + return _impl_.name_.Release(); +} +inline void Product::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.Product.name) +} + +// string description = 3; +inline void Product::clear_description() { + _impl_.description_.ClearToEmpty(); +} +inline const std::string& Product::description() const { + // @@protoc_insertion_point(field_get:oteldemo.Product.description) + return _internal_description(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Product::set_description(ArgT0&& arg0, ArgT... args) { + + _impl_.description_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.Product.description) +} +inline std::string* Product::mutable_description() { + std::string* _s = _internal_mutable_description(); + // @@protoc_insertion_point(field_mutable:oteldemo.Product.description) + return _s; +} +inline const std::string& Product::_internal_description() const { + return _impl_.description_.Get(); +} +inline void Product::_internal_set_description(const std::string& value) { + + _impl_.description_.Set(value, GetArenaForAllocation()); +} +inline std::string* Product::_internal_mutable_description() { + + return _impl_.description_.Mutable(GetArenaForAllocation()); +} +inline std::string* Product::release_description() { + // @@protoc_insertion_point(field_release:oteldemo.Product.description) + return _impl_.description_.Release(); +} +inline void Product::set_allocated_description(std::string* description) { + if (description != nullptr) { + + } else { + + } + _impl_.description_.SetAllocated(description, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.description_.IsDefault()) { + _impl_.description_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.Product.description) +} + +// string picture = 4; +inline void Product::clear_picture() { + _impl_.picture_.ClearToEmpty(); +} +inline const std::string& Product::picture() const { + // @@protoc_insertion_point(field_get:oteldemo.Product.picture) + return _internal_picture(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Product::set_picture(ArgT0&& arg0, ArgT... args) { + + _impl_.picture_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.Product.picture) +} +inline std::string* Product::mutable_picture() { + std::string* _s = _internal_mutable_picture(); + // @@protoc_insertion_point(field_mutable:oteldemo.Product.picture) + return _s; +} +inline const std::string& Product::_internal_picture() const { + return _impl_.picture_.Get(); +} +inline void Product::_internal_set_picture(const std::string& value) { + + _impl_.picture_.Set(value, GetArenaForAllocation()); +} +inline std::string* Product::_internal_mutable_picture() { + + return _impl_.picture_.Mutable(GetArenaForAllocation()); +} +inline std::string* Product::release_picture() { + // @@protoc_insertion_point(field_release:oteldemo.Product.picture) + return _impl_.picture_.Release(); +} +inline void Product::set_allocated_picture(std::string* picture) { + if (picture != nullptr) { + + } else { + + } + _impl_.picture_.SetAllocated(picture, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.picture_.IsDefault()) { + _impl_.picture_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.Product.picture) +} + +// .oteldemo.Money price_usd = 5; +inline bool Product::_internal_has_price_usd() const { + return this != internal_default_instance() && _impl_.price_usd_ != nullptr; +} +inline bool Product::has_price_usd() const { + return _internal_has_price_usd(); +} +inline void Product::clear_price_usd() { + if (GetArenaForAllocation() == nullptr && _impl_.price_usd_ != nullptr) { + delete _impl_.price_usd_; + } + _impl_.price_usd_ = nullptr; +} +inline const ::oteldemo::Money& Product::_internal_price_usd() const { + const ::oteldemo::Money* p = _impl_.price_usd_; + return p != nullptr ? *p : reinterpret_cast( + ::oteldemo::_Money_default_instance_); +} +inline const ::oteldemo::Money& Product::price_usd() const { + // @@protoc_insertion_point(field_get:oteldemo.Product.price_usd) + return _internal_price_usd(); +} +inline void Product::unsafe_arena_set_allocated_price_usd( + ::oteldemo::Money* price_usd) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.price_usd_); + } + _impl_.price_usd_ = price_usd; + if (price_usd) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:oteldemo.Product.price_usd) +} +inline ::oteldemo::Money* Product::release_price_usd() { + + ::oteldemo::Money* temp = _impl_.price_usd_; + _impl_.price_usd_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::oteldemo::Money* Product::unsafe_arena_release_price_usd() { + // @@protoc_insertion_point(field_release:oteldemo.Product.price_usd) + + ::oteldemo::Money* temp = _impl_.price_usd_; + _impl_.price_usd_ = nullptr; + return temp; +} +inline ::oteldemo::Money* Product::_internal_mutable_price_usd() { + + if (_impl_.price_usd_ == nullptr) { + auto* p = CreateMaybeMessage<::oteldemo::Money>(GetArenaForAllocation()); + _impl_.price_usd_ = p; + } + return _impl_.price_usd_; +} +inline ::oteldemo::Money* Product::mutable_price_usd() { + ::oteldemo::Money* _msg = _internal_mutable_price_usd(); + // @@protoc_insertion_point(field_mutable:oteldemo.Product.price_usd) + return _msg; +} +inline void Product::set_allocated_price_usd(::oteldemo::Money* price_usd) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.price_usd_; + } + if (price_usd) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(price_usd); + if (message_arena != submessage_arena) { + price_usd = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, price_usd, submessage_arena); + } + + } else { + + } + _impl_.price_usd_ = price_usd; + // @@protoc_insertion_point(field_set_allocated:oteldemo.Product.price_usd) +} + +// repeated string categories = 6; +inline int Product::_internal_categories_size() const { + return _impl_.categories_.size(); +} +inline int Product::categories_size() const { + return _internal_categories_size(); +} +inline void Product::clear_categories() { + _impl_.categories_.Clear(); +} +inline std::string* Product::add_categories() { + std::string* _s = _internal_add_categories(); + // @@protoc_insertion_point(field_add_mutable:oteldemo.Product.categories) + return _s; +} +inline const std::string& Product::_internal_categories(int index) const { + return _impl_.categories_.Get(index); +} +inline const std::string& Product::categories(int index) const { + // @@protoc_insertion_point(field_get:oteldemo.Product.categories) + return _internal_categories(index); +} +inline std::string* Product::mutable_categories(int index) { + // @@protoc_insertion_point(field_mutable:oteldemo.Product.categories) + return _impl_.categories_.Mutable(index); +} +inline void Product::set_categories(int index, const std::string& value) { + _impl_.categories_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:oteldemo.Product.categories) +} +inline void Product::set_categories(int index, std::string&& value) { + _impl_.categories_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:oteldemo.Product.categories) +} +inline void Product::set_categories(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.categories_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:oteldemo.Product.categories) +} +inline void Product::set_categories(int index, const char* value, size_t size) { + _impl_.categories_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:oteldemo.Product.categories) +} +inline std::string* Product::_internal_add_categories() { + return _impl_.categories_.Add(); +} +inline void Product::add_categories(const std::string& value) { + _impl_.categories_.Add()->assign(value); + // @@protoc_insertion_point(field_add:oteldemo.Product.categories) +} +inline void Product::add_categories(std::string&& value) { + _impl_.categories_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:oteldemo.Product.categories) +} +inline void Product::add_categories(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.categories_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:oteldemo.Product.categories) +} +inline void Product::add_categories(const char* value, size_t size) { + _impl_.categories_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:oteldemo.Product.categories) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +Product::categories() const { + // @@protoc_insertion_point(field_list:oteldemo.Product.categories) + return _impl_.categories_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +Product::mutable_categories() { + // @@protoc_insertion_point(field_mutable_list:oteldemo.Product.categories) + return &_impl_.categories_; +} + +// ------------------------------------------------------------------- + +// ListProductsResponse + +// repeated .oteldemo.Product products = 1; +inline int ListProductsResponse::_internal_products_size() const { + return _impl_.products_.size(); +} +inline int ListProductsResponse::products_size() const { + return _internal_products_size(); +} +inline void ListProductsResponse::clear_products() { + _impl_.products_.Clear(); +} +inline ::oteldemo::Product* ListProductsResponse::mutable_products(int index) { + // @@protoc_insertion_point(field_mutable:oteldemo.ListProductsResponse.products) + return _impl_.products_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::Product >* +ListProductsResponse::mutable_products() { + // @@protoc_insertion_point(field_mutable_list:oteldemo.ListProductsResponse.products) + return &_impl_.products_; +} +inline const ::oteldemo::Product& ListProductsResponse::_internal_products(int index) const { + return _impl_.products_.Get(index); +} +inline const ::oteldemo::Product& ListProductsResponse::products(int index) const { + // @@protoc_insertion_point(field_get:oteldemo.ListProductsResponse.products) + return _internal_products(index); +} +inline ::oteldemo::Product* ListProductsResponse::_internal_add_products() { + return _impl_.products_.Add(); +} +inline ::oteldemo::Product* ListProductsResponse::add_products() { + ::oteldemo::Product* _add = _internal_add_products(); + // @@protoc_insertion_point(field_add:oteldemo.ListProductsResponse.products) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::Product >& +ListProductsResponse::products() const { + // @@protoc_insertion_point(field_list:oteldemo.ListProductsResponse.products) + return _impl_.products_; +} + +// ------------------------------------------------------------------- + +// GetProductRequest + +// string id = 1; +inline void GetProductRequest::clear_id() { + _impl_.id_.ClearToEmpty(); +} +inline const std::string& GetProductRequest::id() const { + // @@protoc_insertion_point(field_get:oteldemo.GetProductRequest.id) + return _internal_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GetProductRequest::set_id(ArgT0&& arg0, ArgT... args) { + + _impl_.id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.GetProductRequest.id) +} +inline std::string* GetProductRequest::mutable_id() { + std::string* _s = _internal_mutable_id(); + // @@protoc_insertion_point(field_mutable:oteldemo.GetProductRequest.id) + return _s; +} +inline const std::string& GetProductRequest::_internal_id() const { + return _impl_.id_.Get(); +} +inline void GetProductRequest::_internal_set_id(const std::string& value) { + + _impl_.id_.Set(value, GetArenaForAllocation()); +} +inline std::string* GetProductRequest::_internal_mutable_id() { + + return _impl_.id_.Mutable(GetArenaForAllocation()); +} +inline std::string* GetProductRequest::release_id() { + // @@protoc_insertion_point(field_release:oteldemo.GetProductRequest.id) + return _impl_.id_.Release(); +} +inline void GetProductRequest::set_allocated_id(std::string* id) { + if (id != nullptr) { + + } else { + + } + _impl_.id_.SetAllocated(id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.id_.IsDefault()) { + _impl_.id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.GetProductRequest.id) +} + +// ------------------------------------------------------------------- + +// SearchProductsRequest + +// string query = 1; +inline void SearchProductsRequest::clear_query() { + _impl_.query_.ClearToEmpty(); +} +inline const std::string& SearchProductsRequest::query() const { + // @@protoc_insertion_point(field_get:oteldemo.SearchProductsRequest.query) + return _internal_query(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SearchProductsRequest::set_query(ArgT0&& arg0, ArgT... args) { + + _impl_.query_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.SearchProductsRequest.query) +} +inline std::string* SearchProductsRequest::mutable_query() { + std::string* _s = _internal_mutable_query(); + // @@protoc_insertion_point(field_mutable:oteldemo.SearchProductsRequest.query) + return _s; +} +inline const std::string& SearchProductsRequest::_internal_query() const { + return _impl_.query_.Get(); +} +inline void SearchProductsRequest::_internal_set_query(const std::string& value) { + + _impl_.query_.Set(value, GetArenaForAllocation()); +} +inline std::string* SearchProductsRequest::_internal_mutable_query() { + + return _impl_.query_.Mutable(GetArenaForAllocation()); +} +inline std::string* SearchProductsRequest::release_query() { + // @@protoc_insertion_point(field_release:oteldemo.SearchProductsRequest.query) + return _impl_.query_.Release(); +} +inline void SearchProductsRequest::set_allocated_query(std::string* query) { + if (query != nullptr) { + + } else { + + } + _impl_.query_.SetAllocated(query, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.query_.IsDefault()) { + _impl_.query_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.SearchProductsRequest.query) +} + +// ------------------------------------------------------------------- + +// SearchProductsResponse + +// repeated .oteldemo.Product results = 1; +inline int SearchProductsResponse::_internal_results_size() const { + return _impl_.results_.size(); +} +inline int SearchProductsResponse::results_size() const { + return _internal_results_size(); +} +inline void SearchProductsResponse::clear_results() { + _impl_.results_.Clear(); +} +inline ::oteldemo::Product* SearchProductsResponse::mutable_results(int index) { + // @@protoc_insertion_point(field_mutable:oteldemo.SearchProductsResponse.results) + return _impl_.results_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::Product >* +SearchProductsResponse::mutable_results() { + // @@protoc_insertion_point(field_mutable_list:oteldemo.SearchProductsResponse.results) + return &_impl_.results_; +} +inline const ::oteldemo::Product& SearchProductsResponse::_internal_results(int index) const { + return _impl_.results_.Get(index); +} +inline const ::oteldemo::Product& SearchProductsResponse::results(int index) const { + // @@protoc_insertion_point(field_get:oteldemo.SearchProductsResponse.results) + return _internal_results(index); +} +inline ::oteldemo::Product* SearchProductsResponse::_internal_add_results() { + return _impl_.results_.Add(); +} +inline ::oteldemo::Product* SearchProductsResponse::add_results() { + ::oteldemo::Product* _add = _internal_add_results(); + // @@protoc_insertion_point(field_add:oteldemo.SearchProductsResponse.results) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::Product >& +SearchProductsResponse::results() const { + // @@protoc_insertion_point(field_list:oteldemo.SearchProductsResponse.results) + return _impl_.results_; +} + +// ------------------------------------------------------------------- + +// GetQuoteRequest + +// .oteldemo.Address address = 1; +inline bool GetQuoteRequest::_internal_has_address() const { + return this != internal_default_instance() && _impl_.address_ != nullptr; +} +inline bool GetQuoteRequest::has_address() const { + return _internal_has_address(); +} +inline void GetQuoteRequest::clear_address() { + if (GetArenaForAllocation() == nullptr && _impl_.address_ != nullptr) { + delete _impl_.address_; + } + _impl_.address_ = nullptr; +} +inline const ::oteldemo::Address& GetQuoteRequest::_internal_address() const { + const ::oteldemo::Address* p = _impl_.address_; + return p != nullptr ? *p : reinterpret_cast( + ::oteldemo::_Address_default_instance_); +} +inline const ::oteldemo::Address& GetQuoteRequest::address() const { + // @@protoc_insertion_point(field_get:oteldemo.GetQuoteRequest.address) + return _internal_address(); +} +inline void GetQuoteRequest::unsafe_arena_set_allocated_address( + ::oteldemo::Address* address) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.address_); + } + _impl_.address_ = address; + if (address) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:oteldemo.GetQuoteRequest.address) +} +inline ::oteldemo::Address* GetQuoteRequest::release_address() { + + ::oteldemo::Address* temp = _impl_.address_; + _impl_.address_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::oteldemo::Address* GetQuoteRequest::unsafe_arena_release_address() { + // @@protoc_insertion_point(field_release:oteldemo.GetQuoteRequest.address) + + ::oteldemo::Address* temp = _impl_.address_; + _impl_.address_ = nullptr; + return temp; +} +inline ::oteldemo::Address* GetQuoteRequest::_internal_mutable_address() { + + if (_impl_.address_ == nullptr) { + auto* p = CreateMaybeMessage<::oteldemo::Address>(GetArenaForAllocation()); + _impl_.address_ = p; + } + return _impl_.address_; +} +inline ::oteldemo::Address* GetQuoteRequest::mutable_address() { + ::oteldemo::Address* _msg = _internal_mutable_address(); + // @@protoc_insertion_point(field_mutable:oteldemo.GetQuoteRequest.address) + return _msg; +} +inline void GetQuoteRequest::set_allocated_address(::oteldemo::Address* address) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.address_; + } + if (address) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(address); + if (message_arena != submessage_arena) { + address = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, address, submessage_arena); + } + + } else { + + } + _impl_.address_ = address; + // @@protoc_insertion_point(field_set_allocated:oteldemo.GetQuoteRequest.address) +} + +// repeated .oteldemo.CartItem items = 2; +inline int GetQuoteRequest::_internal_items_size() const { + return _impl_.items_.size(); +} +inline int GetQuoteRequest::items_size() const { + return _internal_items_size(); +} +inline void GetQuoteRequest::clear_items() { + _impl_.items_.Clear(); +} +inline ::oteldemo::CartItem* GetQuoteRequest::mutable_items(int index) { + // @@protoc_insertion_point(field_mutable:oteldemo.GetQuoteRequest.items) + return _impl_.items_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::CartItem >* +GetQuoteRequest::mutable_items() { + // @@protoc_insertion_point(field_mutable_list:oteldemo.GetQuoteRequest.items) + return &_impl_.items_; +} +inline const ::oteldemo::CartItem& GetQuoteRequest::_internal_items(int index) const { + return _impl_.items_.Get(index); +} +inline const ::oteldemo::CartItem& GetQuoteRequest::items(int index) const { + // @@protoc_insertion_point(field_get:oteldemo.GetQuoteRequest.items) + return _internal_items(index); +} +inline ::oteldemo::CartItem* GetQuoteRequest::_internal_add_items() { + return _impl_.items_.Add(); +} +inline ::oteldemo::CartItem* GetQuoteRequest::add_items() { + ::oteldemo::CartItem* _add = _internal_add_items(); + // @@protoc_insertion_point(field_add:oteldemo.GetQuoteRequest.items) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::CartItem >& +GetQuoteRequest::items() const { + // @@protoc_insertion_point(field_list:oteldemo.GetQuoteRequest.items) + return _impl_.items_; +} + +// ------------------------------------------------------------------- + +// GetQuoteResponse + +// .oteldemo.Money cost_usd = 1; +inline bool GetQuoteResponse::_internal_has_cost_usd() const { + return this != internal_default_instance() && _impl_.cost_usd_ != nullptr; +} +inline bool GetQuoteResponse::has_cost_usd() const { + return _internal_has_cost_usd(); +} +inline void GetQuoteResponse::clear_cost_usd() { + if (GetArenaForAllocation() == nullptr && _impl_.cost_usd_ != nullptr) { + delete _impl_.cost_usd_; + } + _impl_.cost_usd_ = nullptr; +} +inline const ::oteldemo::Money& GetQuoteResponse::_internal_cost_usd() const { + const ::oteldemo::Money* p = _impl_.cost_usd_; + return p != nullptr ? *p : reinterpret_cast( + ::oteldemo::_Money_default_instance_); +} +inline const ::oteldemo::Money& GetQuoteResponse::cost_usd() const { + // @@protoc_insertion_point(field_get:oteldemo.GetQuoteResponse.cost_usd) + return _internal_cost_usd(); +} +inline void GetQuoteResponse::unsafe_arena_set_allocated_cost_usd( + ::oteldemo::Money* cost_usd) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.cost_usd_); + } + _impl_.cost_usd_ = cost_usd; + if (cost_usd) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:oteldemo.GetQuoteResponse.cost_usd) +} +inline ::oteldemo::Money* GetQuoteResponse::release_cost_usd() { + + ::oteldemo::Money* temp = _impl_.cost_usd_; + _impl_.cost_usd_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::oteldemo::Money* GetQuoteResponse::unsafe_arena_release_cost_usd() { + // @@protoc_insertion_point(field_release:oteldemo.GetQuoteResponse.cost_usd) + + ::oteldemo::Money* temp = _impl_.cost_usd_; + _impl_.cost_usd_ = nullptr; + return temp; +} +inline ::oteldemo::Money* GetQuoteResponse::_internal_mutable_cost_usd() { + + if (_impl_.cost_usd_ == nullptr) { + auto* p = CreateMaybeMessage<::oteldemo::Money>(GetArenaForAllocation()); + _impl_.cost_usd_ = p; + } + return _impl_.cost_usd_; +} +inline ::oteldemo::Money* GetQuoteResponse::mutable_cost_usd() { + ::oteldemo::Money* _msg = _internal_mutable_cost_usd(); + // @@protoc_insertion_point(field_mutable:oteldemo.GetQuoteResponse.cost_usd) + return _msg; +} +inline void GetQuoteResponse::set_allocated_cost_usd(::oteldemo::Money* cost_usd) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.cost_usd_; + } + if (cost_usd) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(cost_usd); + if (message_arena != submessage_arena) { + cost_usd = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, cost_usd, submessage_arena); + } + + } else { + + } + _impl_.cost_usd_ = cost_usd; + // @@protoc_insertion_point(field_set_allocated:oteldemo.GetQuoteResponse.cost_usd) +} + +// ------------------------------------------------------------------- + +// ShipOrderRequest + +// .oteldemo.Address address = 1; +inline bool ShipOrderRequest::_internal_has_address() const { + return this != internal_default_instance() && _impl_.address_ != nullptr; +} +inline bool ShipOrderRequest::has_address() const { + return _internal_has_address(); +} +inline void ShipOrderRequest::clear_address() { + if (GetArenaForAllocation() == nullptr && _impl_.address_ != nullptr) { + delete _impl_.address_; + } + _impl_.address_ = nullptr; +} +inline const ::oteldemo::Address& ShipOrderRequest::_internal_address() const { + const ::oteldemo::Address* p = _impl_.address_; + return p != nullptr ? *p : reinterpret_cast( + ::oteldemo::_Address_default_instance_); +} +inline const ::oteldemo::Address& ShipOrderRequest::address() const { + // @@protoc_insertion_point(field_get:oteldemo.ShipOrderRequest.address) + return _internal_address(); +} +inline void ShipOrderRequest::unsafe_arena_set_allocated_address( + ::oteldemo::Address* address) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.address_); + } + _impl_.address_ = address; + if (address) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:oteldemo.ShipOrderRequest.address) +} +inline ::oteldemo::Address* ShipOrderRequest::release_address() { + + ::oteldemo::Address* temp = _impl_.address_; + _impl_.address_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::oteldemo::Address* ShipOrderRequest::unsafe_arena_release_address() { + // @@protoc_insertion_point(field_release:oteldemo.ShipOrderRequest.address) + + ::oteldemo::Address* temp = _impl_.address_; + _impl_.address_ = nullptr; + return temp; +} +inline ::oteldemo::Address* ShipOrderRequest::_internal_mutable_address() { + + if (_impl_.address_ == nullptr) { + auto* p = CreateMaybeMessage<::oteldemo::Address>(GetArenaForAllocation()); + _impl_.address_ = p; + } + return _impl_.address_; +} +inline ::oteldemo::Address* ShipOrderRequest::mutable_address() { + ::oteldemo::Address* _msg = _internal_mutable_address(); + // @@protoc_insertion_point(field_mutable:oteldemo.ShipOrderRequest.address) + return _msg; +} +inline void ShipOrderRequest::set_allocated_address(::oteldemo::Address* address) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.address_; + } + if (address) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(address); + if (message_arena != submessage_arena) { + address = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, address, submessage_arena); + } + + } else { + + } + _impl_.address_ = address; + // @@protoc_insertion_point(field_set_allocated:oteldemo.ShipOrderRequest.address) +} + +// repeated .oteldemo.CartItem items = 2; +inline int ShipOrderRequest::_internal_items_size() const { + return _impl_.items_.size(); +} +inline int ShipOrderRequest::items_size() const { + return _internal_items_size(); +} +inline void ShipOrderRequest::clear_items() { + _impl_.items_.Clear(); +} +inline ::oteldemo::CartItem* ShipOrderRequest::mutable_items(int index) { + // @@protoc_insertion_point(field_mutable:oteldemo.ShipOrderRequest.items) + return _impl_.items_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::CartItem >* +ShipOrderRequest::mutable_items() { + // @@protoc_insertion_point(field_mutable_list:oteldemo.ShipOrderRequest.items) + return &_impl_.items_; +} +inline const ::oteldemo::CartItem& ShipOrderRequest::_internal_items(int index) const { + return _impl_.items_.Get(index); +} +inline const ::oteldemo::CartItem& ShipOrderRequest::items(int index) const { + // @@protoc_insertion_point(field_get:oteldemo.ShipOrderRequest.items) + return _internal_items(index); +} +inline ::oteldemo::CartItem* ShipOrderRequest::_internal_add_items() { + return _impl_.items_.Add(); +} +inline ::oteldemo::CartItem* ShipOrderRequest::add_items() { + ::oteldemo::CartItem* _add = _internal_add_items(); + // @@protoc_insertion_point(field_add:oteldemo.ShipOrderRequest.items) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::CartItem >& +ShipOrderRequest::items() const { + // @@protoc_insertion_point(field_list:oteldemo.ShipOrderRequest.items) + return _impl_.items_; +} + +// ------------------------------------------------------------------- + +// ShipOrderResponse + +// string tracking_id = 1; +inline void ShipOrderResponse::clear_tracking_id() { + _impl_.tracking_id_.ClearToEmpty(); +} +inline const std::string& ShipOrderResponse::tracking_id() const { + // @@protoc_insertion_point(field_get:oteldemo.ShipOrderResponse.tracking_id) + return _internal_tracking_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ShipOrderResponse::set_tracking_id(ArgT0&& arg0, ArgT... args) { + + _impl_.tracking_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.ShipOrderResponse.tracking_id) +} +inline std::string* ShipOrderResponse::mutable_tracking_id() { + std::string* _s = _internal_mutable_tracking_id(); + // @@protoc_insertion_point(field_mutable:oteldemo.ShipOrderResponse.tracking_id) + return _s; +} +inline const std::string& ShipOrderResponse::_internal_tracking_id() const { + return _impl_.tracking_id_.Get(); +} +inline void ShipOrderResponse::_internal_set_tracking_id(const std::string& value) { + + _impl_.tracking_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* ShipOrderResponse::_internal_mutable_tracking_id() { + + return _impl_.tracking_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* ShipOrderResponse::release_tracking_id() { + // @@protoc_insertion_point(field_release:oteldemo.ShipOrderResponse.tracking_id) + return _impl_.tracking_id_.Release(); +} +inline void ShipOrderResponse::set_allocated_tracking_id(std::string* tracking_id) { + if (tracking_id != nullptr) { + + } else { + + } + _impl_.tracking_id_.SetAllocated(tracking_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.tracking_id_.IsDefault()) { + _impl_.tracking_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.ShipOrderResponse.tracking_id) +} + +// ------------------------------------------------------------------- + +// Address + +// string street_address = 1; +inline void Address::clear_street_address() { + _impl_.street_address_.ClearToEmpty(); +} +inline const std::string& Address::street_address() const { + // @@protoc_insertion_point(field_get:oteldemo.Address.street_address) + return _internal_street_address(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Address::set_street_address(ArgT0&& arg0, ArgT... args) { + + _impl_.street_address_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.Address.street_address) +} +inline std::string* Address::mutable_street_address() { + std::string* _s = _internal_mutable_street_address(); + // @@protoc_insertion_point(field_mutable:oteldemo.Address.street_address) + return _s; +} +inline const std::string& Address::_internal_street_address() const { + return _impl_.street_address_.Get(); +} +inline void Address::_internal_set_street_address(const std::string& value) { + + _impl_.street_address_.Set(value, GetArenaForAllocation()); +} +inline std::string* Address::_internal_mutable_street_address() { + + return _impl_.street_address_.Mutable(GetArenaForAllocation()); +} +inline std::string* Address::release_street_address() { + // @@protoc_insertion_point(field_release:oteldemo.Address.street_address) + return _impl_.street_address_.Release(); +} +inline void Address::set_allocated_street_address(std::string* street_address) { + if (street_address != nullptr) { + + } else { + + } + _impl_.street_address_.SetAllocated(street_address, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.street_address_.IsDefault()) { + _impl_.street_address_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.Address.street_address) +} + +// string city = 2; +inline void Address::clear_city() { + _impl_.city_.ClearToEmpty(); +} +inline const std::string& Address::city() const { + // @@protoc_insertion_point(field_get:oteldemo.Address.city) + return _internal_city(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Address::set_city(ArgT0&& arg0, ArgT... args) { + + _impl_.city_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.Address.city) +} +inline std::string* Address::mutable_city() { + std::string* _s = _internal_mutable_city(); + // @@protoc_insertion_point(field_mutable:oteldemo.Address.city) + return _s; +} +inline const std::string& Address::_internal_city() const { + return _impl_.city_.Get(); +} +inline void Address::_internal_set_city(const std::string& value) { + + _impl_.city_.Set(value, GetArenaForAllocation()); +} +inline std::string* Address::_internal_mutable_city() { + + return _impl_.city_.Mutable(GetArenaForAllocation()); +} +inline std::string* Address::release_city() { + // @@protoc_insertion_point(field_release:oteldemo.Address.city) + return _impl_.city_.Release(); +} +inline void Address::set_allocated_city(std::string* city) { + if (city != nullptr) { + + } else { + + } + _impl_.city_.SetAllocated(city, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.city_.IsDefault()) { + _impl_.city_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.Address.city) +} + +// string state = 3; +inline void Address::clear_state() { + _impl_.state_.ClearToEmpty(); +} +inline const std::string& Address::state() const { + // @@protoc_insertion_point(field_get:oteldemo.Address.state) + return _internal_state(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Address::set_state(ArgT0&& arg0, ArgT... args) { + + _impl_.state_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.Address.state) +} +inline std::string* Address::mutable_state() { + std::string* _s = _internal_mutable_state(); + // @@protoc_insertion_point(field_mutable:oteldemo.Address.state) + return _s; +} +inline const std::string& Address::_internal_state() const { + return _impl_.state_.Get(); +} +inline void Address::_internal_set_state(const std::string& value) { + + _impl_.state_.Set(value, GetArenaForAllocation()); +} +inline std::string* Address::_internal_mutable_state() { + + return _impl_.state_.Mutable(GetArenaForAllocation()); +} +inline std::string* Address::release_state() { + // @@protoc_insertion_point(field_release:oteldemo.Address.state) + return _impl_.state_.Release(); +} +inline void Address::set_allocated_state(std::string* state) { + if (state != nullptr) { + + } else { + + } + _impl_.state_.SetAllocated(state, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.state_.IsDefault()) { + _impl_.state_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.Address.state) +} + +// string country = 4; +inline void Address::clear_country() { + _impl_.country_.ClearToEmpty(); +} +inline const std::string& Address::country() const { + // @@protoc_insertion_point(field_get:oteldemo.Address.country) + return _internal_country(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Address::set_country(ArgT0&& arg0, ArgT... args) { + + _impl_.country_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.Address.country) +} +inline std::string* Address::mutable_country() { + std::string* _s = _internal_mutable_country(); + // @@protoc_insertion_point(field_mutable:oteldemo.Address.country) + return _s; +} +inline const std::string& Address::_internal_country() const { + return _impl_.country_.Get(); +} +inline void Address::_internal_set_country(const std::string& value) { + + _impl_.country_.Set(value, GetArenaForAllocation()); +} +inline std::string* Address::_internal_mutable_country() { + + return _impl_.country_.Mutable(GetArenaForAllocation()); +} +inline std::string* Address::release_country() { + // @@protoc_insertion_point(field_release:oteldemo.Address.country) + return _impl_.country_.Release(); +} +inline void Address::set_allocated_country(std::string* country) { + if (country != nullptr) { + + } else { + + } + _impl_.country_.SetAllocated(country, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.country_.IsDefault()) { + _impl_.country_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.Address.country) +} + +// string zip_code = 5; +inline void Address::clear_zip_code() { + _impl_.zip_code_.ClearToEmpty(); +} +inline const std::string& Address::zip_code() const { + // @@protoc_insertion_point(field_get:oteldemo.Address.zip_code) + return _internal_zip_code(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Address::set_zip_code(ArgT0&& arg0, ArgT... args) { + + _impl_.zip_code_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.Address.zip_code) +} +inline std::string* Address::mutable_zip_code() { + std::string* _s = _internal_mutable_zip_code(); + // @@protoc_insertion_point(field_mutable:oteldemo.Address.zip_code) + return _s; +} +inline const std::string& Address::_internal_zip_code() const { + return _impl_.zip_code_.Get(); +} +inline void Address::_internal_set_zip_code(const std::string& value) { + + _impl_.zip_code_.Set(value, GetArenaForAllocation()); +} +inline std::string* Address::_internal_mutable_zip_code() { + + return _impl_.zip_code_.Mutable(GetArenaForAllocation()); +} +inline std::string* Address::release_zip_code() { + // @@protoc_insertion_point(field_release:oteldemo.Address.zip_code) + return _impl_.zip_code_.Release(); +} +inline void Address::set_allocated_zip_code(std::string* zip_code) { + if (zip_code != nullptr) { + + } else { + + } + _impl_.zip_code_.SetAllocated(zip_code, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.zip_code_.IsDefault()) { + _impl_.zip_code_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.Address.zip_code) +} + +// ------------------------------------------------------------------- + +// Money + +// string currency_code = 1; +inline void Money::clear_currency_code() { + _impl_.currency_code_.ClearToEmpty(); +} +inline const std::string& Money::currency_code() const { + // @@protoc_insertion_point(field_get:oteldemo.Money.currency_code) + return _internal_currency_code(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Money::set_currency_code(ArgT0&& arg0, ArgT... args) { + + _impl_.currency_code_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.Money.currency_code) +} +inline std::string* Money::mutable_currency_code() { + std::string* _s = _internal_mutable_currency_code(); + // @@protoc_insertion_point(field_mutable:oteldemo.Money.currency_code) + return _s; +} +inline const std::string& Money::_internal_currency_code() const { + return _impl_.currency_code_.Get(); +} +inline void Money::_internal_set_currency_code(const std::string& value) { + + _impl_.currency_code_.Set(value, GetArenaForAllocation()); +} +inline std::string* Money::_internal_mutable_currency_code() { + + return _impl_.currency_code_.Mutable(GetArenaForAllocation()); +} +inline std::string* Money::release_currency_code() { + // @@protoc_insertion_point(field_release:oteldemo.Money.currency_code) + return _impl_.currency_code_.Release(); +} +inline void Money::set_allocated_currency_code(std::string* currency_code) { + if (currency_code != nullptr) { + + } else { + + } + _impl_.currency_code_.SetAllocated(currency_code, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.currency_code_.IsDefault()) { + _impl_.currency_code_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.Money.currency_code) +} + +// int64 units = 2; +inline void Money::clear_units() { + _impl_.units_ = int64_t{0}; +} +inline int64_t Money::_internal_units() const { + return _impl_.units_; +} +inline int64_t Money::units() const { + // @@protoc_insertion_point(field_get:oteldemo.Money.units) + return _internal_units(); +} +inline void Money::_internal_set_units(int64_t value) { + + _impl_.units_ = value; +} +inline void Money::set_units(int64_t value) { + _internal_set_units(value); + // @@protoc_insertion_point(field_set:oteldemo.Money.units) +} + +// int32 nanos = 3; +inline void Money::clear_nanos() { + _impl_.nanos_ = 0; +} +inline int32_t Money::_internal_nanos() const { + return _impl_.nanos_; +} +inline int32_t Money::nanos() const { + // @@protoc_insertion_point(field_get:oteldemo.Money.nanos) + return _internal_nanos(); +} +inline void Money::_internal_set_nanos(int32_t value) { + + _impl_.nanos_ = value; +} +inline void Money::set_nanos(int32_t value) { + _internal_set_nanos(value); + // @@protoc_insertion_point(field_set:oteldemo.Money.nanos) +} + +// ------------------------------------------------------------------- + +// GetSupportedCurrenciesResponse + +// repeated string currency_codes = 1; +inline int GetSupportedCurrenciesResponse::_internal_currency_codes_size() const { + return _impl_.currency_codes_.size(); +} +inline int GetSupportedCurrenciesResponse::currency_codes_size() const { + return _internal_currency_codes_size(); +} +inline void GetSupportedCurrenciesResponse::clear_currency_codes() { + _impl_.currency_codes_.Clear(); +} +inline std::string* GetSupportedCurrenciesResponse::add_currency_codes() { + std::string* _s = _internal_add_currency_codes(); + // @@protoc_insertion_point(field_add_mutable:oteldemo.GetSupportedCurrenciesResponse.currency_codes) + return _s; +} +inline const std::string& GetSupportedCurrenciesResponse::_internal_currency_codes(int index) const { + return _impl_.currency_codes_.Get(index); +} +inline const std::string& GetSupportedCurrenciesResponse::currency_codes(int index) const { + // @@protoc_insertion_point(field_get:oteldemo.GetSupportedCurrenciesResponse.currency_codes) + return _internal_currency_codes(index); +} +inline std::string* GetSupportedCurrenciesResponse::mutable_currency_codes(int index) { + // @@protoc_insertion_point(field_mutable:oteldemo.GetSupportedCurrenciesResponse.currency_codes) + return _impl_.currency_codes_.Mutable(index); +} +inline void GetSupportedCurrenciesResponse::set_currency_codes(int index, const std::string& value) { + _impl_.currency_codes_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:oteldemo.GetSupportedCurrenciesResponse.currency_codes) +} +inline void GetSupportedCurrenciesResponse::set_currency_codes(int index, std::string&& value) { + _impl_.currency_codes_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:oteldemo.GetSupportedCurrenciesResponse.currency_codes) +} +inline void GetSupportedCurrenciesResponse::set_currency_codes(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.currency_codes_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:oteldemo.GetSupportedCurrenciesResponse.currency_codes) +} +inline void GetSupportedCurrenciesResponse::set_currency_codes(int index, const char* value, size_t size) { + _impl_.currency_codes_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:oteldemo.GetSupportedCurrenciesResponse.currency_codes) +} +inline std::string* GetSupportedCurrenciesResponse::_internal_add_currency_codes() { + return _impl_.currency_codes_.Add(); +} +inline void GetSupportedCurrenciesResponse::add_currency_codes(const std::string& value) { + _impl_.currency_codes_.Add()->assign(value); + // @@protoc_insertion_point(field_add:oteldemo.GetSupportedCurrenciesResponse.currency_codes) +} +inline void GetSupportedCurrenciesResponse::add_currency_codes(std::string&& value) { + _impl_.currency_codes_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:oteldemo.GetSupportedCurrenciesResponse.currency_codes) +} +inline void GetSupportedCurrenciesResponse::add_currency_codes(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.currency_codes_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:oteldemo.GetSupportedCurrenciesResponse.currency_codes) +} +inline void GetSupportedCurrenciesResponse::add_currency_codes(const char* value, size_t size) { + _impl_.currency_codes_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:oteldemo.GetSupportedCurrenciesResponse.currency_codes) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +GetSupportedCurrenciesResponse::currency_codes() const { + // @@protoc_insertion_point(field_list:oteldemo.GetSupportedCurrenciesResponse.currency_codes) + return _impl_.currency_codes_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +GetSupportedCurrenciesResponse::mutable_currency_codes() { + // @@protoc_insertion_point(field_mutable_list:oteldemo.GetSupportedCurrenciesResponse.currency_codes) + return &_impl_.currency_codes_; +} + +// ------------------------------------------------------------------- + +// CurrencyConversionRequest + +// .oteldemo.Money from = 1; +inline bool CurrencyConversionRequest::_internal_has_from() const { + return this != internal_default_instance() && _impl_.from_ != nullptr; +} +inline bool CurrencyConversionRequest::has_from() const { + return _internal_has_from(); +} +inline void CurrencyConversionRequest::clear_from() { + if (GetArenaForAllocation() == nullptr && _impl_.from_ != nullptr) { + delete _impl_.from_; + } + _impl_.from_ = nullptr; +} +inline const ::oteldemo::Money& CurrencyConversionRequest::_internal_from() const { + const ::oteldemo::Money* p = _impl_.from_; + return p != nullptr ? *p : reinterpret_cast( + ::oteldemo::_Money_default_instance_); +} +inline const ::oteldemo::Money& CurrencyConversionRequest::from() const { + // @@protoc_insertion_point(field_get:oteldemo.CurrencyConversionRequest.from) + return _internal_from(); +} +inline void CurrencyConversionRequest::unsafe_arena_set_allocated_from( + ::oteldemo::Money* from) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.from_); + } + _impl_.from_ = from; + if (from) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:oteldemo.CurrencyConversionRequest.from) +} +inline ::oteldemo::Money* CurrencyConversionRequest::release_from() { + + ::oteldemo::Money* temp = _impl_.from_; + _impl_.from_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::oteldemo::Money* CurrencyConversionRequest::unsafe_arena_release_from() { + // @@protoc_insertion_point(field_release:oteldemo.CurrencyConversionRequest.from) + + ::oteldemo::Money* temp = _impl_.from_; + _impl_.from_ = nullptr; + return temp; +} +inline ::oteldemo::Money* CurrencyConversionRequest::_internal_mutable_from() { + + if (_impl_.from_ == nullptr) { + auto* p = CreateMaybeMessage<::oteldemo::Money>(GetArenaForAllocation()); + _impl_.from_ = p; + } + return _impl_.from_; +} +inline ::oteldemo::Money* CurrencyConversionRequest::mutable_from() { + ::oteldemo::Money* _msg = _internal_mutable_from(); + // @@protoc_insertion_point(field_mutable:oteldemo.CurrencyConversionRequest.from) + return _msg; +} +inline void CurrencyConversionRequest::set_allocated_from(::oteldemo::Money* from) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.from_; + } + if (from) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(from); + if (message_arena != submessage_arena) { + from = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, from, submessage_arena); + } + + } else { + + } + _impl_.from_ = from; + // @@protoc_insertion_point(field_set_allocated:oteldemo.CurrencyConversionRequest.from) +} + +// string to_code = 2; +inline void CurrencyConversionRequest::clear_to_code() { + _impl_.to_code_.ClearToEmpty(); +} +inline const std::string& CurrencyConversionRequest::to_code() const { + // @@protoc_insertion_point(field_get:oteldemo.CurrencyConversionRequest.to_code) + return _internal_to_code(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CurrencyConversionRequest::set_to_code(ArgT0&& arg0, ArgT... args) { + + _impl_.to_code_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.CurrencyConversionRequest.to_code) +} +inline std::string* CurrencyConversionRequest::mutable_to_code() { + std::string* _s = _internal_mutable_to_code(); + // @@protoc_insertion_point(field_mutable:oteldemo.CurrencyConversionRequest.to_code) + return _s; +} +inline const std::string& CurrencyConversionRequest::_internal_to_code() const { + return _impl_.to_code_.Get(); +} +inline void CurrencyConversionRequest::_internal_set_to_code(const std::string& value) { + + _impl_.to_code_.Set(value, GetArenaForAllocation()); +} +inline std::string* CurrencyConversionRequest::_internal_mutable_to_code() { + + return _impl_.to_code_.Mutable(GetArenaForAllocation()); +} +inline std::string* CurrencyConversionRequest::release_to_code() { + // @@protoc_insertion_point(field_release:oteldemo.CurrencyConversionRequest.to_code) + return _impl_.to_code_.Release(); +} +inline void CurrencyConversionRequest::set_allocated_to_code(std::string* to_code) { + if (to_code != nullptr) { + + } else { + + } + _impl_.to_code_.SetAllocated(to_code, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.to_code_.IsDefault()) { + _impl_.to_code_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.CurrencyConversionRequest.to_code) +} + +// ------------------------------------------------------------------- + +// CreditCardInfo + +// string credit_card_number = 1; +inline void CreditCardInfo::clear_credit_card_number() { + _impl_.credit_card_number_.ClearToEmpty(); +} +inline const std::string& CreditCardInfo::credit_card_number() const { + // @@protoc_insertion_point(field_get:oteldemo.CreditCardInfo.credit_card_number) + return _internal_credit_card_number(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CreditCardInfo::set_credit_card_number(ArgT0&& arg0, ArgT... args) { + + _impl_.credit_card_number_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.CreditCardInfo.credit_card_number) +} +inline std::string* CreditCardInfo::mutable_credit_card_number() { + std::string* _s = _internal_mutable_credit_card_number(); + // @@protoc_insertion_point(field_mutable:oteldemo.CreditCardInfo.credit_card_number) + return _s; +} +inline const std::string& CreditCardInfo::_internal_credit_card_number() const { + return _impl_.credit_card_number_.Get(); +} +inline void CreditCardInfo::_internal_set_credit_card_number(const std::string& value) { + + _impl_.credit_card_number_.Set(value, GetArenaForAllocation()); +} +inline std::string* CreditCardInfo::_internal_mutable_credit_card_number() { + + return _impl_.credit_card_number_.Mutable(GetArenaForAllocation()); +} +inline std::string* CreditCardInfo::release_credit_card_number() { + // @@protoc_insertion_point(field_release:oteldemo.CreditCardInfo.credit_card_number) + return _impl_.credit_card_number_.Release(); +} +inline void CreditCardInfo::set_allocated_credit_card_number(std::string* credit_card_number) { + if (credit_card_number != nullptr) { + + } else { + + } + _impl_.credit_card_number_.SetAllocated(credit_card_number, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.credit_card_number_.IsDefault()) { + _impl_.credit_card_number_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.CreditCardInfo.credit_card_number) +} + +// int32 credit_card_cvv = 2; +inline void CreditCardInfo::clear_credit_card_cvv() { + _impl_.credit_card_cvv_ = 0; +} +inline int32_t CreditCardInfo::_internal_credit_card_cvv() const { + return _impl_.credit_card_cvv_; +} +inline int32_t CreditCardInfo::credit_card_cvv() const { + // @@protoc_insertion_point(field_get:oteldemo.CreditCardInfo.credit_card_cvv) + return _internal_credit_card_cvv(); +} +inline void CreditCardInfo::_internal_set_credit_card_cvv(int32_t value) { + + _impl_.credit_card_cvv_ = value; +} +inline void CreditCardInfo::set_credit_card_cvv(int32_t value) { + _internal_set_credit_card_cvv(value); + // @@protoc_insertion_point(field_set:oteldemo.CreditCardInfo.credit_card_cvv) +} + +// int32 credit_card_expiration_year = 3; +inline void CreditCardInfo::clear_credit_card_expiration_year() { + _impl_.credit_card_expiration_year_ = 0; +} +inline int32_t CreditCardInfo::_internal_credit_card_expiration_year() const { + return _impl_.credit_card_expiration_year_; +} +inline int32_t CreditCardInfo::credit_card_expiration_year() const { + // @@protoc_insertion_point(field_get:oteldemo.CreditCardInfo.credit_card_expiration_year) + return _internal_credit_card_expiration_year(); +} +inline void CreditCardInfo::_internal_set_credit_card_expiration_year(int32_t value) { + + _impl_.credit_card_expiration_year_ = value; +} +inline void CreditCardInfo::set_credit_card_expiration_year(int32_t value) { + _internal_set_credit_card_expiration_year(value); + // @@protoc_insertion_point(field_set:oteldemo.CreditCardInfo.credit_card_expiration_year) +} + +// int32 credit_card_expiration_month = 4; +inline void CreditCardInfo::clear_credit_card_expiration_month() { + _impl_.credit_card_expiration_month_ = 0; +} +inline int32_t CreditCardInfo::_internal_credit_card_expiration_month() const { + return _impl_.credit_card_expiration_month_; +} +inline int32_t CreditCardInfo::credit_card_expiration_month() const { + // @@protoc_insertion_point(field_get:oteldemo.CreditCardInfo.credit_card_expiration_month) + return _internal_credit_card_expiration_month(); +} +inline void CreditCardInfo::_internal_set_credit_card_expiration_month(int32_t value) { + + _impl_.credit_card_expiration_month_ = value; +} +inline void CreditCardInfo::set_credit_card_expiration_month(int32_t value) { + _internal_set_credit_card_expiration_month(value); + // @@protoc_insertion_point(field_set:oteldemo.CreditCardInfo.credit_card_expiration_month) +} + +// ------------------------------------------------------------------- + +// ChargeRequest + +// .oteldemo.Money amount = 1; +inline bool ChargeRequest::_internal_has_amount() const { + return this != internal_default_instance() && _impl_.amount_ != nullptr; +} +inline bool ChargeRequest::has_amount() const { + return _internal_has_amount(); +} +inline void ChargeRequest::clear_amount() { + if (GetArenaForAllocation() == nullptr && _impl_.amount_ != nullptr) { + delete _impl_.amount_; + } + _impl_.amount_ = nullptr; +} +inline const ::oteldemo::Money& ChargeRequest::_internal_amount() const { + const ::oteldemo::Money* p = _impl_.amount_; + return p != nullptr ? *p : reinterpret_cast( + ::oteldemo::_Money_default_instance_); +} +inline const ::oteldemo::Money& ChargeRequest::amount() const { + // @@protoc_insertion_point(field_get:oteldemo.ChargeRequest.amount) + return _internal_amount(); +} +inline void ChargeRequest::unsafe_arena_set_allocated_amount( + ::oteldemo::Money* amount) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.amount_); + } + _impl_.amount_ = amount; + if (amount) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:oteldemo.ChargeRequest.amount) +} +inline ::oteldemo::Money* ChargeRequest::release_amount() { + + ::oteldemo::Money* temp = _impl_.amount_; + _impl_.amount_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::oteldemo::Money* ChargeRequest::unsafe_arena_release_amount() { + // @@protoc_insertion_point(field_release:oteldemo.ChargeRequest.amount) + + ::oteldemo::Money* temp = _impl_.amount_; + _impl_.amount_ = nullptr; + return temp; +} +inline ::oteldemo::Money* ChargeRequest::_internal_mutable_amount() { + + if (_impl_.amount_ == nullptr) { + auto* p = CreateMaybeMessage<::oteldemo::Money>(GetArenaForAllocation()); + _impl_.amount_ = p; + } + return _impl_.amount_; +} +inline ::oteldemo::Money* ChargeRequest::mutable_amount() { + ::oteldemo::Money* _msg = _internal_mutable_amount(); + // @@protoc_insertion_point(field_mutable:oteldemo.ChargeRequest.amount) + return _msg; +} +inline void ChargeRequest::set_allocated_amount(::oteldemo::Money* amount) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.amount_; + } + if (amount) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(amount); + if (message_arena != submessage_arena) { + amount = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, amount, submessage_arena); + } + + } else { + + } + _impl_.amount_ = amount; + // @@protoc_insertion_point(field_set_allocated:oteldemo.ChargeRequest.amount) +} + +// .oteldemo.CreditCardInfo credit_card = 2; +inline bool ChargeRequest::_internal_has_credit_card() const { + return this != internal_default_instance() && _impl_.credit_card_ != nullptr; +} +inline bool ChargeRequest::has_credit_card() const { + return _internal_has_credit_card(); +} +inline void ChargeRequest::clear_credit_card() { + if (GetArenaForAllocation() == nullptr && _impl_.credit_card_ != nullptr) { + delete _impl_.credit_card_; + } + _impl_.credit_card_ = nullptr; +} +inline const ::oteldemo::CreditCardInfo& ChargeRequest::_internal_credit_card() const { + const ::oteldemo::CreditCardInfo* p = _impl_.credit_card_; + return p != nullptr ? *p : reinterpret_cast( + ::oteldemo::_CreditCardInfo_default_instance_); +} +inline const ::oteldemo::CreditCardInfo& ChargeRequest::credit_card() const { + // @@protoc_insertion_point(field_get:oteldemo.ChargeRequest.credit_card) + return _internal_credit_card(); +} +inline void ChargeRequest::unsafe_arena_set_allocated_credit_card( + ::oteldemo::CreditCardInfo* credit_card) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.credit_card_); + } + _impl_.credit_card_ = credit_card; + if (credit_card) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:oteldemo.ChargeRequest.credit_card) +} +inline ::oteldemo::CreditCardInfo* ChargeRequest::release_credit_card() { + + ::oteldemo::CreditCardInfo* temp = _impl_.credit_card_; + _impl_.credit_card_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::oteldemo::CreditCardInfo* ChargeRequest::unsafe_arena_release_credit_card() { + // @@protoc_insertion_point(field_release:oteldemo.ChargeRequest.credit_card) + + ::oteldemo::CreditCardInfo* temp = _impl_.credit_card_; + _impl_.credit_card_ = nullptr; + return temp; +} +inline ::oteldemo::CreditCardInfo* ChargeRequest::_internal_mutable_credit_card() { + + if (_impl_.credit_card_ == nullptr) { + auto* p = CreateMaybeMessage<::oteldemo::CreditCardInfo>(GetArenaForAllocation()); + _impl_.credit_card_ = p; + } + return _impl_.credit_card_; +} +inline ::oteldemo::CreditCardInfo* ChargeRequest::mutable_credit_card() { + ::oteldemo::CreditCardInfo* _msg = _internal_mutable_credit_card(); + // @@protoc_insertion_point(field_mutable:oteldemo.ChargeRequest.credit_card) + return _msg; +} +inline void ChargeRequest::set_allocated_credit_card(::oteldemo::CreditCardInfo* credit_card) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.credit_card_; + } + if (credit_card) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(credit_card); + if (message_arena != submessage_arena) { + credit_card = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, credit_card, submessage_arena); + } + + } else { + + } + _impl_.credit_card_ = credit_card; + // @@protoc_insertion_point(field_set_allocated:oteldemo.ChargeRequest.credit_card) +} + +// ------------------------------------------------------------------- + +// ChargeResponse + +// string transaction_id = 1; +inline void ChargeResponse::clear_transaction_id() { + _impl_.transaction_id_.ClearToEmpty(); +} +inline const std::string& ChargeResponse::transaction_id() const { + // @@protoc_insertion_point(field_get:oteldemo.ChargeResponse.transaction_id) + return _internal_transaction_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ChargeResponse::set_transaction_id(ArgT0&& arg0, ArgT... args) { + + _impl_.transaction_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.ChargeResponse.transaction_id) +} +inline std::string* ChargeResponse::mutable_transaction_id() { + std::string* _s = _internal_mutable_transaction_id(); + // @@protoc_insertion_point(field_mutable:oteldemo.ChargeResponse.transaction_id) + return _s; +} +inline const std::string& ChargeResponse::_internal_transaction_id() const { + return _impl_.transaction_id_.Get(); +} +inline void ChargeResponse::_internal_set_transaction_id(const std::string& value) { + + _impl_.transaction_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* ChargeResponse::_internal_mutable_transaction_id() { + + return _impl_.transaction_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* ChargeResponse::release_transaction_id() { + // @@protoc_insertion_point(field_release:oteldemo.ChargeResponse.transaction_id) + return _impl_.transaction_id_.Release(); +} +inline void ChargeResponse::set_allocated_transaction_id(std::string* transaction_id) { + if (transaction_id != nullptr) { + + } else { + + } + _impl_.transaction_id_.SetAllocated(transaction_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.transaction_id_.IsDefault()) { + _impl_.transaction_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.ChargeResponse.transaction_id) +} + +// ------------------------------------------------------------------- + +// OrderItem + +// .oteldemo.CartItem item = 1; +inline bool OrderItem::_internal_has_item() const { + return this != internal_default_instance() && _impl_.item_ != nullptr; +} +inline bool OrderItem::has_item() const { + return _internal_has_item(); +} +inline void OrderItem::clear_item() { + if (GetArenaForAllocation() == nullptr && _impl_.item_ != nullptr) { + delete _impl_.item_; + } + _impl_.item_ = nullptr; +} +inline const ::oteldemo::CartItem& OrderItem::_internal_item() const { + const ::oteldemo::CartItem* p = _impl_.item_; + return p != nullptr ? *p : reinterpret_cast( + ::oteldemo::_CartItem_default_instance_); +} +inline const ::oteldemo::CartItem& OrderItem::item() const { + // @@protoc_insertion_point(field_get:oteldemo.OrderItem.item) + return _internal_item(); +} +inline void OrderItem::unsafe_arena_set_allocated_item( + ::oteldemo::CartItem* item) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.item_); + } + _impl_.item_ = item; + if (item) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:oteldemo.OrderItem.item) +} +inline ::oteldemo::CartItem* OrderItem::release_item() { + + ::oteldemo::CartItem* temp = _impl_.item_; + _impl_.item_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::oteldemo::CartItem* OrderItem::unsafe_arena_release_item() { + // @@protoc_insertion_point(field_release:oteldemo.OrderItem.item) + + ::oteldemo::CartItem* temp = _impl_.item_; + _impl_.item_ = nullptr; + return temp; +} +inline ::oteldemo::CartItem* OrderItem::_internal_mutable_item() { + + if (_impl_.item_ == nullptr) { + auto* p = CreateMaybeMessage<::oteldemo::CartItem>(GetArenaForAllocation()); + _impl_.item_ = p; + } + return _impl_.item_; +} +inline ::oteldemo::CartItem* OrderItem::mutable_item() { + ::oteldemo::CartItem* _msg = _internal_mutable_item(); + // @@protoc_insertion_point(field_mutable:oteldemo.OrderItem.item) + return _msg; +} +inline void OrderItem::set_allocated_item(::oteldemo::CartItem* item) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.item_; + } + if (item) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(item); + if (message_arena != submessage_arena) { + item = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, item, submessage_arena); + } + + } else { + + } + _impl_.item_ = item; + // @@protoc_insertion_point(field_set_allocated:oteldemo.OrderItem.item) +} + +// .oteldemo.Money cost = 2; +inline bool OrderItem::_internal_has_cost() const { + return this != internal_default_instance() && _impl_.cost_ != nullptr; +} +inline bool OrderItem::has_cost() const { + return _internal_has_cost(); +} +inline void OrderItem::clear_cost() { + if (GetArenaForAllocation() == nullptr && _impl_.cost_ != nullptr) { + delete _impl_.cost_; + } + _impl_.cost_ = nullptr; +} +inline const ::oteldemo::Money& OrderItem::_internal_cost() const { + const ::oteldemo::Money* p = _impl_.cost_; + return p != nullptr ? *p : reinterpret_cast( + ::oteldemo::_Money_default_instance_); +} +inline const ::oteldemo::Money& OrderItem::cost() const { + // @@protoc_insertion_point(field_get:oteldemo.OrderItem.cost) + return _internal_cost(); +} +inline void OrderItem::unsafe_arena_set_allocated_cost( + ::oteldemo::Money* cost) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.cost_); + } + _impl_.cost_ = cost; + if (cost) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:oteldemo.OrderItem.cost) +} +inline ::oteldemo::Money* OrderItem::release_cost() { + + ::oteldemo::Money* temp = _impl_.cost_; + _impl_.cost_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::oteldemo::Money* OrderItem::unsafe_arena_release_cost() { + // @@protoc_insertion_point(field_release:oteldemo.OrderItem.cost) + + ::oteldemo::Money* temp = _impl_.cost_; + _impl_.cost_ = nullptr; + return temp; +} +inline ::oteldemo::Money* OrderItem::_internal_mutable_cost() { + + if (_impl_.cost_ == nullptr) { + auto* p = CreateMaybeMessage<::oteldemo::Money>(GetArenaForAllocation()); + _impl_.cost_ = p; + } + return _impl_.cost_; +} +inline ::oteldemo::Money* OrderItem::mutable_cost() { + ::oteldemo::Money* _msg = _internal_mutable_cost(); + // @@protoc_insertion_point(field_mutable:oteldemo.OrderItem.cost) + return _msg; +} +inline void OrderItem::set_allocated_cost(::oteldemo::Money* cost) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.cost_; + } + if (cost) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(cost); + if (message_arena != submessage_arena) { + cost = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, cost, submessage_arena); + } + + } else { + + } + _impl_.cost_ = cost; + // @@protoc_insertion_point(field_set_allocated:oteldemo.OrderItem.cost) +} + +// ------------------------------------------------------------------- + +// OrderResult + +// string order_id = 1; +inline void OrderResult::clear_order_id() { + _impl_.order_id_.ClearToEmpty(); +} +inline const std::string& OrderResult::order_id() const { + // @@protoc_insertion_point(field_get:oteldemo.OrderResult.order_id) + return _internal_order_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void OrderResult::set_order_id(ArgT0&& arg0, ArgT... args) { + + _impl_.order_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.OrderResult.order_id) +} +inline std::string* OrderResult::mutable_order_id() { + std::string* _s = _internal_mutable_order_id(); + // @@protoc_insertion_point(field_mutable:oteldemo.OrderResult.order_id) + return _s; +} +inline const std::string& OrderResult::_internal_order_id() const { + return _impl_.order_id_.Get(); +} +inline void OrderResult::_internal_set_order_id(const std::string& value) { + + _impl_.order_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* OrderResult::_internal_mutable_order_id() { + + return _impl_.order_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* OrderResult::release_order_id() { + // @@protoc_insertion_point(field_release:oteldemo.OrderResult.order_id) + return _impl_.order_id_.Release(); +} +inline void OrderResult::set_allocated_order_id(std::string* order_id) { + if (order_id != nullptr) { + + } else { + + } + _impl_.order_id_.SetAllocated(order_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.order_id_.IsDefault()) { + _impl_.order_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.OrderResult.order_id) +} + +// string shipping_tracking_id = 2; +inline void OrderResult::clear_shipping_tracking_id() { + _impl_.shipping_tracking_id_.ClearToEmpty(); +} +inline const std::string& OrderResult::shipping_tracking_id() const { + // @@protoc_insertion_point(field_get:oteldemo.OrderResult.shipping_tracking_id) + return _internal_shipping_tracking_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void OrderResult::set_shipping_tracking_id(ArgT0&& arg0, ArgT... args) { + + _impl_.shipping_tracking_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.OrderResult.shipping_tracking_id) +} +inline std::string* OrderResult::mutable_shipping_tracking_id() { + std::string* _s = _internal_mutable_shipping_tracking_id(); + // @@protoc_insertion_point(field_mutable:oteldemo.OrderResult.shipping_tracking_id) + return _s; +} +inline const std::string& OrderResult::_internal_shipping_tracking_id() const { + return _impl_.shipping_tracking_id_.Get(); +} +inline void OrderResult::_internal_set_shipping_tracking_id(const std::string& value) { + + _impl_.shipping_tracking_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* OrderResult::_internal_mutable_shipping_tracking_id() { + + return _impl_.shipping_tracking_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* OrderResult::release_shipping_tracking_id() { + // @@protoc_insertion_point(field_release:oteldemo.OrderResult.shipping_tracking_id) + return _impl_.shipping_tracking_id_.Release(); +} +inline void OrderResult::set_allocated_shipping_tracking_id(std::string* shipping_tracking_id) { + if (shipping_tracking_id != nullptr) { + + } else { + + } + _impl_.shipping_tracking_id_.SetAllocated(shipping_tracking_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.shipping_tracking_id_.IsDefault()) { + _impl_.shipping_tracking_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.OrderResult.shipping_tracking_id) +} + +// .oteldemo.Money shipping_cost = 3; +inline bool OrderResult::_internal_has_shipping_cost() const { + return this != internal_default_instance() && _impl_.shipping_cost_ != nullptr; +} +inline bool OrderResult::has_shipping_cost() const { + return _internal_has_shipping_cost(); +} +inline void OrderResult::clear_shipping_cost() { + if (GetArenaForAllocation() == nullptr && _impl_.shipping_cost_ != nullptr) { + delete _impl_.shipping_cost_; + } + _impl_.shipping_cost_ = nullptr; +} +inline const ::oteldemo::Money& OrderResult::_internal_shipping_cost() const { + const ::oteldemo::Money* p = _impl_.shipping_cost_; + return p != nullptr ? *p : reinterpret_cast( + ::oteldemo::_Money_default_instance_); +} +inline const ::oteldemo::Money& OrderResult::shipping_cost() const { + // @@protoc_insertion_point(field_get:oteldemo.OrderResult.shipping_cost) + return _internal_shipping_cost(); +} +inline void OrderResult::unsafe_arena_set_allocated_shipping_cost( + ::oteldemo::Money* shipping_cost) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.shipping_cost_); + } + _impl_.shipping_cost_ = shipping_cost; + if (shipping_cost) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:oteldemo.OrderResult.shipping_cost) +} +inline ::oteldemo::Money* OrderResult::release_shipping_cost() { + + ::oteldemo::Money* temp = _impl_.shipping_cost_; + _impl_.shipping_cost_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::oteldemo::Money* OrderResult::unsafe_arena_release_shipping_cost() { + // @@protoc_insertion_point(field_release:oteldemo.OrderResult.shipping_cost) + + ::oteldemo::Money* temp = _impl_.shipping_cost_; + _impl_.shipping_cost_ = nullptr; + return temp; +} +inline ::oteldemo::Money* OrderResult::_internal_mutable_shipping_cost() { + + if (_impl_.shipping_cost_ == nullptr) { + auto* p = CreateMaybeMessage<::oteldemo::Money>(GetArenaForAllocation()); + _impl_.shipping_cost_ = p; + } + return _impl_.shipping_cost_; +} +inline ::oteldemo::Money* OrderResult::mutable_shipping_cost() { + ::oteldemo::Money* _msg = _internal_mutable_shipping_cost(); + // @@protoc_insertion_point(field_mutable:oteldemo.OrderResult.shipping_cost) + return _msg; +} +inline void OrderResult::set_allocated_shipping_cost(::oteldemo::Money* shipping_cost) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.shipping_cost_; + } + if (shipping_cost) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(shipping_cost); + if (message_arena != submessage_arena) { + shipping_cost = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, shipping_cost, submessage_arena); + } + + } else { + + } + _impl_.shipping_cost_ = shipping_cost; + // @@protoc_insertion_point(field_set_allocated:oteldemo.OrderResult.shipping_cost) +} + +// .oteldemo.Address shipping_address = 4; +inline bool OrderResult::_internal_has_shipping_address() const { + return this != internal_default_instance() && _impl_.shipping_address_ != nullptr; +} +inline bool OrderResult::has_shipping_address() const { + return _internal_has_shipping_address(); +} +inline void OrderResult::clear_shipping_address() { + if (GetArenaForAllocation() == nullptr && _impl_.shipping_address_ != nullptr) { + delete _impl_.shipping_address_; + } + _impl_.shipping_address_ = nullptr; +} +inline const ::oteldemo::Address& OrderResult::_internal_shipping_address() const { + const ::oteldemo::Address* p = _impl_.shipping_address_; + return p != nullptr ? *p : reinterpret_cast( + ::oteldemo::_Address_default_instance_); +} +inline const ::oteldemo::Address& OrderResult::shipping_address() const { + // @@protoc_insertion_point(field_get:oteldemo.OrderResult.shipping_address) + return _internal_shipping_address(); +} +inline void OrderResult::unsafe_arena_set_allocated_shipping_address( + ::oteldemo::Address* shipping_address) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.shipping_address_); + } + _impl_.shipping_address_ = shipping_address; + if (shipping_address) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:oteldemo.OrderResult.shipping_address) +} +inline ::oteldemo::Address* OrderResult::release_shipping_address() { + + ::oteldemo::Address* temp = _impl_.shipping_address_; + _impl_.shipping_address_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::oteldemo::Address* OrderResult::unsafe_arena_release_shipping_address() { + // @@protoc_insertion_point(field_release:oteldemo.OrderResult.shipping_address) + + ::oteldemo::Address* temp = _impl_.shipping_address_; + _impl_.shipping_address_ = nullptr; + return temp; +} +inline ::oteldemo::Address* OrderResult::_internal_mutable_shipping_address() { + + if (_impl_.shipping_address_ == nullptr) { + auto* p = CreateMaybeMessage<::oteldemo::Address>(GetArenaForAllocation()); + _impl_.shipping_address_ = p; + } + return _impl_.shipping_address_; +} +inline ::oteldemo::Address* OrderResult::mutable_shipping_address() { + ::oteldemo::Address* _msg = _internal_mutable_shipping_address(); + // @@protoc_insertion_point(field_mutable:oteldemo.OrderResult.shipping_address) + return _msg; +} +inline void OrderResult::set_allocated_shipping_address(::oteldemo::Address* shipping_address) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.shipping_address_; + } + if (shipping_address) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(shipping_address); + if (message_arena != submessage_arena) { + shipping_address = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, shipping_address, submessage_arena); + } + + } else { + + } + _impl_.shipping_address_ = shipping_address; + // @@protoc_insertion_point(field_set_allocated:oteldemo.OrderResult.shipping_address) +} + +// repeated .oteldemo.OrderItem items = 5; +inline int OrderResult::_internal_items_size() const { + return _impl_.items_.size(); +} +inline int OrderResult::items_size() const { + return _internal_items_size(); +} +inline void OrderResult::clear_items() { + _impl_.items_.Clear(); +} +inline ::oteldemo::OrderItem* OrderResult::mutable_items(int index) { + // @@protoc_insertion_point(field_mutable:oteldemo.OrderResult.items) + return _impl_.items_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::OrderItem >* +OrderResult::mutable_items() { + // @@protoc_insertion_point(field_mutable_list:oteldemo.OrderResult.items) + return &_impl_.items_; +} +inline const ::oteldemo::OrderItem& OrderResult::_internal_items(int index) const { + return _impl_.items_.Get(index); +} +inline const ::oteldemo::OrderItem& OrderResult::items(int index) const { + // @@protoc_insertion_point(field_get:oteldemo.OrderResult.items) + return _internal_items(index); +} +inline ::oteldemo::OrderItem* OrderResult::_internal_add_items() { + return _impl_.items_.Add(); +} +inline ::oteldemo::OrderItem* OrderResult::add_items() { + ::oteldemo::OrderItem* _add = _internal_add_items(); + // @@protoc_insertion_point(field_add:oteldemo.OrderResult.items) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::OrderItem >& +OrderResult::items() const { + // @@protoc_insertion_point(field_list:oteldemo.OrderResult.items) + return _impl_.items_; +} + +// ------------------------------------------------------------------- + +// SendOrderConfirmationRequest + +// string email = 1; +inline void SendOrderConfirmationRequest::clear_email() { + _impl_.email_.ClearToEmpty(); +} +inline const std::string& SendOrderConfirmationRequest::email() const { + // @@protoc_insertion_point(field_get:oteldemo.SendOrderConfirmationRequest.email) + return _internal_email(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SendOrderConfirmationRequest::set_email(ArgT0&& arg0, ArgT... args) { + + _impl_.email_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.SendOrderConfirmationRequest.email) +} +inline std::string* SendOrderConfirmationRequest::mutable_email() { + std::string* _s = _internal_mutable_email(); + // @@protoc_insertion_point(field_mutable:oteldemo.SendOrderConfirmationRequest.email) + return _s; +} +inline const std::string& SendOrderConfirmationRequest::_internal_email() const { + return _impl_.email_.Get(); +} +inline void SendOrderConfirmationRequest::_internal_set_email(const std::string& value) { + + _impl_.email_.Set(value, GetArenaForAllocation()); +} +inline std::string* SendOrderConfirmationRequest::_internal_mutable_email() { + + return _impl_.email_.Mutable(GetArenaForAllocation()); +} +inline std::string* SendOrderConfirmationRequest::release_email() { + // @@protoc_insertion_point(field_release:oteldemo.SendOrderConfirmationRequest.email) + return _impl_.email_.Release(); +} +inline void SendOrderConfirmationRequest::set_allocated_email(std::string* email) { + if (email != nullptr) { + + } else { + + } + _impl_.email_.SetAllocated(email, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.email_.IsDefault()) { + _impl_.email_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.SendOrderConfirmationRequest.email) +} + +// .oteldemo.OrderResult order = 2; +inline bool SendOrderConfirmationRequest::_internal_has_order() const { + return this != internal_default_instance() && _impl_.order_ != nullptr; +} +inline bool SendOrderConfirmationRequest::has_order() const { + return _internal_has_order(); +} +inline void SendOrderConfirmationRequest::clear_order() { + if (GetArenaForAllocation() == nullptr && _impl_.order_ != nullptr) { + delete _impl_.order_; + } + _impl_.order_ = nullptr; +} +inline const ::oteldemo::OrderResult& SendOrderConfirmationRequest::_internal_order() const { + const ::oteldemo::OrderResult* p = _impl_.order_; + return p != nullptr ? *p : reinterpret_cast( + ::oteldemo::_OrderResult_default_instance_); +} +inline const ::oteldemo::OrderResult& SendOrderConfirmationRequest::order() const { + // @@protoc_insertion_point(field_get:oteldemo.SendOrderConfirmationRequest.order) + return _internal_order(); +} +inline void SendOrderConfirmationRequest::unsafe_arena_set_allocated_order( + ::oteldemo::OrderResult* order) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.order_); + } + _impl_.order_ = order; + if (order) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:oteldemo.SendOrderConfirmationRequest.order) +} +inline ::oteldemo::OrderResult* SendOrderConfirmationRequest::release_order() { + + ::oteldemo::OrderResult* temp = _impl_.order_; + _impl_.order_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::oteldemo::OrderResult* SendOrderConfirmationRequest::unsafe_arena_release_order() { + // @@protoc_insertion_point(field_release:oteldemo.SendOrderConfirmationRequest.order) + + ::oteldemo::OrderResult* temp = _impl_.order_; + _impl_.order_ = nullptr; + return temp; +} +inline ::oteldemo::OrderResult* SendOrderConfirmationRequest::_internal_mutable_order() { + + if (_impl_.order_ == nullptr) { + auto* p = CreateMaybeMessage<::oteldemo::OrderResult>(GetArenaForAllocation()); + _impl_.order_ = p; + } + return _impl_.order_; +} +inline ::oteldemo::OrderResult* SendOrderConfirmationRequest::mutable_order() { + ::oteldemo::OrderResult* _msg = _internal_mutable_order(); + // @@protoc_insertion_point(field_mutable:oteldemo.SendOrderConfirmationRequest.order) + return _msg; +} +inline void SendOrderConfirmationRequest::set_allocated_order(::oteldemo::OrderResult* order) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.order_; + } + if (order) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(order); + if (message_arena != submessage_arena) { + order = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, order, submessage_arena); + } + + } else { + + } + _impl_.order_ = order; + // @@protoc_insertion_point(field_set_allocated:oteldemo.SendOrderConfirmationRequest.order) +} + +// ------------------------------------------------------------------- + +// PlaceOrderRequest + +// string user_id = 1; +inline void PlaceOrderRequest::clear_user_id() { + _impl_.user_id_.ClearToEmpty(); +} +inline const std::string& PlaceOrderRequest::user_id() const { + // @@protoc_insertion_point(field_get:oteldemo.PlaceOrderRequest.user_id) + return _internal_user_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void PlaceOrderRequest::set_user_id(ArgT0&& arg0, ArgT... args) { + + _impl_.user_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.PlaceOrderRequest.user_id) +} +inline std::string* PlaceOrderRequest::mutable_user_id() { + std::string* _s = _internal_mutable_user_id(); + // @@protoc_insertion_point(field_mutable:oteldemo.PlaceOrderRequest.user_id) + return _s; +} +inline const std::string& PlaceOrderRequest::_internal_user_id() const { + return _impl_.user_id_.Get(); +} +inline void PlaceOrderRequest::_internal_set_user_id(const std::string& value) { + + _impl_.user_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* PlaceOrderRequest::_internal_mutable_user_id() { + + return _impl_.user_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* PlaceOrderRequest::release_user_id() { + // @@protoc_insertion_point(field_release:oteldemo.PlaceOrderRequest.user_id) + return _impl_.user_id_.Release(); +} +inline void PlaceOrderRequest::set_allocated_user_id(std::string* user_id) { + if (user_id != nullptr) { + + } else { + + } + _impl_.user_id_.SetAllocated(user_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.user_id_.IsDefault()) { + _impl_.user_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.PlaceOrderRequest.user_id) +} + +// string user_currency = 2; +inline void PlaceOrderRequest::clear_user_currency() { + _impl_.user_currency_.ClearToEmpty(); +} +inline const std::string& PlaceOrderRequest::user_currency() const { + // @@protoc_insertion_point(field_get:oteldemo.PlaceOrderRequest.user_currency) + return _internal_user_currency(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void PlaceOrderRequest::set_user_currency(ArgT0&& arg0, ArgT... args) { + + _impl_.user_currency_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.PlaceOrderRequest.user_currency) +} +inline std::string* PlaceOrderRequest::mutable_user_currency() { + std::string* _s = _internal_mutable_user_currency(); + // @@protoc_insertion_point(field_mutable:oteldemo.PlaceOrderRequest.user_currency) + return _s; +} +inline const std::string& PlaceOrderRequest::_internal_user_currency() const { + return _impl_.user_currency_.Get(); +} +inline void PlaceOrderRequest::_internal_set_user_currency(const std::string& value) { + + _impl_.user_currency_.Set(value, GetArenaForAllocation()); +} +inline std::string* PlaceOrderRequest::_internal_mutable_user_currency() { + + return _impl_.user_currency_.Mutable(GetArenaForAllocation()); +} +inline std::string* PlaceOrderRequest::release_user_currency() { + // @@protoc_insertion_point(field_release:oteldemo.PlaceOrderRequest.user_currency) + return _impl_.user_currency_.Release(); +} +inline void PlaceOrderRequest::set_allocated_user_currency(std::string* user_currency) { + if (user_currency != nullptr) { + + } else { + + } + _impl_.user_currency_.SetAllocated(user_currency, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.user_currency_.IsDefault()) { + _impl_.user_currency_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.PlaceOrderRequest.user_currency) +} + +// .oteldemo.Address address = 3; +inline bool PlaceOrderRequest::_internal_has_address() const { + return this != internal_default_instance() && _impl_.address_ != nullptr; +} +inline bool PlaceOrderRequest::has_address() const { + return _internal_has_address(); +} +inline void PlaceOrderRequest::clear_address() { + if (GetArenaForAllocation() == nullptr && _impl_.address_ != nullptr) { + delete _impl_.address_; + } + _impl_.address_ = nullptr; +} +inline const ::oteldemo::Address& PlaceOrderRequest::_internal_address() const { + const ::oteldemo::Address* p = _impl_.address_; + return p != nullptr ? *p : reinterpret_cast( + ::oteldemo::_Address_default_instance_); +} +inline const ::oteldemo::Address& PlaceOrderRequest::address() const { + // @@protoc_insertion_point(field_get:oteldemo.PlaceOrderRequest.address) + return _internal_address(); +} +inline void PlaceOrderRequest::unsafe_arena_set_allocated_address( + ::oteldemo::Address* address) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.address_); + } + _impl_.address_ = address; + if (address) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:oteldemo.PlaceOrderRequest.address) +} +inline ::oteldemo::Address* PlaceOrderRequest::release_address() { + + ::oteldemo::Address* temp = _impl_.address_; + _impl_.address_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::oteldemo::Address* PlaceOrderRequest::unsafe_arena_release_address() { + // @@protoc_insertion_point(field_release:oteldemo.PlaceOrderRequest.address) + + ::oteldemo::Address* temp = _impl_.address_; + _impl_.address_ = nullptr; + return temp; +} +inline ::oteldemo::Address* PlaceOrderRequest::_internal_mutable_address() { + + if (_impl_.address_ == nullptr) { + auto* p = CreateMaybeMessage<::oteldemo::Address>(GetArenaForAllocation()); + _impl_.address_ = p; + } + return _impl_.address_; +} +inline ::oteldemo::Address* PlaceOrderRequest::mutable_address() { + ::oteldemo::Address* _msg = _internal_mutable_address(); + // @@protoc_insertion_point(field_mutable:oteldemo.PlaceOrderRequest.address) + return _msg; +} +inline void PlaceOrderRequest::set_allocated_address(::oteldemo::Address* address) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.address_; + } + if (address) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(address); + if (message_arena != submessage_arena) { + address = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, address, submessage_arena); + } + + } else { + + } + _impl_.address_ = address; + // @@protoc_insertion_point(field_set_allocated:oteldemo.PlaceOrderRequest.address) +} + +// string email = 5; +inline void PlaceOrderRequest::clear_email() { + _impl_.email_.ClearToEmpty(); +} +inline const std::string& PlaceOrderRequest::email() const { + // @@protoc_insertion_point(field_get:oteldemo.PlaceOrderRequest.email) + return _internal_email(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void PlaceOrderRequest::set_email(ArgT0&& arg0, ArgT... args) { + + _impl_.email_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.PlaceOrderRequest.email) +} +inline std::string* PlaceOrderRequest::mutable_email() { + std::string* _s = _internal_mutable_email(); + // @@protoc_insertion_point(field_mutable:oteldemo.PlaceOrderRequest.email) + return _s; +} +inline const std::string& PlaceOrderRequest::_internal_email() const { + return _impl_.email_.Get(); +} +inline void PlaceOrderRequest::_internal_set_email(const std::string& value) { + + _impl_.email_.Set(value, GetArenaForAllocation()); +} +inline std::string* PlaceOrderRequest::_internal_mutable_email() { + + return _impl_.email_.Mutable(GetArenaForAllocation()); +} +inline std::string* PlaceOrderRequest::release_email() { + // @@protoc_insertion_point(field_release:oteldemo.PlaceOrderRequest.email) + return _impl_.email_.Release(); +} +inline void PlaceOrderRequest::set_allocated_email(std::string* email) { + if (email != nullptr) { + + } else { + + } + _impl_.email_.SetAllocated(email, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.email_.IsDefault()) { + _impl_.email_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.PlaceOrderRequest.email) +} + +// .oteldemo.CreditCardInfo credit_card = 6; +inline bool PlaceOrderRequest::_internal_has_credit_card() const { + return this != internal_default_instance() && _impl_.credit_card_ != nullptr; +} +inline bool PlaceOrderRequest::has_credit_card() const { + return _internal_has_credit_card(); +} +inline void PlaceOrderRequest::clear_credit_card() { + if (GetArenaForAllocation() == nullptr && _impl_.credit_card_ != nullptr) { + delete _impl_.credit_card_; + } + _impl_.credit_card_ = nullptr; +} +inline const ::oteldemo::CreditCardInfo& PlaceOrderRequest::_internal_credit_card() const { + const ::oteldemo::CreditCardInfo* p = _impl_.credit_card_; + return p != nullptr ? *p : reinterpret_cast( + ::oteldemo::_CreditCardInfo_default_instance_); +} +inline const ::oteldemo::CreditCardInfo& PlaceOrderRequest::credit_card() const { + // @@protoc_insertion_point(field_get:oteldemo.PlaceOrderRequest.credit_card) + return _internal_credit_card(); +} +inline void PlaceOrderRequest::unsafe_arena_set_allocated_credit_card( + ::oteldemo::CreditCardInfo* credit_card) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.credit_card_); + } + _impl_.credit_card_ = credit_card; + if (credit_card) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:oteldemo.PlaceOrderRequest.credit_card) +} +inline ::oteldemo::CreditCardInfo* PlaceOrderRequest::release_credit_card() { + + ::oteldemo::CreditCardInfo* temp = _impl_.credit_card_; + _impl_.credit_card_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::oteldemo::CreditCardInfo* PlaceOrderRequest::unsafe_arena_release_credit_card() { + // @@protoc_insertion_point(field_release:oteldemo.PlaceOrderRequest.credit_card) + + ::oteldemo::CreditCardInfo* temp = _impl_.credit_card_; + _impl_.credit_card_ = nullptr; + return temp; +} +inline ::oteldemo::CreditCardInfo* PlaceOrderRequest::_internal_mutable_credit_card() { + + if (_impl_.credit_card_ == nullptr) { + auto* p = CreateMaybeMessage<::oteldemo::CreditCardInfo>(GetArenaForAllocation()); + _impl_.credit_card_ = p; + } + return _impl_.credit_card_; +} +inline ::oteldemo::CreditCardInfo* PlaceOrderRequest::mutable_credit_card() { + ::oteldemo::CreditCardInfo* _msg = _internal_mutable_credit_card(); + // @@protoc_insertion_point(field_mutable:oteldemo.PlaceOrderRequest.credit_card) + return _msg; +} +inline void PlaceOrderRequest::set_allocated_credit_card(::oteldemo::CreditCardInfo* credit_card) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.credit_card_; + } + if (credit_card) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(credit_card); + if (message_arena != submessage_arena) { + credit_card = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, credit_card, submessage_arena); + } + + } else { + + } + _impl_.credit_card_ = credit_card; + // @@protoc_insertion_point(field_set_allocated:oteldemo.PlaceOrderRequest.credit_card) +} + +// ------------------------------------------------------------------- + +// PlaceOrderResponse + +// .oteldemo.OrderResult order = 1; +inline bool PlaceOrderResponse::_internal_has_order() const { + return this != internal_default_instance() && _impl_.order_ != nullptr; +} +inline bool PlaceOrderResponse::has_order() const { + return _internal_has_order(); +} +inline void PlaceOrderResponse::clear_order() { + if (GetArenaForAllocation() == nullptr && _impl_.order_ != nullptr) { + delete _impl_.order_; + } + _impl_.order_ = nullptr; +} +inline const ::oteldemo::OrderResult& PlaceOrderResponse::_internal_order() const { + const ::oteldemo::OrderResult* p = _impl_.order_; + return p != nullptr ? *p : reinterpret_cast( + ::oteldemo::_OrderResult_default_instance_); +} +inline const ::oteldemo::OrderResult& PlaceOrderResponse::order() const { + // @@protoc_insertion_point(field_get:oteldemo.PlaceOrderResponse.order) + return _internal_order(); +} +inline void PlaceOrderResponse::unsafe_arena_set_allocated_order( + ::oteldemo::OrderResult* order) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.order_); + } + _impl_.order_ = order; + if (order) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:oteldemo.PlaceOrderResponse.order) +} +inline ::oteldemo::OrderResult* PlaceOrderResponse::release_order() { + + ::oteldemo::OrderResult* temp = _impl_.order_; + _impl_.order_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::oteldemo::OrderResult* PlaceOrderResponse::unsafe_arena_release_order() { + // @@protoc_insertion_point(field_release:oteldemo.PlaceOrderResponse.order) + + ::oteldemo::OrderResult* temp = _impl_.order_; + _impl_.order_ = nullptr; + return temp; +} +inline ::oteldemo::OrderResult* PlaceOrderResponse::_internal_mutable_order() { + + if (_impl_.order_ == nullptr) { + auto* p = CreateMaybeMessage<::oteldemo::OrderResult>(GetArenaForAllocation()); + _impl_.order_ = p; + } + return _impl_.order_; +} +inline ::oteldemo::OrderResult* PlaceOrderResponse::mutable_order() { + ::oteldemo::OrderResult* _msg = _internal_mutable_order(); + // @@protoc_insertion_point(field_mutable:oteldemo.PlaceOrderResponse.order) + return _msg; +} +inline void PlaceOrderResponse::set_allocated_order(::oteldemo::OrderResult* order) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.order_; + } + if (order) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(order); + if (message_arena != submessage_arena) { + order = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, order, submessage_arena); + } + + } else { + + } + _impl_.order_ = order; + // @@protoc_insertion_point(field_set_allocated:oteldemo.PlaceOrderResponse.order) +} + +// ------------------------------------------------------------------- + +// AdRequest + +// repeated string context_keys = 1; +inline int AdRequest::_internal_context_keys_size() const { + return _impl_.context_keys_.size(); +} +inline int AdRequest::context_keys_size() const { + return _internal_context_keys_size(); +} +inline void AdRequest::clear_context_keys() { + _impl_.context_keys_.Clear(); +} +inline std::string* AdRequest::add_context_keys() { + std::string* _s = _internal_add_context_keys(); + // @@protoc_insertion_point(field_add_mutable:oteldemo.AdRequest.context_keys) + return _s; +} +inline const std::string& AdRequest::_internal_context_keys(int index) const { + return _impl_.context_keys_.Get(index); +} +inline const std::string& AdRequest::context_keys(int index) const { + // @@protoc_insertion_point(field_get:oteldemo.AdRequest.context_keys) + return _internal_context_keys(index); +} +inline std::string* AdRequest::mutable_context_keys(int index) { + // @@protoc_insertion_point(field_mutable:oteldemo.AdRequest.context_keys) + return _impl_.context_keys_.Mutable(index); +} +inline void AdRequest::set_context_keys(int index, const std::string& value) { + _impl_.context_keys_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:oteldemo.AdRequest.context_keys) +} +inline void AdRequest::set_context_keys(int index, std::string&& value) { + _impl_.context_keys_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:oteldemo.AdRequest.context_keys) +} +inline void AdRequest::set_context_keys(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.context_keys_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:oteldemo.AdRequest.context_keys) +} +inline void AdRequest::set_context_keys(int index, const char* value, size_t size) { + _impl_.context_keys_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:oteldemo.AdRequest.context_keys) +} +inline std::string* AdRequest::_internal_add_context_keys() { + return _impl_.context_keys_.Add(); +} +inline void AdRequest::add_context_keys(const std::string& value) { + _impl_.context_keys_.Add()->assign(value); + // @@protoc_insertion_point(field_add:oteldemo.AdRequest.context_keys) +} +inline void AdRequest::add_context_keys(std::string&& value) { + _impl_.context_keys_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:oteldemo.AdRequest.context_keys) +} +inline void AdRequest::add_context_keys(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.context_keys_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:oteldemo.AdRequest.context_keys) +} +inline void AdRequest::add_context_keys(const char* value, size_t size) { + _impl_.context_keys_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:oteldemo.AdRequest.context_keys) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +AdRequest::context_keys() const { + // @@protoc_insertion_point(field_list:oteldemo.AdRequest.context_keys) + return _impl_.context_keys_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +AdRequest::mutable_context_keys() { + // @@protoc_insertion_point(field_mutable_list:oteldemo.AdRequest.context_keys) + return &_impl_.context_keys_; +} + +// ------------------------------------------------------------------- + +// AdResponse + +// repeated .oteldemo.Ad ads = 1; +inline int AdResponse::_internal_ads_size() const { + return _impl_.ads_.size(); +} +inline int AdResponse::ads_size() const { + return _internal_ads_size(); +} +inline void AdResponse::clear_ads() { + _impl_.ads_.Clear(); +} +inline ::oteldemo::Ad* AdResponse::mutable_ads(int index) { + // @@protoc_insertion_point(field_mutable:oteldemo.AdResponse.ads) + return _impl_.ads_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::Ad >* +AdResponse::mutable_ads() { + // @@protoc_insertion_point(field_mutable_list:oteldemo.AdResponse.ads) + return &_impl_.ads_; +} +inline const ::oteldemo::Ad& AdResponse::_internal_ads(int index) const { + return _impl_.ads_.Get(index); +} +inline const ::oteldemo::Ad& AdResponse::ads(int index) const { + // @@protoc_insertion_point(field_get:oteldemo.AdResponse.ads) + return _internal_ads(index); +} +inline ::oteldemo::Ad* AdResponse::_internal_add_ads() { + return _impl_.ads_.Add(); +} +inline ::oteldemo::Ad* AdResponse::add_ads() { + ::oteldemo::Ad* _add = _internal_add_ads(); + // @@protoc_insertion_point(field_add:oteldemo.AdResponse.ads) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::Ad >& +AdResponse::ads() const { + // @@protoc_insertion_point(field_list:oteldemo.AdResponse.ads) + return _impl_.ads_; +} + +// ------------------------------------------------------------------- + +// Ad + +// string redirect_url = 1; +inline void Ad::clear_redirect_url() { + _impl_.redirect_url_.ClearToEmpty(); +} +inline const std::string& Ad::redirect_url() const { + // @@protoc_insertion_point(field_get:oteldemo.Ad.redirect_url) + return _internal_redirect_url(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Ad::set_redirect_url(ArgT0&& arg0, ArgT... args) { + + _impl_.redirect_url_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.Ad.redirect_url) +} +inline std::string* Ad::mutable_redirect_url() { + std::string* _s = _internal_mutable_redirect_url(); + // @@protoc_insertion_point(field_mutable:oteldemo.Ad.redirect_url) + return _s; +} +inline const std::string& Ad::_internal_redirect_url() const { + return _impl_.redirect_url_.Get(); +} +inline void Ad::_internal_set_redirect_url(const std::string& value) { + + _impl_.redirect_url_.Set(value, GetArenaForAllocation()); +} +inline std::string* Ad::_internal_mutable_redirect_url() { + + return _impl_.redirect_url_.Mutable(GetArenaForAllocation()); +} +inline std::string* Ad::release_redirect_url() { + // @@protoc_insertion_point(field_release:oteldemo.Ad.redirect_url) + return _impl_.redirect_url_.Release(); +} +inline void Ad::set_allocated_redirect_url(std::string* redirect_url) { + if (redirect_url != nullptr) { + + } else { + + } + _impl_.redirect_url_.SetAllocated(redirect_url, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.redirect_url_.IsDefault()) { + _impl_.redirect_url_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.Ad.redirect_url) +} + +// string text = 2; +inline void Ad::clear_text() { + _impl_.text_.ClearToEmpty(); +} +inline const std::string& Ad::text() const { + // @@protoc_insertion_point(field_get:oteldemo.Ad.text) + return _internal_text(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Ad::set_text(ArgT0&& arg0, ArgT... args) { + + _impl_.text_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.Ad.text) +} +inline std::string* Ad::mutable_text() { + std::string* _s = _internal_mutable_text(); + // @@protoc_insertion_point(field_mutable:oteldemo.Ad.text) + return _s; +} +inline const std::string& Ad::_internal_text() const { + return _impl_.text_.Get(); +} +inline void Ad::_internal_set_text(const std::string& value) { + + _impl_.text_.Set(value, GetArenaForAllocation()); +} +inline std::string* Ad::_internal_mutable_text() { + + return _impl_.text_.Mutable(GetArenaForAllocation()); +} +inline std::string* Ad::release_text() { + // @@protoc_insertion_point(field_release:oteldemo.Ad.text) + return _impl_.text_.Release(); +} +inline void Ad::set_allocated_text(std::string* text) { + if (text != nullptr) { + + } else { + + } + _impl_.text_.SetAllocated(text, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.text_.IsDefault()) { + _impl_.text_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.Ad.text) +} + +// ------------------------------------------------------------------- + +// Flag + +// string name = 1; +inline void Flag::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& Flag::name() const { + // @@protoc_insertion_point(field_get:oteldemo.Flag.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Flag::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.Flag.name) +} +inline std::string* Flag::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:oteldemo.Flag.name) + return _s; +} +inline const std::string& Flag::_internal_name() const { + return _impl_.name_.Get(); +} +inline void Flag::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* Flag::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* Flag::release_name() { + // @@protoc_insertion_point(field_release:oteldemo.Flag.name) + return _impl_.name_.Release(); +} +inline void Flag::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.Flag.name) +} + +// string description = 2; +inline void Flag::clear_description() { + _impl_.description_.ClearToEmpty(); +} +inline const std::string& Flag::description() const { + // @@protoc_insertion_point(field_get:oteldemo.Flag.description) + return _internal_description(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Flag::set_description(ArgT0&& arg0, ArgT... args) { + + _impl_.description_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.Flag.description) +} +inline std::string* Flag::mutable_description() { + std::string* _s = _internal_mutable_description(); + // @@protoc_insertion_point(field_mutable:oteldemo.Flag.description) + return _s; +} +inline const std::string& Flag::_internal_description() const { + return _impl_.description_.Get(); +} +inline void Flag::_internal_set_description(const std::string& value) { + + _impl_.description_.Set(value, GetArenaForAllocation()); +} +inline std::string* Flag::_internal_mutable_description() { + + return _impl_.description_.Mutable(GetArenaForAllocation()); +} +inline std::string* Flag::release_description() { + // @@protoc_insertion_point(field_release:oteldemo.Flag.description) + return _impl_.description_.Release(); +} +inline void Flag::set_allocated_description(std::string* description) { + if (description != nullptr) { + + } else { + + } + _impl_.description_.SetAllocated(description, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.description_.IsDefault()) { + _impl_.description_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.Flag.description) +} + +// bool enabled = 3; +inline void Flag::clear_enabled() { + _impl_.enabled_ = false; +} +inline bool Flag::_internal_enabled() const { + return _impl_.enabled_; +} +inline bool Flag::enabled() const { + // @@protoc_insertion_point(field_get:oteldemo.Flag.enabled) + return _internal_enabled(); +} +inline void Flag::_internal_set_enabled(bool value) { + + _impl_.enabled_ = value; +} +inline void Flag::set_enabled(bool value) { + _internal_set_enabled(value); + // @@protoc_insertion_point(field_set:oteldemo.Flag.enabled) +} + +// ------------------------------------------------------------------- + +// GetFlagRequest + +// string name = 1; +inline void GetFlagRequest::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& GetFlagRequest::name() const { + // @@protoc_insertion_point(field_get:oteldemo.GetFlagRequest.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GetFlagRequest::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.GetFlagRequest.name) +} +inline std::string* GetFlagRequest::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:oteldemo.GetFlagRequest.name) + return _s; +} +inline const std::string& GetFlagRequest::_internal_name() const { + return _impl_.name_.Get(); +} +inline void GetFlagRequest::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* GetFlagRequest::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* GetFlagRequest::release_name() { + // @@protoc_insertion_point(field_release:oteldemo.GetFlagRequest.name) + return _impl_.name_.Release(); +} +inline void GetFlagRequest::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.GetFlagRequest.name) +} + +// ------------------------------------------------------------------- + +// GetFlagResponse + +// .oteldemo.Flag flag = 1; +inline bool GetFlagResponse::_internal_has_flag() const { + return this != internal_default_instance() && _impl_.flag_ != nullptr; +} +inline bool GetFlagResponse::has_flag() const { + return _internal_has_flag(); +} +inline void GetFlagResponse::clear_flag() { + if (GetArenaForAllocation() == nullptr && _impl_.flag_ != nullptr) { + delete _impl_.flag_; + } + _impl_.flag_ = nullptr; +} +inline const ::oteldemo::Flag& GetFlagResponse::_internal_flag() const { + const ::oteldemo::Flag* p = _impl_.flag_; + return p != nullptr ? *p : reinterpret_cast( + ::oteldemo::_Flag_default_instance_); +} +inline const ::oteldemo::Flag& GetFlagResponse::flag() const { + // @@protoc_insertion_point(field_get:oteldemo.GetFlagResponse.flag) + return _internal_flag(); +} +inline void GetFlagResponse::unsafe_arena_set_allocated_flag( + ::oteldemo::Flag* flag) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.flag_); + } + _impl_.flag_ = flag; + if (flag) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:oteldemo.GetFlagResponse.flag) +} +inline ::oteldemo::Flag* GetFlagResponse::release_flag() { + + ::oteldemo::Flag* temp = _impl_.flag_; + _impl_.flag_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::oteldemo::Flag* GetFlagResponse::unsafe_arena_release_flag() { + // @@protoc_insertion_point(field_release:oteldemo.GetFlagResponse.flag) + + ::oteldemo::Flag* temp = _impl_.flag_; + _impl_.flag_ = nullptr; + return temp; +} +inline ::oteldemo::Flag* GetFlagResponse::_internal_mutable_flag() { + + if (_impl_.flag_ == nullptr) { + auto* p = CreateMaybeMessage<::oteldemo::Flag>(GetArenaForAllocation()); + _impl_.flag_ = p; + } + return _impl_.flag_; +} +inline ::oteldemo::Flag* GetFlagResponse::mutable_flag() { + ::oteldemo::Flag* _msg = _internal_mutable_flag(); + // @@protoc_insertion_point(field_mutable:oteldemo.GetFlagResponse.flag) + return _msg; +} +inline void GetFlagResponse::set_allocated_flag(::oteldemo::Flag* flag) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.flag_; + } + if (flag) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(flag); + if (message_arena != submessage_arena) { + flag = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, flag, submessage_arena); + } + + } else { + + } + _impl_.flag_ = flag; + // @@protoc_insertion_point(field_set_allocated:oteldemo.GetFlagResponse.flag) +} + +// ------------------------------------------------------------------- + +// CreateFlagRequest + +// string name = 1; +inline void CreateFlagRequest::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& CreateFlagRequest::name() const { + // @@protoc_insertion_point(field_get:oteldemo.CreateFlagRequest.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CreateFlagRequest::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.CreateFlagRequest.name) +} +inline std::string* CreateFlagRequest::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:oteldemo.CreateFlagRequest.name) + return _s; +} +inline const std::string& CreateFlagRequest::_internal_name() const { + return _impl_.name_.Get(); +} +inline void CreateFlagRequest::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* CreateFlagRequest::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* CreateFlagRequest::release_name() { + // @@protoc_insertion_point(field_release:oteldemo.CreateFlagRequest.name) + return _impl_.name_.Release(); +} +inline void CreateFlagRequest::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.CreateFlagRequest.name) +} + +// string description = 2; +inline void CreateFlagRequest::clear_description() { + _impl_.description_.ClearToEmpty(); +} +inline const std::string& CreateFlagRequest::description() const { + // @@protoc_insertion_point(field_get:oteldemo.CreateFlagRequest.description) + return _internal_description(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CreateFlagRequest::set_description(ArgT0&& arg0, ArgT... args) { + + _impl_.description_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.CreateFlagRequest.description) +} +inline std::string* CreateFlagRequest::mutable_description() { + std::string* _s = _internal_mutable_description(); + // @@protoc_insertion_point(field_mutable:oteldemo.CreateFlagRequest.description) + return _s; +} +inline const std::string& CreateFlagRequest::_internal_description() const { + return _impl_.description_.Get(); +} +inline void CreateFlagRequest::_internal_set_description(const std::string& value) { + + _impl_.description_.Set(value, GetArenaForAllocation()); +} +inline std::string* CreateFlagRequest::_internal_mutable_description() { + + return _impl_.description_.Mutable(GetArenaForAllocation()); +} +inline std::string* CreateFlagRequest::release_description() { + // @@protoc_insertion_point(field_release:oteldemo.CreateFlagRequest.description) + return _impl_.description_.Release(); +} +inline void CreateFlagRequest::set_allocated_description(std::string* description) { + if (description != nullptr) { + + } else { + + } + _impl_.description_.SetAllocated(description, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.description_.IsDefault()) { + _impl_.description_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.CreateFlagRequest.description) +} + +// bool enabled = 3; +inline void CreateFlagRequest::clear_enabled() { + _impl_.enabled_ = false; +} +inline bool CreateFlagRequest::_internal_enabled() const { + return _impl_.enabled_; +} +inline bool CreateFlagRequest::enabled() const { + // @@protoc_insertion_point(field_get:oteldemo.CreateFlagRequest.enabled) + return _internal_enabled(); +} +inline void CreateFlagRequest::_internal_set_enabled(bool value) { + + _impl_.enabled_ = value; +} +inline void CreateFlagRequest::set_enabled(bool value) { + _internal_set_enabled(value); + // @@protoc_insertion_point(field_set:oteldemo.CreateFlagRequest.enabled) +} + +// ------------------------------------------------------------------- + +// CreateFlagResponse + +// .oteldemo.Flag flag = 1; +inline bool CreateFlagResponse::_internal_has_flag() const { + return this != internal_default_instance() && _impl_.flag_ != nullptr; +} +inline bool CreateFlagResponse::has_flag() const { + return _internal_has_flag(); +} +inline void CreateFlagResponse::clear_flag() { + if (GetArenaForAllocation() == nullptr && _impl_.flag_ != nullptr) { + delete _impl_.flag_; + } + _impl_.flag_ = nullptr; +} +inline const ::oteldemo::Flag& CreateFlagResponse::_internal_flag() const { + const ::oteldemo::Flag* p = _impl_.flag_; + return p != nullptr ? *p : reinterpret_cast( + ::oteldemo::_Flag_default_instance_); +} +inline const ::oteldemo::Flag& CreateFlagResponse::flag() const { + // @@protoc_insertion_point(field_get:oteldemo.CreateFlagResponse.flag) + return _internal_flag(); +} +inline void CreateFlagResponse::unsafe_arena_set_allocated_flag( + ::oteldemo::Flag* flag) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.flag_); + } + _impl_.flag_ = flag; + if (flag) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:oteldemo.CreateFlagResponse.flag) +} +inline ::oteldemo::Flag* CreateFlagResponse::release_flag() { + + ::oteldemo::Flag* temp = _impl_.flag_; + _impl_.flag_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::oteldemo::Flag* CreateFlagResponse::unsafe_arena_release_flag() { + // @@protoc_insertion_point(field_release:oteldemo.CreateFlagResponse.flag) + + ::oteldemo::Flag* temp = _impl_.flag_; + _impl_.flag_ = nullptr; + return temp; +} +inline ::oteldemo::Flag* CreateFlagResponse::_internal_mutable_flag() { + + if (_impl_.flag_ == nullptr) { + auto* p = CreateMaybeMessage<::oteldemo::Flag>(GetArenaForAllocation()); + _impl_.flag_ = p; + } + return _impl_.flag_; +} +inline ::oteldemo::Flag* CreateFlagResponse::mutable_flag() { + ::oteldemo::Flag* _msg = _internal_mutable_flag(); + // @@protoc_insertion_point(field_mutable:oteldemo.CreateFlagResponse.flag) + return _msg; +} +inline void CreateFlagResponse::set_allocated_flag(::oteldemo::Flag* flag) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.flag_; + } + if (flag) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(flag); + if (message_arena != submessage_arena) { + flag = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, flag, submessage_arena); + } + + } else { + + } + _impl_.flag_ = flag; + // @@protoc_insertion_point(field_set_allocated:oteldemo.CreateFlagResponse.flag) +} + +// ------------------------------------------------------------------- + +// UpdateFlagRequest + +// string name = 1; +inline void UpdateFlagRequest::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& UpdateFlagRequest::name() const { + // @@protoc_insertion_point(field_get:oteldemo.UpdateFlagRequest.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void UpdateFlagRequest::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.UpdateFlagRequest.name) +} +inline std::string* UpdateFlagRequest::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:oteldemo.UpdateFlagRequest.name) + return _s; +} +inline const std::string& UpdateFlagRequest::_internal_name() const { + return _impl_.name_.Get(); +} +inline void UpdateFlagRequest::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* UpdateFlagRequest::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* UpdateFlagRequest::release_name() { + // @@protoc_insertion_point(field_release:oteldemo.UpdateFlagRequest.name) + return _impl_.name_.Release(); +} +inline void UpdateFlagRequest::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.UpdateFlagRequest.name) +} + +// bool enabled = 2; +inline void UpdateFlagRequest::clear_enabled() { + _impl_.enabled_ = false; +} +inline bool UpdateFlagRequest::_internal_enabled() const { + return _impl_.enabled_; +} +inline bool UpdateFlagRequest::enabled() const { + // @@protoc_insertion_point(field_get:oteldemo.UpdateFlagRequest.enabled) + return _internal_enabled(); +} +inline void UpdateFlagRequest::_internal_set_enabled(bool value) { + + _impl_.enabled_ = value; +} +inline void UpdateFlagRequest::set_enabled(bool value) { + _internal_set_enabled(value); + // @@protoc_insertion_point(field_set:oteldemo.UpdateFlagRequest.enabled) +} + +// ------------------------------------------------------------------- + +// UpdateFlagResponse + +// ------------------------------------------------------------------- + +// ListFlagsRequest + +// ------------------------------------------------------------------- + +// ListFlagsResponse + +// repeated .oteldemo.Flag flag = 1; +inline int ListFlagsResponse::_internal_flag_size() const { + return _impl_.flag_.size(); +} +inline int ListFlagsResponse::flag_size() const { + return _internal_flag_size(); +} +inline void ListFlagsResponse::clear_flag() { + _impl_.flag_.Clear(); +} +inline ::oteldemo::Flag* ListFlagsResponse::mutable_flag(int index) { + // @@protoc_insertion_point(field_mutable:oteldemo.ListFlagsResponse.flag) + return _impl_.flag_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::Flag >* +ListFlagsResponse::mutable_flag() { + // @@protoc_insertion_point(field_mutable_list:oteldemo.ListFlagsResponse.flag) + return &_impl_.flag_; +} +inline const ::oteldemo::Flag& ListFlagsResponse::_internal_flag(int index) const { + return _impl_.flag_.Get(index); +} +inline const ::oteldemo::Flag& ListFlagsResponse::flag(int index) const { + // @@protoc_insertion_point(field_get:oteldemo.ListFlagsResponse.flag) + return _internal_flag(index); +} +inline ::oteldemo::Flag* ListFlagsResponse::_internal_add_flag() { + return _impl_.flag_.Add(); +} +inline ::oteldemo::Flag* ListFlagsResponse::add_flag() { + ::oteldemo::Flag* _add = _internal_add_flag(); + // @@protoc_insertion_point(field_add:oteldemo.ListFlagsResponse.flag) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::oteldemo::Flag >& +ListFlagsResponse::flag() const { + // @@protoc_insertion_point(field_list:oteldemo.ListFlagsResponse.flag) + return _impl_.flag_; +} + +// ------------------------------------------------------------------- + +// DeleteFlagRequest + +// string name = 1; +inline void DeleteFlagRequest::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& DeleteFlagRequest::name() const { + // @@protoc_insertion_point(field_get:oteldemo.DeleteFlagRequest.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DeleteFlagRequest::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.DeleteFlagRequest.name) +} +inline std::string* DeleteFlagRequest::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:oteldemo.DeleteFlagRequest.name) + return _s; +} +inline const std::string& DeleteFlagRequest::_internal_name() const { + return _impl_.name_.Get(); +} +inline void DeleteFlagRequest::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* DeleteFlagRequest::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* DeleteFlagRequest::release_name() { + // @@protoc_insertion_point(field_release:oteldemo.DeleteFlagRequest.name) + return _impl_.name_.Release(); +} +inline void DeleteFlagRequest::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.DeleteFlagRequest.name) +} + +// ------------------------------------------------------------------- + +// DeleteFlagResponse + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace oteldemo + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_demo_2eproto diff --git a/src/currency/build/generated/proto/demo_mock.grpc.pb.h b/src/currency/build/generated/proto/demo_mock.grpc.pb.h new file mode 100644 index 0000000000..e56b23f53a --- /dev/null +++ b/src/currency/build/generated/proto/demo_mock.grpc.pb.h @@ -0,0 +1,119 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: demo.proto + +#ifndef GRPC_MOCK_demo_2eproto__INCLUDED +#define GRPC_MOCK_demo_2eproto__INCLUDED + +#include "demo.pb.h" +#include "demo.grpc.pb.h" + +#include +#include +#include +namespace oteldemo { + +class MockCartServiceStub : public CartService::StubInterface { + public: + MOCK_METHOD3(AddItem, ::grpc::Status(::grpc::ClientContext* context, const ::oteldemo::AddItemRequest& request, ::oteldemo::Empty* response)); + MOCK_METHOD3(AsyncAddItemRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Empty>*(::grpc::ClientContext* context, const ::oteldemo::AddItemRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncAddItemRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Empty>*(::grpc::ClientContext* context, const ::oteldemo::AddItemRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(GetCart, ::grpc::Status(::grpc::ClientContext* context, const ::oteldemo::GetCartRequest& request, ::oteldemo::Cart* response)); + MOCK_METHOD3(AsyncGetCartRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Cart>*(::grpc::ClientContext* context, const ::oteldemo::GetCartRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncGetCartRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Cart>*(::grpc::ClientContext* context, const ::oteldemo::GetCartRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(EmptyCart, ::grpc::Status(::grpc::ClientContext* context, const ::oteldemo::EmptyCartRequest& request, ::oteldemo::Empty* response)); + MOCK_METHOD3(AsyncEmptyCartRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Empty>*(::grpc::ClientContext* context, const ::oteldemo::EmptyCartRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncEmptyCartRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Empty>*(::grpc::ClientContext* context, const ::oteldemo::EmptyCartRequest& request, ::grpc::CompletionQueue* cq)); +}; + +class MockRecommendationServiceStub : public RecommendationService::StubInterface { + public: + MOCK_METHOD3(ListRecommendations, ::grpc::Status(::grpc::ClientContext* context, const ::oteldemo::ListRecommendationsRequest& request, ::oteldemo::ListRecommendationsResponse* response)); + MOCK_METHOD3(AsyncListRecommendationsRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ListRecommendationsResponse>*(::grpc::ClientContext* context, const ::oteldemo::ListRecommendationsRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncListRecommendationsRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ListRecommendationsResponse>*(::grpc::ClientContext* context, const ::oteldemo::ListRecommendationsRequest& request, ::grpc::CompletionQueue* cq)); +}; + +class MockProductCatalogServiceStub : public ProductCatalogService::StubInterface { + public: + MOCK_METHOD3(ListProducts, ::grpc::Status(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::oteldemo::ListProductsResponse* response)); + MOCK_METHOD3(AsyncListProductsRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ListProductsResponse>*(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncListProductsRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ListProductsResponse>*(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(GetProduct, ::grpc::Status(::grpc::ClientContext* context, const ::oteldemo::GetProductRequest& request, ::oteldemo::Product* response)); + MOCK_METHOD3(AsyncGetProductRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Product>*(::grpc::ClientContext* context, const ::oteldemo::GetProductRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncGetProductRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Product>*(::grpc::ClientContext* context, const ::oteldemo::GetProductRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(SearchProducts, ::grpc::Status(::grpc::ClientContext* context, const ::oteldemo::SearchProductsRequest& request, ::oteldemo::SearchProductsResponse* response)); + MOCK_METHOD3(AsyncSearchProductsRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::SearchProductsResponse>*(::grpc::ClientContext* context, const ::oteldemo::SearchProductsRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncSearchProductsRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::SearchProductsResponse>*(::grpc::ClientContext* context, const ::oteldemo::SearchProductsRequest& request, ::grpc::CompletionQueue* cq)); +}; + +class MockShippingServiceStub : public ShippingService::StubInterface { + public: + MOCK_METHOD3(GetQuote, ::grpc::Status(::grpc::ClientContext* context, const ::oteldemo::GetQuoteRequest& request, ::oteldemo::GetQuoteResponse* response)); + MOCK_METHOD3(AsyncGetQuoteRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetQuoteResponse>*(::grpc::ClientContext* context, const ::oteldemo::GetQuoteRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncGetQuoteRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetQuoteResponse>*(::grpc::ClientContext* context, const ::oteldemo::GetQuoteRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(ShipOrder, ::grpc::Status(::grpc::ClientContext* context, const ::oteldemo::ShipOrderRequest& request, ::oteldemo::ShipOrderResponse* response)); + MOCK_METHOD3(AsyncShipOrderRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ShipOrderResponse>*(::grpc::ClientContext* context, const ::oteldemo::ShipOrderRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncShipOrderRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ShipOrderResponse>*(::grpc::ClientContext* context, const ::oteldemo::ShipOrderRequest& request, ::grpc::CompletionQueue* cq)); +}; + +class MockCurrencyServiceStub : public CurrencyService::StubInterface { + public: + MOCK_METHOD3(GetSupportedCurrencies, ::grpc::Status(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::oteldemo::GetSupportedCurrenciesResponse* response)); + MOCK_METHOD3(AsyncGetSupportedCurrenciesRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetSupportedCurrenciesResponse>*(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncGetSupportedCurrenciesRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetSupportedCurrenciesResponse>*(::grpc::ClientContext* context, const ::oteldemo::Empty& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(Convert, ::grpc::Status(::grpc::ClientContext* context, const ::oteldemo::CurrencyConversionRequest& request, ::oteldemo::Money* response)); + MOCK_METHOD3(AsyncConvertRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Money>*(::grpc::ClientContext* context, const ::oteldemo::CurrencyConversionRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncConvertRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Money>*(::grpc::ClientContext* context, const ::oteldemo::CurrencyConversionRequest& request, ::grpc::CompletionQueue* cq)); +}; + +class MockPaymentServiceStub : public PaymentService::StubInterface { + public: + MOCK_METHOD3(Charge, ::grpc::Status(::grpc::ClientContext* context, const ::oteldemo::ChargeRequest& request, ::oteldemo::ChargeResponse* response)); + MOCK_METHOD3(AsyncChargeRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ChargeResponse>*(::grpc::ClientContext* context, const ::oteldemo::ChargeRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncChargeRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ChargeResponse>*(::grpc::ClientContext* context, const ::oteldemo::ChargeRequest& request, ::grpc::CompletionQueue* cq)); +}; + +class MockEmailServiceStub : public EmailService::StubInterface { + public: + MOCK_METHOD3(SendOrderConfirmation, ::grpc::Status(::grpc::ClientContext* context, const ::oteldemo::SendOrderConfirmationRequest& request, ::oteldemo::Empty* response)); + MOCK_METHOD3(AsyncSendOrderConfirmationRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Empty>*(::grpc::ClientContext* context, const ::oteldemo::SendOrderConfirmationRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncSendOrderConfirmationRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::Empty>*(::grpc::ClientContext* context, const ::oteldemo::SendOrderConfirmationRequest& request, ::grpc::CompletionQueue* cq)); +}; + +class MockCheckoutServiceStub : public CheckoutService::StubInterface { + public: + MOCK_METHOD3(PlaceOrder, ::grpc::Status(::grpc::ClientContext* context, const ::oteldemo::PlaceOrderRequest& request, ::oteldemo::PlaceOrderResponse* response)); + MOCK_METHOD3(AsyncPlaceOrderRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::PlaceOrderResponse>*(::grpc::ClientContext* context, const ::oteldemo::PlaceOrderRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncPlaceOrderRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::PlaceOrderResponse>*(::grpc::ClientContext* context, const ::oteldemo::PlaceOrderRequest& request, ::grpc::CompletionQueue* cq)); +}; + +class MockAdServiceStub : public AdService::StubInterface { + public: + MOCK_METHOD3(GetAds, ::grpc::Status(::grpc::ClientContext* context, const ::oteldemo::AdRequest& request, ::oteldemo::AdResponse* response)); + MOCK_METHOD3(AsyncGetAdsRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::AdResponse>*(::grpc::ClientContext* context, const ::oteldemo::AdRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncGetAdsRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::AdResponse>*(::grpc::ClientContext* context, const ::oteldemo::AdRequest& request, ::grpc::CompletionQueue* cq)); +}; + +class MockFeatureFlagServiceStub : public FeatureFlagService::StubInterface { + public: + MOCK_METHOD3(GetFlag, ::grpc::Status(::grpc::ClientContext* context, const ::oteldemo::GetFlagRequest& request, ::oteldemo::GetFlagResponse* response)); + MOCK_METHOD3(AsyncGetFlagRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetFlagResponse>*(::grpc::ClientContext* context, const ::oteldemo::GetFlagRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncGetFlagRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetFlagResponse>*(::grpc::ClientContext* context, const ::oteldemo::GetFlagRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(CreateFlag, ::grpc::Status(::grpc::ClientContext* context, const ::oteldemo::CreateFlagRequest& request, ::oteldemo::CreateFlagResponse* response)); + MOCK_METHOD3(AsyncCreateFlagRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::CreateFlagResponse>*(::grpc::ClientContext* context, const ::oteldemo::CreateFlagRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncCreateFlagRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::CreateFlagResponse>*(::grpc::ClientContext* context, const ::oteldemo::CreateFlagRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(UpdateFlag, ::grpc::Status(::grpc::ClientContext* context, const ::oteldemo::UpdateFlagRequest& request, ::oteldemo::UpdateFlagResponse* response)); + MOCK_METHOD3(AsyncUpdateFlagRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::UpdateFlagResponse>*(::grpc::ClientContext* context, const ::oteldemo::UpdateFlagRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncUpdateFlagRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::UpdateFlagResponse>*(::grpc::ClientContext* context, const ::oteldemo::UpdateFlagRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(ListFlags, ::grpc::Status(::grpc::ClientContext* context, const ::oteldemo::ListFlagsRequest& request, ::oteldemo::ListFlagsResponse* response)); + MOCK_METHOD3(AsyncListFlagsRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ListFlagsResponse>*(::grpc::ClientContext* context, const ::oteldemo::ListFlagsRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncListFlagsRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::ListFlagsResponse>*(::grpc::ClientContext* context, const ::oteldemo::ListFlagsRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(DeleteFlag, ::grpc::Status(::grpc::ClientContext* context, const ::oteldemo::DeleteFlagRequest& request, ::oteldemo::DeleteFlagResponse* response)); + MOCK_METHOD3(AsyncDeleteFlagRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::DeleteFlagResponse>*(::grpc::ClientContext* context, const ::oteldemo::DeleteFlagRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncDeleteFlagRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::DeleteFlagResponse>*(::grpc::ClientContext* context, const ::oteldemo::DeleteFlagRequest& request, ::grpc::CompletionQueue* cq)); +}; + +} // namespace oteldemo + + +#endif // GRPC_MOCK_demo_2eproto__INCLUDED diff --git a/src/currency/build/generated/proto/grpc/health/v1/health.grpc.pb.cc b/src/currency/build/generated/proto/grpc/health/v1/health.grpc.pb.cc new file mode 100644 index 0000000000..18b8401f39 --- /dev/null +++ b/src/currency/build/generated/proto/grpc/health/v1/health.grpc.pb.cc @@ -0,0 +1,90 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: grpc/health/v1/health.proto + +#include "grpc/health/v1/health.pb.h" +#include "grpc/health/v1/health.grpc.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace grpc { +namespace health { +namespace v1 { + +static const char* Health_method_names[] = { + "/grpc.health.v1.Health/Check", +}; + +std::unique_ptr< Health::Stub> Health::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< Health::Stub> stub(new Health::Stub(channel, options)); + return stub; +} + +Health::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) + : channel_(channel), rpcmethod_Check_(Health_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::Status Health::Stub::Check(::grpc::ClientContext* context, const ::grpc::health::v1::HealthCheckRequest& request, ::grpc::health::v1::HealthCheckResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::grpc::health::v1::HealthCheckRequest, ::grpc::health::v1::HealthCheckResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Check_, context, request, response); +} + +void Health::Stub::async::Check(::grpc::ClientContext* context, const ::grpc::health::v1::HealthCheckRequest* request, ::grpc::health::v1::HealthCheckResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::grpc::health::v1::HealthCheckRequest, ::grpc::health::v1::HealthCheckResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Check_, context, request, response, std::move(f)); +} + +void Health::Stub::async::Check(::grpc::ClientContext* context, const ::grpc::health::v1::HealthCheckRequest* request, ::grpc::health::v1::HealthCheckResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Check_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::grpc::health::v1::HealthCheckResponse>* Health::Stub::PrepareAsyncCheckRaw(::grpc::ClientContext* context, const ::grpc::health::v1::HealthCheckRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::grpc::health::v1::HealthCheckResponse, ::grpc::health::v1::HealthCheckRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Check_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::grpc::health::v1::HealthCheckResponse>* Health::Stub::AsyncCheckRaw(::grpc::ClientContext* context, const ::grpc::health::v1::HealthCheckRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncCheckRaw(context, request, cq); + result->StartCall(); + return result; +} + +Health::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + Health_method_names[0], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< Health::Service, ::grpc::health::v1::HealthCheckRequest, ::grpc::health::v1::HealthCheckResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](Health::Service* service, + ::grpc::ServerContext* ctx, + const ::grpc::health::v1::HealthCheckRequest* req, + ::grpc::health::v1::HealthCheckResponse* resp) { + return service->Check(ctx, req, resp); + }, this))); +} + +Health::Service::~Service() { +} + +::grpc::Status Health::Service::Check(::grpc::ServerContext* context, const ::grpc::health::v1::HealthCheckRequest* request, ::grpc::health::v1::HealthCheckResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +} // namespace grpc +} // namespace health +} // namespace v1 + diff --git a/src/currency/build/generated/proto/grpc/health/v1/health.grpc.pb.h b/src/currency/build/generated/proto/grpc/health/v1/health.grpc.pb.h new file mode 100644 index 0000000000..8303925196 --- /dev/null +++ b/src/currency/build/generated/proto/grpc/health/v1/health.grpc.pb.h @@ -0,0 +1,262 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: grpc/health/v1/health.proto +// Original file comments: +// Copyright 2015 The gRPC Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// The canonical version of this proto can be found at +// https://github.com/grpc/grpc-proto/blob/master/grpc/health/v1/health.proto +// +#ifndef GRPC_grpc_2fhealth_2fv1_2fhealth_2eproto__INCLUDED +#define GRPC_grpc_2fhealth_2fv1_2fhealth_2eproto__INCLUDED + +#include "grpc/health/v1/health.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace grpc { +namespace health { +namespace v1 { + +class Health final { + public: + static constexpr char const* service_full_name() { + return "grpc.health.v1.Health"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + virtual ::grpc::Status Check(::grpc::ClientContext* context, const ::grpc::health::v1::HealthCheckRequest& request, ::grpc::health::v1::HealthCheckResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::health::v1::HealthCheckResponse>> AsyncCheck(::grpc::ClientContext* context, const ::grpc::health::v1::HealthCheckRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::health::v1::HealthCheckResponse>>(AsyncCheckRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::health::v1::HealthCheckResponse>> PrepareAsyncCheck(::grpc::ClientContext* context, const ::grpc::health::v1::HealthCheckRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::health::v1::HealthCheckResponse>>(PrepareAsyncCheckRaw(context, request, cq)); + } + class async_interface { + public: + virtual ~async_interface() {} + virtual void Check(::grpc::ClientContext* context, const ::grpc::health::v1::HealthCheckRequest* request, ::grpc::health::v1::HealthCheckResponse* response, std::function) = 0; + virtual void Check(::grpc::ClientContext* context, const ::grpc::health::v1::HealthCheckRequest* request, ::grpc::health::v1::HealthCheckResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + }; + typedef class async_interface experimental_async_interface; + virtual class async_interface* async() { return nullptr; } + class async_interface* experimental_async() { return async(); } + private: + virtual ::grpc::ClientAsyncResponseReaderInterface< ::grpc::health::v1::HealthCheckResponse>* AsyncCheckRaw(::grpc::ClientContext* context, const ::grpc::health::v1::HealthCheckRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::grpc::health::v1::HealthCheckResponse>* PrepareAsyncCheckRaw(::grpc::ClientContext* context, const ::grpc::health::v1::HealthCheckRequest& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + ::grpc::Status Check(::grpc::ClientContext* context, const ::grpc::health::v1::HealthCheckRequest& request, ::grpc::health::v1::HealthCheckResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::health::v1::HealthCheckResponse>> AsyncCheck(::grpc::ClientContext* context, const ::grpc::health::v1::HealthCheckRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::health::v1::HealthCheckResponse>>(AsyncCheckRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::health::v1::HealthCheckResponse>> PrepareAsyncCheck(::grpc::ClientContext* context, const ::grpc::health::v1::HealthCheckRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::health::v1::HealthCheckResponse>>(PrepareAsyncCheckRaw(context, request, cq)); + } + class async final : + public StubInterface::async_interface { + public: + void Check(::grpc::ClientContext* context, const ::grpc::health::v1::HealthCheckRequest* request, ::grpc::health::v1::HealthCheckResponse* response, std::function) override; + void Check(::grpc::ClientContext* context, const ::grpc::health::v1::HealthCheckRequest* request, ::grpc::health::v1::HealthCheckResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + private: + friend class Stub; + explicit async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class async* async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class async async_stub_{this}; + ::grpc::ClientAsyncResponseReader< ::grpc::health::v1::HealthCheckResponse>* AsyncCheckRaw(::grpc::ClientContext* context, const ::grpc::health::v1::HealthCheckRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::grpc::health::v1::HealthCheckResponse>* PrepareAsyncCheckRaw(::grpc::ClientContext* context, const ::grpc::health::v1::HealthCheckRequest& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_Check_; + }; + 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(); + virtual ::grpc::Status Check(::grpc::ServerContext* context, const ::grpc::health::v1::HealthCheckRequest* request, ::grpc::health::v1::HealthCheckResponse* response); + }; + template + class WithAsyncMethod_Check : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_Check() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_Check() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Check(::grpc::ServerContext* /*context*/, const ::grpc::health::v1::HealthCheckRequest* /*request*/, ::grpc::health::v1::HealthCheckResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestCheck(::grpc::ServerContext* context, ::grpc::health::v1::HealthCheckRequest* request, ::grpc::ServerAsyncResponseWriter< ::grpc::health::v1::HealthCheckResponse>* 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); + } + }; + typedef WithAsyncMethod_Check AsyncService; + template + class WithCallbackMethod_Check : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_Check() { + ::grpc::Service::MarkMethodCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::health::v1::HealthCheckRequest, ::grpc::health::v1::HealthCheckResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::health::v1::HealthCheckRequest* request, ::grpc::health::v1::HealthCheckResponse* response) { return this->Check(context, request, response); }));} + void SetMessageAllocatorFor_Check( + ::grpc::MessageAllocator< ::grpc::health::v1::HealthCheckRequest, ::grpc::health::v1::HealthCheckResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); + static_cast<::grpc::internal::CallbackUnaryHandler< ::grpc::health::v1::HealthCheckRequest, ::grpc::health::v1::HealthCheckResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_Check() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Check(::grpc::ServerContext* /*context*/, const ::grpc::health::v1::HealthCheckRequest* /*request*/, ::grpc::health::v1::HealthCheckResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* Check( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::health::v1::HealthCheckRequest* /*request*/, ::grpc::health::v1::HealthCheckResponse* /*response*/) { return nullptr; } + }; + typedef WithCallbackMethod_Check CallbackService; + typedef CallbackService ExperimentalCallbackService; + template + class WithGenericMethod_Check : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_Check() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_Check() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Check(::grpc::ServerContext* /*context*/, const ::grpc::health::v1::HealthCheckRequest* /*request*/, ::grpc::health::v1::HealthCheckResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_Check : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_Check() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_Check() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Check(::grpc::ServerContext* /*context*/, const ::grpc::health::v1::HealthCheckRequest* /*request*/, ::grpc::health::v1::HealthCheckResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestCheck(::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 WithRawCallbackMethod_Check : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_Check() { + ::grpc::Service::MarkMethodRawCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Check(context, request, response); })); + } + ~WithRawCallbackMethod_Check() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Check(::grpc::ServerContext* /*context*/, const ::grpc::health::v1::HealthCheckRequest* /*request*/, ::grpc::health::v1::HealthCheckResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* Check( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithStreamedUnaryMethod_Check : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_Check() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::StreamedUnaryHandler< + ::grpc::health::v1::HealthCheckRequest, ::grpc::health::v1::HealthCheckResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::grpc::health::v1::HealthCheckRequest, ::grpc::health::v1::HealthCheckResponse>* streamer) { + return this->StreamedCheck(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_Check() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status Check(::grpc::ServerContext* /*context*/, const ::grpc::health::v1::HealthCheckRequest* /*request*/, ::grpc::health::v1::HealthCheckResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedCheck(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::grpc::health::v1::HealthCheckRequest,::grpc::health::v1::HealthCheckResponse>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_Check StreamedUnaryService; + typedef Service SplitStreamedService; + typedef WithStreamedUnaryMethod_Check StreamedService; +}; + +} // namespace v1 +} // namespace health +} // namespace grpc + + +#endif // GRPC_grpc_2fhealth_2fv1_2fhealth_2eproto__INCLUDED diff --git a/src/currency/build/generated/proto/grpc/health/v1/health.pb.cc b/src/currency/build/generated/proto/grpc/health/v1/health.pb.cc new file mode 100644 index 0000000000..d6fbf95a7b --- /dev/null +++ b/src/currency/build/generated/proto/grpc/health/v1/health.pb.cc @@ -0,0 +1,540 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/health/v1/health.proto + +#include "grpc/health/v1/health.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG + +namespace _pb = ::PROTOBUF_NAMESPACE_ID; +namespace _pbi = _pb::internal; + +namespace grpc { +namespace health { +namespace v1 { +PROTOBUF_CONSTEXPR HealthCheckRequest::HealthCheckRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.service_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct HealthCheckRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR HealthCheckRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~HealthCheckRequestDefaultTypeInternal() {} + union { + HealthCheckRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HealthCheckRequestDefaultTypeInternal _HealthCheckRequest_default_instance_; +PROTOBUF_CONSTEXPR HealthCheckResponse::HealthCheckResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.status_)*/0 + , /*decltype(_impl_._cached_size_)*/{}} {} +struct HealthCheckResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR HealthCheckResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~HealthCheckResponseDefaultTypeInternal() {} + union { + HealthCheckResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HealthCheckResponseDefaultTypeInternal _HealthCheckResponse_default_instance_; +} // namespace v1 +} // namespace health +} // namespace grpc +static ::_pb::Metadata file_level_metadata_grpc_2fhealth_2fv1_2fhealth_2eproto[2]; +static const ::_pb::EnumDescriptor* file_level_enum_descriptors_grpc_2fhealth_2fv1_2fhealth_2eproto[1]; +static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_grpc_2fhealth_2fv1_2fhealth_2eproto = nullptr; + +const uint32_t TableStruct_grpc_2fhealth_2fv1_2fhealth_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::grpc::health::v1::HealthCheckRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::grpc::health::v1::HealthCheckRequest, _impl_.service_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::grpc::health::v1::HealthCheckResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::grpc::health::v1::HealthCheckResponse, _impl_.status_), +}; +static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, -1, sizeof(::grpc::health::v1::HealthCheckRequest)}, + { 7, -1, -1, sizeof(::grpc::health::v1::HealthCheckResponse)}, +}; + +static const ::_pb::Message* const file_default_instances[] = { + &::grpc::health::v1::_HealthCheckRequest_default_instance_._instance, + &::grpc::health::v1::_HealthCheckResponse_default_instance_._instance, +}; + +const char descriptor_table_protodef_grpc_2fhealth_2fv1_2fhealth_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\033grpc/health/v1/health.proto\022\016grpc.heal" + "th.v1\"%\n\022HealthCheckRequest\022\017\n\007service\030\001" + " \001(\t\"\224\001\n\023HealthCheckResponse\022A\n\006status\030\001" + " \001(\01621.grpc.health.v1.HealthCheckRespons" + "e.ServingStatus\":\n\rServingStatus\022\013\n\007UNKN" + "OWN\020\000\022\013\n\007SERVING\020\001\022\017\n\013NOT_SERVING\020\0022Z\n\006H" + "ealth\022P\n\005Check\022\".grpc.health.v1.HealthCh" + "eckRequest\032#.grpc.health.v1.HealthCheckR" + "esponseBa\n\021io.grpc.health.v1B\013HealthProt" + "oP\001Z,google.golang.org/grpc/health/grpc_" + "health_v1\252\002\016Grpc.Health.V1b\006proto3" + ; +static ::_pbi::once_flag descriptor_table_grpc_2fhealth_2fv1_2fhealth_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_grpc_2fhealth_2fv1_2fhealth_2eproto = { + false, false, 434, descriptor_table_protodef_grpc_2fhealth_2fv1_2fhealth_2eproto, + "grpc/health/v1/health.proto", + &descriptor_table_grpc_2fhealth_2fv1_2fhealth_2eproto_once, nullptr, 0, 2, + schemas, file_default_instances, TableStruct_grpc_2fhealth_2fv1_2fhealth_2eproto::offsets, + file_level_metadata_grpc_2fhealth_2fv1_2fhealth_2eproto, file_level_enum_descriptors_grpc_2fhealth_2fv1_2fhealth_2eproto, + file_level_service_descriptors_grpc_2fhealth_2fv1_2fhealth_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_grpc_2fhealth_2fv1_2fhealth_2eproto_getter() { + return &descriptor_table_grpc_2fhealth_2fv1_2fhealth_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_grpc_2fhealth_2fv1_2fhealth_2eproto(&descriptor_table_grpc_2fhealth_2fv1_2fhealth_2eproto); +namespace grpc { +namespace health { +namespace v1 { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* HealthCheckResponse_ServingStatus_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_grpc_2fhealth_2fv1_2fhealth_2eproto); + return file_level_enum_descriptors_grpc_2fhealth_2fv1_2fhealth_2eproto[0]; +} +bool HealthCheckResponse_ServingStatus_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr HealthCheckResponse_ServingStatus HealthCheckResponse::UNKNOWN; +constexpr HealthCheckResponse_ServingStatus HealthCheckResponse::SERVING; +constexpr HealthCheckResponse_ServingStatus HealthCheckResponse::NOT_SERVING; +constexpr HealthCheckResponse_ServingStatus HealthCheckResponse::ServingStatus_MIN; +constexpr HealthCheckResponse_ServingStatus HealthCheckResponse::ServingStatus_MAX; +constexpr int HealthCheckResponse::ServingStatus_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) + +// =================================================================== + +class HealthCheckRequest::_Internal { + public: +}; + +HealthCheckRequest::HealthCheckRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:grpc.health.v1.HealthCheckRequest) +} +HealthCheckRequest::HealthCheckRequest(const HealthCheckRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + HealthCheckRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.service_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.service_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.service_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_service().empty()) { + _this->_impl_.service_.Set(from._internal_service(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:grpc.health.v1.HealthCheckRequest) +} + +inline void HealthCheckRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.service_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.service_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.service_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +HealthCheckRequest::~HealthCheckRequest() { + // @@protoc_insertion_point(destructor:grpc.health.v1.HealthCheckRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void HealthCheckRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.service_.Destroy(); +} + +void HealthCheckRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void HealthCheckRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:grpc.health.v1.HealthCheckRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.service_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* HealthCheckRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string service = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_service(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "grpc.health.v1.HealthCheckRequest.service")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* HealthCheckRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:grpc.health.v1.HealthCheckRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string service = 1; + if (!this->_internal_service().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_service().data(), static_cast(this->_internal_service().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "grpc.health.v1.HealthCheckRequest.service"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_service(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:grpc.health.v1.HealthCheckRequest) + return target; +} + +size_t HealthCheckRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:grpc.health.v1.HealthCheckRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string service = 1; + if (!this->_internal_service().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_service()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData HealthCheckRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + HealthCheckRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*HealthCheckRequest::GetClassData() const { return &_class_data_; } + + +void HealthCheckRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:grpc.health.v1.HealthCheckRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_service().empty()) { + _this->_internal_set_service(from._internal_service()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void HealthCheckRequest::CopyFrom(const HealthCheckRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:grpc.health.v1.HealthCheckRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool HealthCheckRequest::IsInitialized() const { + return true; +} + +void HealthCheckRequest::InternalSwap(HealthCheckRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.service_, lhs_arena, + &other->_impl_.service_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata HealthCheckRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_grpc_2fhealth_2fv1_2fhealth_2eproto_getter, &descriptor_table_grpc_2fhealth_2fv1_2fhealth_2eproto_once, + file_level_metadata_grpc_2fhealth_2fv1_2fhealth_2eproto[0]); +} + +// =================================================================== + +class HealthCheckResponse::_Internal { + public: +}; + +HealthCheckResponse::HealthCheckResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:grpc.health.v1.HealthCheckResponse) +} +HealthCheckResponse::HealthCheckResponse(const HealthCheckResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + HealthCheckResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.status_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_impl_.status_ = from._impl_.status_; + // @@protoc_insertion_point(copy_constructor:grpc.health.v1.HealthCheckResponse) +} + +inline void HealthCheckResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.status_){0} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +HealthCheckResponse::~HealthCheckResponse() { + // @@protoc_insertion_point(destructor:grpc.health.v1.HealthCheckResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void HealthCheckResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void HealthCheckResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void HealthCheckResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:grpc.health.v1.HealthCheckResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.status_ = 0; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* HealthCheckResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_status(static_cast<::grpc::health::v1::HealthCheckResponse_ServingStatus>(val)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* HealthCheckResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:grpc.health.v1.HealthCheckResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1; + if (this->_internal_status() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this->_internal_status(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:grpc.health.v1.HealthCheckResponse) + return target; +} + +size_t HealthCheckResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:grpc.health.v1.HealthCheckResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1; + if (this->_internal_status() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_status()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData HealthCheckResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + HealthCheckResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*HealthCheckResponse::GetClassData() const { return &_class_data_; } + + +void HealthCheckResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:grpc.health.v1.HealthCheckResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_status() != 0) { + _this->_internal_set_status(from._internal_status()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void HealthCheckResponse::CopyFrom(const HealthCheckResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:grpc.health.v1.HealthCheckResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool HealthCheckResponse::IsInitialized() const { + return true; +} + +void HealthCheckResponse::InternalSwap(HealthCheckResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.status_, other->_impl_.status_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata HealthCheckResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_grpc_2fhealth_2fv1_2fhealth_2eproto_getter, &descriptor_table_grpc_2fhealth_2fv1_2fhealth_2eproto_once, + file_level_metadata_grpc_2fhealth_2fv1_2fhealth_2eproto[1]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace v1 +} // namespace health +} // namespace grpc +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::grpc::health::v1::HealthCheckRequest* +Arena::CreateMaybeMessage< ::grpc::health::v1::HealthCheckRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::grpc::health::v1::HealthCheckRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::grpc::health::v1::HealthCheckResponse* +Arena::CreateMaybeMessage< ::grpc::health::v1::HealthCheckResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::grpc::health::v1::HealthCheckResponse >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/src/currency/build/generated/proto/grpc/health/v1/health.pb.h b/src/currency/build/generated/proto/grpc/health/v1/health.pb.h new file mode 100644 index 0000000000..8771623577 --- /dev/null +++ b/src/currency/build/generated/proto/grpc/health/v1/health.pb.h @@ -0,0 +1,537 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/health/v1/health.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_grpc_2fhealth_2fv1_2fhealth_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_grpc_2fhealth_2fv1_2fhealth_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#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 3021012 < 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 // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_grpc_2fhealth_2fv1_2fhealth_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_grpc_2fhealth_2fv1_2fhealth_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_grpc_2fhealth_2fv1_2fhealth_2eproto; +namespace grpc { +namespace health { +namespace v1 { +class HealthCheckRequest; +struct HealthCheckRequestDefaultTypeInternal; +extern HealthCheckRequestDefaultTypeInternal _HealthCheckRequest_default_instance_; +class HealthCheckResponse; +struct HealthCheckResponseDefaultTypeInternal; +extern HealthCheckResponseDefaultTypeInternal _HealthCheckResponse_default_instance_; +} // namespace v1 +} // namespace health +} // namespace grpc +PROTOBUF_NAMESPACE_OPEN +template<> ::grpc::health::v1::HealthCheckRequest* Arena::CreateMaybeMessage<::grpc::health::v1::HealthCheckRequest>(Arena*); +template<> ::grpc::health::v1::HealthCheckResponse* Arena::CreateMaybeMessage<::grpc::health::v1::HealthCheckResponse>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace grpc { +namespace health { +namespace v1 { + +enum HealthCheckResponse_ServingStatus : int { + HealthCheckResponse_ServingStatus_UNKNOWN = 0, + HealthCheckResponse_ServingStatus_SERVING = 1, + HealthCheckResponse_ServingStatus_NOT_SERVING = 2, + HealthCheckResponse_ServingStatus_HealthCheckResponse_ServingStatus_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + HealthCheckResponse_ServingStatus_HealthCheckResponse_ServingStatus_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool HealthCheckResponse_ServingStatus_IsValid(int value); +constexpr HealthCheckResponse_ServingStatus HealthCheckResponse_ServingStatus_ServingStatus_MIN = HealthCheckResponse_ServingStatus_UNKNOWN; +constexpr HealthCheckResponse_ServingStatus HealthCheckResponse_ServingStatus_ServingStatus_MAX = HealthCheckResponse_ServingStatus_NOT_SERVING; +constexpr int HealthCheckResponse_ServingStatus_ServingStatus_ARRAYSIZE = HealthCheckResponse_ServingStatus_ServingStatus_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* HealthCheckResponse_ServingStatus_descriptor(); +template +inline const std::string& HealthCheckResponse_ServingStatus_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function HealthCheckResponse_ServingStatus_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + HealthCheckResponse_ServingStatus_descriptor(), enum_t_value); +} +inline bool HealthCheckResponse_ServingStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, HealthCheckResponse_ServingStatus* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + HealthCheckResponse_ServingStatus_descriptor(), name, value); +} +// =================================================================== + +class HealthCheckRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:grpc.health.v1.HealthCheckRequest) */ { + public: + inline HealthCheckRequest() : HealthCheckRequest(nullptr) {} + ~HealthCheckRequest() override; + explicit PROTOBUF_CONSTEXPR HealthCheckRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + HealthCheckRequest(const HealthCheckRequest& from); + HealthCheckRequest(HealthCheckRequest&& from) noexcept + : HealthCheckRequest() { + *this = ::std::move(from); + } + + inline HealthCheckRequest& operator=(const HealthCheckRequest& from) { + CopyFrom(from); + return *this; + } + inline HealthCheckRequest& operator=(HealthCheckRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const HealthCheckRequest& default_instance() { + return *internal_default_instance(); + } + static inline const HealthCheckRequest* internal_default_instance() { + return reinterpret_cast( + &_HealthCheckRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(HealthCheckRequest& a, HealthCheckRequest& b) { + a.Swap(&b); + } + inline void Swap(HealthCheckRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(HealthCheckRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + HealthCheckRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const HealthCheckRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const HealthCheckRequest& from) { + HealthCheckRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(HealthCheckRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "grpc.health.v1.HealthCheckRequest"; + } + protected: + explicit HealthCheckRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kServiceFieldNumber = 1, + }; + // string service = 1; + void clear_service(); + const std::string& service() const; + template + void set_service(ArgT0&& arg0, ArgT... args); + std::string* mutable_service(); + PROTOBUF_NODISCARD std::string* release_service(); + void set_allocated_service(std::string* service); + private: + const std::string& _internal_service() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_service(const std::string& value); + std::string* _internal_mutable_service(); + public: + + // @@protoc_insertion_point(class_scope:grpc.health.v1.HealthCheckRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr service_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_grpc_2fhealth_2fv1_2fhealth_2eproto; +}; +// ------------------------------------------------------------------- + +class HealthCheckResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:grpc.health.v1.HealthCheckResponse) */ { + public: + inline HealthCheckResponse() : HealthCheckResponse(nullptr) {} + ~HealthCheckResponse() override; + explicit PROTOBUF_CONSTEXPR HealthCheckResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + HealthCheckResponse(const HealthCheckResponse& from); + HealthCheckResponse(HealthCheckResponse&& from) noexcept + : HealthCheckResponse() { + *this = ::std::move(from); + } + + inline HealthCheckResponse& operator=(const HealthCheckResponse& from) { + CopyFrom(from); + return *this; + } + inline HealthCheckResponse& operator=(HealthCheckResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const HealthCheckResponse& default_instance() { + return *internal_default_instance(); + } + static inline const HealthCheckResponse* internal_default_instance() { + return reinterpret_cast( + &_HealthCheckResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(HealthCheckResponse& a, HealthCheckResponse& b) { + a.Swap(&b); + } + inline void Swap(HealthCheckResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(HealthCheckResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + HealthCheckResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const HealthCheckResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const HealthCheckResponse& from) { + HealthCheckResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + 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; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(HealthCheckResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "grpc.health.v1.HealthCheckResponse"; + } + protected: + explicit HealthCheckResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef HealthCheckResponse_ServingStatus ServingStatus; + static constexpr ServingStatus UNKNOWN = + HealthCheckResponse_ServingStatus_UNKNOWN; + static constexpr ServingStatus SERVING = + HealthCheckResponse_ServingStatus_SERVING; + static constexpr ServingStatus NOT_SERVING = + HealthCheckResponse_ServingStatus_NOT_SERVING; + static inline bool ServingStatus_IsValid(int value) { + return HealthCheckResponse_ServingStatus_IsValid(value); + } + static constexpr ServingStatus ServingStatus_MIN = + HealthCheckResponse_ServingStatus_ServingStatus_MIN; + static constexpr ServingStatus ServingStatus_MAX = + HealthCheckResponse_ServingStatus_ServingStatus_MAX; + static constexpr int ServingStatus_ARRAYSIZE = + HealthCheckResponse_ServingStatus_ServingStatus_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + ServingStatus_descriptor() { + return HealthCheckResponse_ServingStatus_descriptor(); + } + template + static inline const std::string& ServingStatus_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ServingStatus_Name."); + return HealthCheckResponse_ServingStatus_Name(enum_t_value); + } + static inline bool ServingStatus_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + ServingStatus* value) { + return HealthCheckResponse_ServingStatus_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kStatusFieldNumber = 1, + }; + // .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1; + void clear_status(); + ::grpc::health::v1::HealthCheckResponse_ServingStatus status() const; + void set_status(::grpc::health::v1::HealthCheckResponse_ServingStatus value); + private: + ::grpc::health::v1::HealthCheckResponse_ServingStatus _internal_status() const; + void _internal_set_status(::grpc::health::v1::HealthCheckResponse_ServingStatus value); + public: + + // @@protoc_insertion_point(class_scope:grpc.health.v1.HealthCheckResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int status_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_grpc_2fhealth_2fv1_2fhealth_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// HealthCheckRequest + +// string service = 1; +inline void HealthCheckRequest::clear_service() { + _impl_.service_.ClearToEmpty(); +} +inline const std::string& HealthCheckRequest::service() const { + // @@protoc_insertion_point(field_get:grpc.health.v1.HealthCheckRequest.service) + return _internal_service(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void HealthCheckRequest::set_service(ArgT0&& arg0, ArgT... args) { + + _impl_.service_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:grpc.health.v1.HealthCheckRequest.service) +} +inline std::string* HealthCheckRequest::mutable_service() { + std::string* _s = _internal_mutable_service(); + // @@protoc_insertion_point(field_mutable:grpc.health.v1.HealthCheckRequest.service) + return _s; +} +inline const std::string& HealthCheckRequest::_internal_service() const { + return _impl_.service_.Get(); +} +inline void HealthCheckRequest::_internal_set_service(const std::string& value) { + + _impl_.service_.Set(value, GetArenaForAllocation()); +} +inline std::string* HealthCheckRequest::_internal_mutable_service() { + + return _impl_.service_.Mutable(GetArenaForAllocation()); +} +inline std::string* HealthCheckRequest::release_service() { + // @@protoc_insertion_point(field_release:grpc.health.v1.HealthCheckRequest.service) + return _impl_.service_.Release(); +} +inline void HealthCheckRequest::set_allocated_service(std::string* service) { + if (service != nullptr) { + + } else { + + } + _impl_.service_.SetAllocated(service, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.service_.IsDefault()) { + _impl_.service_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:grpc.health.v1.HealthCheckRequest.service) +} + +// ------------------------------------------------------------------- + +// HealthCheckResponse + +// .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1; +inline void HealthCheckResponse::clear_status() { + _impl_.status_ = 0; +} +inline ::grpc::health::v1::HealthCheckResponse_ServingStatus HealthCheckResponse::_internal_status() const { + return static_cast< ::grpc::health::v1::HealthCheckResponse_ServingStatus >(_impl_.status_); +} +inline ::grpc::health::v1::HealthCheckResponse_ServingStatus HealthCheckResponse::status() const { + // @@protoc_insertion_point(field_get:grpc.health.v1.HealthCheckResponse.status) + return _internal_status(); +} +inline void HealthCheckResponse::_internal_set_status(::grpc::health::v1::HealthCheckResponse_ServingStatus value) { + + _impl_.status_ = value; +} +inline void HealthCheckResponse::set_status(::grpc::health::v1::HealthCheckResponse_ServingStatus value) { + _internal_set_status(value); + // @@protoc_insertion_point(field_set:grpc.health.v1.HealthCheckResponse.status) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace v1 +} // namespace health +} // namespace grpc + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::grpc::health::v1::HealthCheckResponse_ServingStatus> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::grpc::health::v1::HealthCheckResponse_ServingStatus>() { + return ::grpc::health::v1::HealthCheckResponse_ServingStatus_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_grpc_2fhealth_2fv1_2fhealth_2eproto diff --git a/src/currency/build/generated/proto/grpc/health/v1/health_mock.grpc.pb.h b/src/currency/build/generated/proto/grpc/health/v1/health_mock.grpc.pb.h new file mode 100644 index 0000000000..69e827a425 --- /dev/null +++ b/src/currency/build/generated/proto/grpc/health/v1/health_mock.grpc.pb.h @@ -0,0 +1,30 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: grpc/health/v1/health.proto + +#ifndef GRPC_MOCK_grpc_2fhealth_2fv1_2fhealth_2eproto__INCLUDED +#define GRPC_MOCK_grpc_2fhealth_2fv1_2fhealth_2eproto__INCLUDED + +#include "grpc/health/v1/health.pb.h" +#include "grpc/health/v1/health.grpc.pb.h" + +#include +#include +#include +namespace grpc { +namespace health { +namespace v1 { + +class MockHealthStub : public Health::StubInterface { + public: + MOCK_METHOD3(Check, ::grpc::Status(::grpc::ClientContext* context, const ::grpc::health::v1::HealthCheckRequest& request, ::grpc::health::v1::HealthCheckResponse* response)); + MOCK_METHOD3(AsyncCheckRaw, ::grpc::ClientAsyncResponseReaderInterface< ::grpc::health::v1::HealthCheckResponse>*(::grpc::ClientContext* context, const ::grpc::health::v1::HealthCheckRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncCheckRaw, ::grpc::ClientAsyncResponseReaderInterface< ::grpc::health::v1::HealthCheckResponse>*(::grpc::ClientContext* context, const ::grpc::health::v1::HealthCheckRequest& request, ::grpc::CompletionQueue* cq)); +}; + +} // namespace v1 +} // namespace health +} // namespace grpc + + +#endif // GRPC_MOCK_grpc_2fhealth_2fv1_2fhealth_2eproto__INCLUDED diff --git a/src/currency/genproto/CMakeLists.txt b/src/currency/genproto/CMakeLists.txt new file mode 100644 index 0000000000..3b36a349ff --- /dev/null +++ b/src/currency/genproto/CMakeLists.txt @@ -0,0 +1,59 @@ +cmake_minimum_required(VERSION 3.1) +project(currency-proto) + +find_package(Protobuf REQUIRED) +find_package(gRPC CONFIG REQUIRED) + +set(PROTO_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../proto") +set(GENERATED_PROTOBUF_PATH "${CMAKE_BINARY_DIR}/generated/proto") +set(GENERATED_HEALTH_PROTOBUF_PATH "${GENERATED_PROTOBUF_PATH}/grpc/health/v1") + +file(MAKE_DIRECTORY "${GENERATED_PROTOBUF_PATH}") + +set(DEMO_PROTO "${PROTO_PATH}/demo.proto") +set(DEMO_PB_CPP_FILE "${GENERATED_PROTOBUF_PATH}/demo.pb.cc") +set(DEMO_PB_H_FILE "${GENERATED_PROTOBUF_PATH}/demo.pb.h") +set(DEMO_GRPC_PB_CPP_FILE "${GENERATED_PROTOBUF_PATH}/demo.grpc.pb.cc") +set(DEMO_GRPC_PB_H_FILE "${GENERATED_PROTOBUF_PATH}/demo.grpc.pb.h") +set(HEALTH_PROTO "${PROTO_PATH}/grpc/health/v1/health.proto") +set(HEALTH_PB_CPP_FILE "${GENERATED_HEALTH_PROTOBUF_PATH}/health.pb.cc") +set(HEALTH_PB_H_FILE "${GENERATED_HEALTH_PROTOBUF_PATH}/health.pb.h") +set(HEALTH_GRPC_PB_CPP_FILE "${GENERATED_HEALTH_PROTOBUF_PATH}/health.grpc.pb.cc") +set(HEALTH_GRPC_PB_H_FILE "${GENERATED_HEALTH_PROTOBUF_PATH}/health.grpc.pb.h") + +foreach(IMPORT_DIR ${PROTOBUF_IMPORT_DIRS}) + list(APPEND PROTOBUF_INCLUDE_FLAGS "-I${IMPORT_DIR}") +endforeach() + +find_program(gRPC_CPP_PLUGIN_EXECUTABLE grpc_cpp_plugin) + +add_custom_command( + OUTPUT ${DEMO_PB_H_FILE} + ${DEMO_PB_CPP_FILE} + ${DEMO_GRPC_PB_CPP_FILE} + ${DEMO_GRPC_PB_H_FILE} + ${HEALTH_PB_H_FILE} + ${HEALTH_PB_CPP_FILE} + ${HEALTH_GRPC_PB_CPP_FILE} + ${HEALTH_GRPC_PB_H_FILE} + + COMMAND + ${PROTOBUF_PROTOC_EXECUTABLE} ARGS "--experimental_allow_proto3_optional" + "--proto_path=${PROTO_PATH}" ${PROTOBUF_INCLUDE_FLAGS} + "--cpp_out=${GENERATED_PROTOBUF_PATH}" + "--grpc_out=generate_mock_code=true:${GENERATED_PROTOBUF_PATH}" + --plugin=protoc-gen-grpc="${gRPC_CPP_PLUGIN_EXECUTABLE}" ${DEMO_PROTO} ${HEALTH_PROTO}) + +message(STATUS "gRPC_CPP_PLUGIN_EXECUTABLE=${gRPC_CPP_PLUGIN_EXECUTABLE}") + +add_library(demo-proto ${DEMO_PB_H_FILE} + ${DEMO_PB_CPP_FILE} + ${DEMO_GRPC_PB_CPP_FILE} + ${DEMO_GRPC_PB_H_FILE} + ${HEALTH_PB_H_FILE} + ${HEALTH_PB_CPP_FILE} + ${HEALTH_GRPC_PB_CPP_FILE} + ${HEALTH_GRPC_PB_H_FILE}) + +target_link_libraries(demo-proto gRPC::grpc++ protobuf::libprotobuf) +include_directories("${GENERATED_PROTOBUF_PATH}" ) diff --git a/src/currency/genproto/Dockerfile b/src/currency/genproto/Dockerfile new file mode 100644 index 0000000000..fd92008f02 --- /dev/null +++ b/src/currency/genproto/Dockerfile @@ -0,0 +1,27 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2023 The OpenTelemetry Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM alpine:3.18 AS builder + +RUN apk update && apk add git cmake make g++ grpc-dev protobuf-dev linux-headers + +COPY ./src/currency /currency +COPY ./pb/demo.proto /currency/proto/demo.proto + +RUN cd /currency \ + && mkdir -p build && cd build \ + && cmake ../genproto \ + && make -j$(nproc || sysctl -n hw.ncpu || echo 1) demo-proto