diff --git a/.env b/.env
index 1779f87def..93ee840b82 100644
--- a/.env
+++ b/.env
@@ -59,9 +59,9 @@ CART_ADDR=cart:${CART_PORT}
CART_DOCKERFILE=./src/cart/src/Dockerfile
# Checkout Service
-CHECKOUT_SERVICE_PORT=5050
-CHECKOUT_SERVICE_ADDR=checkoutservice:${CHECKOUT_SERVICE_PORT}
-CHECKOUT_SERVICE_DOCKERFILE=./src/checkoutservice/Dockerfile
+CHECKOUT_PORT=5050
+CHECKOUT_ADDR=checkout:${CHECKOUT_PORT}
+CHECKOUT_DOCKERFILE=./src/checkout/Dockerfile
# Currency Service
CURRENCY_PORT=7001
@@ -107,9 +107,9 @@ PAYMENT_ADDR=payment:${PAYMENT_PORT}
PAYMENT_DOCKERFILE=./src/payment/Dockerfile
# Product Catalog Service
-PRODUCT_CATALOG_SERVICE_PORT=3550
-PRODUCT_CATALOG_SERVICE_ADDR=productcatalogservice:${PRODUCT_CATALOG_SERVICE_PORT}
-PRODUCT_CATALOG_DOCKERFILE=./src/productcatalogservice/Dockerfile
+PRODUCT_CATALOG_PORT=3550
+PRODUCT_CATALOG_ADDR=product-catalog:${PRODUCT_CATALOG_PORT}
+PRODUCT_CATALOG_DOCKERFILE=./src/product-catalog/Dockerfile
# Quote Service
QUOTE_PORT=8090
diff --git a/.github/workflows/component-build-images.yml b/.github/workflows/component-build-images.yml
index b1e5df9dc6..7e4bd9ad59 100644
--- a/.github/workflows/component-build-images.yml
+++ b/.github/workflows/component-build-images.yml
@@ -63,8 +63,8 @@ jobs:
tag_suffix: cart
context: ./
setup-qemu: false
- - file: ./src/checkoutservice/Dockerfile
- tag_suffix: checkoutservice
+ - file: ./src/checkout/Dockerfile
+ tag_suffix: checkout
context: ./
setup-qemu: true
- file: ./src/currency/Dockerfile
@@ -107,8 +107,8 @@ jobs:
tag_suffix: payment
context: ./
setup-qemu: true
- - file: ./src/productcatalogservice/Dockerfile
- tag_suffix: productcatalogservice
+ - file: ./src/product-catalog/Dockerfile
+ tag_suffix: product-catalog
context: ./
setup-qemu: true
- file: ./src/quote/Dockerfile
@@ -189,7 +189,7 @@ jobs:
max-parallelism = 2
- name: Matrix Build and push demo images
if: steps.check_changes.outputs.skip == 'false'
- uses: docker/build-push-action@v6.10.0
+ uses: docker/build-push-action@v6.11.0
with:
context: ${{ matrix.file_tag.context }}
file: ${{ matrix.file_tag.file }}
diff --git a/.github/workflows/label-pr.yml b/.github/workflows/label-pr.yml
index 73707abf73..141e769b3e 100644
--- a/.github/workflows/label-pr.yml
+++ b/.github/workflows/label-pr.yml
@@ -15,11 +15,11 @@ jobs:
contents: read
steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
- name: Check for changed files
id: file_changes
- uses: dorny/paths-filter@v2
+ uses: dorny/paths-filter@v3
with:
list-files: shell
filters: |
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
index 8b7a1dfd80..ef7516d8a2 100644
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -12,7 +12,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- - uses: actions/stale@v8
+ - uses: actions/stale@v9
with:
stale-pr-message: 'This PR was marked stale due to lack of activity. It will be closed in 7 days.'
close-pr-message: 'Closed as inactive. Feel free to reopen if this PR is still being worked on.'
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..56a700cd0a 100644
--- a/.licenserc.json
+++ b/.licenserc.json
@@ -41,10 +41,11 @@
"/src/accounting/src/protos/",
"src/cart/src/obj/",
"src/cart/tests/obj/",
- "src/checkoutservice/genproto/",
+ "src/currency/build/",
+ "src/checkout/genproto/",
"src/featureflagservice/assets/vendor/",
"src/featureflagservice/priv/",
- "src/productcatalogservice/genproto/",
+ "src/product-catalog/genproto/",
"src/react-native-app/ios/Pods/",
"src/react-native-app/ios/build/",
"src/react-native-app/android/app/build/",
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2861f1bcc3..57308f4620 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -64,6 +64,10 @@ the release.
([#1863](https://github.com/open-telemetry/opentelemetry-demo/pull/1863))
* [recommendation] rename recommendationservice to recommendation
([#1865](https://github.com/open-telemetry/opentelemetry-demo/pull/1865))
+* [product-catalog] rename productcatalogservice to product-catalog
+ ([#1864](https://github.com/open-telemetry/opentelemetry-demo/pull/1864))
+* [checkout] rename checkoutservice to checkout
+ ([#1867](https://github.com/open-telemetry/opentelemetry-demo/pull/1867))
## 1.12.0
diff --git a/Makefile b/Makefile
index 7bb2f27153..a10756b585 100644
--- a/Makefile
+++ b/Makefile
@@ -139,7 +139,7 @@ docker-generate-protobuf:
.PHONY: clean
clean:
- rm -rf ./src/{checkoutservice,productcatalogservice}/genproto/oteldemo/
+ rm -rf ./src/{checkout,product-catalog}/genproto/oteldemo/
rm -rf ./src/recommendation/{demo_pb2,demo_pb2_grpc}.py
.PHONY: check-clean-work-tree
diff --git a/docker-compose-tests.yml b/docker-compose-tests.yml
index dc2714c84a..ea12ae7d14 100644
--- a/docker-compose-tests.yml
+++ b/docker-compose-tests.yml
@@ -39,12 +39,12 @@ services:
environment:
- AD_ADDR
- CART_ADDR
- - CHECKOUT_SERVICE_ADDR
+ - CHECKOUT_ADDR
- CURRENCY_ADDR
- EMAIL_ADDR
- FRONTEND_ADDR
- PAYMENT_ADDR
- - PRODUCT_CATALOG_SERVICE_ADDR
+ - PRODUCT_CATALOG_ADDR
- RECOMMENDATION_ADDR
- SHIPPING_ADDR
- KAFKA_SERVICE_ADDR
@@ -63,7 +63,7 @@ services:
condition: service_started
cart:
condition: service_started
- checkoutservice:
+ checkout:
condition: service_started
currency:
condition: service_started
@@ -75,7 +75,7 @@ services:
condition: service_started
payment:
condition: service_started
- productcatalogservice:
+ product-catalog:
condition: service_started
quote:
condition: service_started
diff --git a/docker-compose.minimal.yml b/docker-compose.minimal.yml
index 2066c6b2ac..1488d4c77a 100644
--- a/docker-compose.minimal.yml
+++ b/docker-compose.minimal.yml
@@ -81,34 +81,34 @@ services:
logging: *logging
# Checkout service
- checkoutservice:
- image: ${IMAGE_NAME}:${DEMO_VERSION}-checkoutservice
- container_name: checkout-service
+ checkout:
+ image: ${IMAGE_NAME}:${DEMO_VERSION}-checkout
+ container_name: checkout
build:
context: ./
- dockerfile: ${CHECKOUT_SERVICE_DOCKERFILE}
+ dockerfile: ${CHECKOUT_DOCKERFILE}
cache_from:
- - ${IMAGE_NAME}:${IMAGE_VERSION}-checkoutservice
+ - ${IMAGE_NAME}:${IMAGE_VERSION}-checkout
deploy:
resources:
limits:
memory: 20M
restart: unless-stopped
ports:
- - "${CHECKOUT_SERVICE_PORT}"
+ - "${CHECKOUT_PORT}"
environment:
- - CHECKOUT_SERVICE_PORT
+ - CHECKOUT_PORT
- CART_ADDR
- CURRENCY_ADDR
- EMAIL_ADDR
- FLAGD_HOST
- PAYMENT_ADDR
- - PRODUCT_CATALOG_SERVICE_ADDR
+ - PRODUCT_CATALOG_ADDR
- SHIPPING_ADDR
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- OTEL_RESOURCE_ATTRIBUTES
- - OTEL_SERVICE_NAME=checkoutservice
+ - OTEL_SERVICE_NAME=checkout
depends_on:
cart:
condition: service_started
@@ -118,7 +118,7 @@ services:
condition: service_started
payment:
condition: service_started
- productcatalogservice:
+ product-catalog:
condition: service_started
shipping:
condition: service_started
@@ -201,9 +201,9 @@ services:
- FRONTEND_ADDR
- AD_ADDR
- CART_ADDR
- - CHECKOUT_SERVICE_ADDR
+ - CHECKOUT_ADDR
- CURRENCY_ADDR
- - PRODUCT_CATALOG_SERVICE_ADDR
+ - PRODUCT_CATALOG_ADDR
- RECOMMENDATION_ADDR
- SHIPPING_ADDR
- OTEL_EXPORTER_OTLP_ENDPOINT
@@ -221,11 +221,11 @@ services:
condition: service_started
cart:
condition: service_started
- checkoutservice:
+ checkout:
condition: service_started
currency:
condition: service_started
- productcatalogservice:
+ product-catalog:
condition: service_started
quote:
condition: service_started
@@ -379,28 +379,28 @@ services:
logging: *logging
# Product Catalog service
- productcatalogservice:
- image: ${IMAGE_NAME}:${DEMO_VERSION}-productcatalogservice
- container_name: product-catalog-service
+ product-catalog:
+ image: ${IMAGE_NAME}:${DEMO_VERSION}-product-catalog
+ container_name: product-catalog
build:
context: ./
dockerfile: ${PRODUCT_CATALOG_DOCKERFILE}
cache_from:
- - ${IMAGE_NAME}:${IMAGE_VERSION}-productcatalogservice
+ - ${IMAGE_NAME}:${IMAGE_VERSION}-product-catalog
deploy:
resources:
limits:
memory: 20M
restart: unless-stopped
ports:
- - "${PRODUCT_CATALOG_SERVICE_PORT}"
+ - "${PRODUCT_CATALOG_PORT}"
environment:
- FLAGD_HOST
- - PRODUCT_CATALOG_SERVICE_PORT
+ - PRODUCT_CATALOG_PORT
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- OTEL_RESOURCE_ATTRIBUTES
- - OTEL_SERVICE_NAME=productcatalogservice
+ - OTEL_SERVICE_NAME=product-catalog
depends_on:
otel-collector:
condition: service_started
@@ -453,7 +453,7 @@ services:
environment:
- FLAGD_HOST
- RECOMMENDATION_PORT
- - PRODUCT_CATALOG_SERVICE_ADDR
+ - PRODUCT_CATALOG_ADDR
- OTEL_PYTHON_LOG_CORRELATION=true
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
@@ -461,7 +461,7 @@ services:
- OTEL_SERVICE_NAME=recommendation
- PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
depends_on:
- productcatalogservice:
+ product-catalog:
condition: service_started
otel-collector:
condition: service_started
diff --git a/docker-compose.yml b/docker-compose.yml
index 22ee8e86ac..c49c4411d6 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -113,36 +113,36 @@ services:
logging: *logging
# Checkout service
- checkoutservice:
- image: ${IMAGE_NAME}:${DEMO_VERSION}-checkoutservice
- container_name: checkout-service
+ checkout:
+ image: ${IMAGE_NAME}:${DEMO_VERSION}-checkout
+ container_name: checkout
build:
context: ./
- dockerfile: ${CHECKOUT_SERVICE_DOCKERFILE}
+ dockerfile: ${CHECKOUT_DOCKERFILE}
cache_from:
- - ${IMAGE_NAME}:${IMAGE_VERSION}-checkoutservice
+ - ${IMAGE_NAME}:${IMAGE_VERSION}-checkout
deploy:
resources:
limits:
memory: 20M
restart: unless-stopped
ports:
- - "${CHECKOUT_SERVICE_PORT}"
+ - "${CHECKOUT_PORT}"
environment:
- FLAGD_HOST
- FLAGD_PORT
- - CHECKOUT_SERVICE_PORT
+ - CHECKOUT_PORT
- CART_ADDR
- CURRENCY_ADDR
- EMAIL_ADDR
- PAYMENT_ADDR
- - PRODUCT_CATALOG_SERVICE_ADDR
+ - PRODUCT_CATALOG_ADDR
- SHIPPING_ADDR
- KAFKA_SERVICE_ADDR
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- OTEL_RESOURCE_ATTRIBUTES
- - OTEL_SERVICE_NAME=checkoutservice
+ - OTEL_SERVICE_NAME=checkout
depends_on:
cart:
condition: service_started
@@ -152,7 +152,7 @@ services:
condition: service_started
payment:
condition: service_started
- productcatalogservice:
+ product-catalog:
condition: service_started
shipping:
condition: service_started
@@ -273,9 +273,9 @@ services:
- FRONTEND_ADDR
- AD_ADDR
- CART_ADDR
- - CHECKOUT_SERVICE_ADDR
+ - CHECKOUT_ADDR
- CURRENCY_ADDR
- - PRODUCT_CATALOG_SERVICE_ADDR
+ - PRODUCT_CATALOG_ADDR
- RECOMMENDATION_ADDR
- SHIPPING_ADDR
- OTEL_EXPORTER_OTLP_ENDPOINT
@@ -293,11 +293,11 @@ services:
condition: service_started
cart:
condition: service_started
- checkoutservice:
+ checkout:
condition: service_started
currency:
condition: service_started
- productcatalogservice:
+ product-catalog:
condition: service_started
quote:
condition: service_started
@@ -458,29 +458,29 @@ services:
logging: *logging
# Product Catalog service
- productcatalogservice:
- image: ${IMAGE_NAME}:${DEMO_VERSION}-productcatalogservice
- container_name: product-catalog-service
+ product-catalog:
+ image: ${IMAGE_NAME}:${DEMO_VERSION}-product-catalog
+ container_name: product-catalog
build:
context: ./
dockerfile: ${PRODUCT_CATALOG_DOCKERFILE}
cache_from:
- - ${IMAGE_NAME}:${IMAGE_VERSION}-productcatalogservice
+ - ${IMAGE_NAME}:${IMAGE_VERSION}-product-catalog
deploy:
resources:
limits:
memory: 20M
restart: unless-stopped
ports:
- - "${PRODUCT_CATALOG_SERVICE_PORT}"
+ - "${PRODUCT_CATALOG_PORT}"
environment:
- - PRODUCT_CATALOG_SERVICE_PORT
+ - PRODUCT_CATALOG_PORT
- FLAGD_HOST
- FLAGD_PORT
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- OTEL_RESOURCE_ATTRIBUTES
- - OTEL_SERVICE_NAME=productcatalogservice
+ - OTEL_SERVICE_NAME=product-catalog
depends_on:
otel-collector:
condition: service_started
@@ -534,7 +534,7 @@ services:
- "${RECOMMENDATION_PORT}"
environment:
- RECOMMENDATION_PORT
- - PRODUCT_CATALOG_SERVICE_ADDR
+ - PRODUCT_CATALOG_ADDR
- FLAGD_HOST
- FLAGD_PORT
- OTEL_PYTHON_LOG_CORRELATION=true
@@ -544,7 +544,7 @@ services:
- OTEL_SERVICE_NAME=recommendation
- PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
depends_on:
- productcatalogservice:
+ product-catalog:
condition: service_started
otel-collector:
condition: service_started
diff --git a/docker-gen-proto.sh b/docker-gen-proto.sh
index f29fdcfcdb..6b08921a6d 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 checkout
+ gen_proto_cpp currency
+ #gen_proto_ruby email
+ #gen_proto_ts frontend
+ #gen_proto_js payment
+ gen_proto_go product-catalog
+ #gen_proto_php quote
+ gen_proto_python recommendation
+ #gen_proto_rust shipping
+else
+ "gen_proto_$1" "$2"
+fi
diff --git a/ide-gen-proto.sh b/ide-gen-proto.sh
index aabbdf5f38..ec144317ed 100755
--- a/ide-gen-proto.sh
+++ b/ide-gen-proto.sh
@@ -68,13 +68,13 @@ gen_proto_ts() {
gen_proto_dotnet accounting
# gen_proto_java ad
gen_proto_dotnet cart
-gen_proto_go checkoutservice
+gen_proto_go checkout
# gen_proto_cpp currency
# gen_proto_ruby email
gen_proto_ts frontend
gen_proto_ts react-native-app
gen_proto_js payment
-gen_proto_go productcatalogservice
+gen_proto_go product-catalog
# gen_proto_php quote
gen_proto_python recommendation
gen_proto_rust shipping
diff --git a/renovate.json5 b/renovate.json5
index 7155995f2a..bccb4909a4 100644
--- a/renovate.json5
+++ b/renovate.json5
@@ -27,8 +27,8 @@
"groupName": "cart",
},
{
- "matchFileNames": ["src/checkoutservice/**"],
- "groupName": "checkoutservice",
+ "matchFileNames": ["src/checkout/**"],
+ "groupName": "checkout",
},
{
"matchFileNames": ["src/currency/**"],
@@ -75,8 +75,8 @@
"groupName": "payment",
},
{
- "matchFileNames": ["src/productcatalogservice/**"],
- "groupName": "productcatalogservice",
+ "matchFileNames": ["src/product-catalog/**"],
+ "groupName": "product-catalog",
},
{
"matchFileNames": ["src/prometheus/**"],
diff --git a/src/accounting/Accounting.csproj b/src/accounting/Accounting.csproj
index 2e0eeb5917..a5287dad37 100644
--- a/src/accounting/Accounting.csproj
+++ b/src/accounting/Accounting.csproj
@@ -9,13 +9,13 @@
-
-
-
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
diff --git a/src/cart/src/cart.csproj b/src/cart/src/cart.csproj
index d62a131f7f..ac86fbc9f2 100644
--- a/src/cart/src/cart.csproj
+++ b/src/cart/src/cart.csproj
@@ -27,10 +27,10 @@
-
+
-
+
diff --git a/src/cart/tests/cart.tests.csproj b/src/cart/tests/cart.tests.csproj
index c7ef905f72..19eda08d34 100644
--- a/src/cart/tests/cart.tests.csproj
+++ b/src/cart/tests/cart.tests.csproj
@@ -9,7 +9,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/src/checkout/Dockerfile b/src/checkout/Dockerfile
new file mode 100644
index 0000000000..425c1a46ac
--- /dev/null
+++ b/src/checkout/Dockerfile
@@ -0,0 +1,26 @@
+# Copyright The OpenTelemetry Authors
+# SPDX-License-Identifier: Apache-2.0
+
+
+FROM golang:1.22-alpine AS builder
+
+WORKDIR /usr/src/app/
+
+RUN --mount=type=cache,target=/go/pkg/mod/ \
+ --mount=type=bind,source=./src/checkout/go.sum,target=go.sum \
+ --mount=type=bind,source=./src/checkout/go.mod,target=go.mod \
+ go mod download
+
+RUN --mount=type=cache,target=/go/pkg/mod/ \
+ --mount=type=cache,target=/root/.cache/go-build \
+ --mount=type=bind,rw,source=./src/checkout,target=. \
+ go build -ldflags "-s -w" -o /go/bin/checkout/ ./
+
+FROM alpine
+
+WORKDIR /usr/src/app/
+
+COPY --from=builder /go/bin/checkout/ ./
+
+EXPOSE ${CHECKOUT_PORT}
+ENTRYPOINT [ "./checkout" ]
diff --git a/src/checkoutservice/README.md b/src/checkout/README.md
similarity index 84%
rename from src/checkoutservice/README.md
rename to src/checkout/README.md
index 30c76323d0..28064bda47 100644
--- a/src/checkoutservice/README.md
+++ b/src/checkout/README.md
@@ -7,7 +7,7 @@ This service provides checkout services for the application.
To build the service binary, run:
```sh
-go build -o /go/bin/checkoutservice/
+go build -o /go/bin/checkout/
```
## Docker Build
@@ -15,7 +15,7 @@ go build -o /go/bin/checkoutservice/
From the root directory, run:
```sh
-docker compose build checkoutservice
+docker compose build checkout
```
## Regenerate protos
diff --git a/src/checkoutservice/genproto/Dockerfile b/src/checkout/genproto/Dockerfile
similarity index 76%
rename from src/checkoutservice/genproto/Dockerfile
rename to src/checkout/genproto/Dockerfile
index edc92ccee3..357329e128 100644
--- a/src/checkoutservice/genproto/Dockerfile
+++ b/src/checkout/genproto/Dockerfile
@@ -7,9 +7,9 @@ WORKDIR /build
RUN apk add --no-cache protobuf-dev
-COPY ./src/checkoutservice/go.mod ./
-COPY ./src/checkoutservice/go.sum ./
-COPY ./src/checkoutservice/tools.go ./
+COPY ./src/checkout/go.mod ./
+COPY ./src/checkout/go.sum ./
+COPY ./src/checkout/tools.go ./
RUN go env -w GOMODCACHE=/root/.cache/go-build
RUN --mount=type=cache,target=/root/.cache/go-build \
diff --git a/src/checkoutservice/genproto/oteldemo/demo.pb.go b/src/checkout/genproto/oteldemo/demo.pb.go
similarity index 100%
rename from src/checkoutservice/genproto/oteldemo/demo.pb.go
rename to src/checkout/genproto/oteldemo/demo.pb.go
diff --git a/src/checkoutservice/genproto/oteldemo/demo_grpc.pb.go b/src/checkout/genproto/oteldemo/demo_grpc.pb.go
similarity index 100%
rename from src/checkoutservice/genproto/oteldemo/demo_grpc.pb.go
rename to src/checkout/genproto/oteldemo/demo_grpc.pb.go
diff --git a/src/checkoutservice/go.mod b/src/checkout/go.mod
similarity index 95%
rename from src/checkoutservice/go.mod
rename to src/checkout/go.mod
index 88275ed180..1b189e7fbb 100644
--- a/src/checkoutservice/go.mod
+++ b/src/checkout/go.mod
@@ -1,11 +1,11 @@
-module github.com/open-telemetry/opentelemetry-demo/src/checkoutservice
+module github.com/open-telemetry/opentelemetry-demo/src/checkout
go 1.22.7
toolchain go1.22.9
require (
- github.com/IBM/sarama v1.44.0
+ github.com/IBM/sarama v1.45.0
github.com/google/uuid v1.6.0
github.com/open-feature/go-sdk v1.14.0
github.com/open-feature/go-sdk-contrib/hooks/open-telemetry v0.3.4
@@ -58,7 +58,7 @@ require (
github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/json-iterator/go v1.1.12 // indirect
- github.com/klauspost/compress v1.17.9 // indirect
+ github.com/klauspost/compress v1.17.11 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
@@ -78,11 +78,11 @@ require (
go.opentelemetry.io/proto/otlp v1.4.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
- golang.org/x/crypto v0.31.0 // indirect
+ golang.org/x/crypto v0.32.0 // indirect
golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc // indirect
golang.org/x/mod v0.21.0 // indirect
- golang.org/x/net v0.33.0 // indirect
- golang.org/x/sys v0.28.0 // indirect
+ golang.org/x/net v0.34.0 // indirect
+ golang.org/x/sys v0.29.0 // indirect
golang.org/x/text v0.21.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 // indirect
diff --git a/src/checkoutservice/go.sum b/src/checkout/go.sum
similarity index 97%
rename from src/checkoutservice/go.sum
rename to src/checkout/go.sum
index f2e942737f..84a08b3ace 100644
--- a/src/checkoutservice/go.sum
+++ b/src/checkout/go.sum
@@ -8,8 +8,8 @@ connectrpc.com/connect v1.17.0 h1:W0ZqMhtVzn9Zhn2yATuUokDLO5N+gIuBWMOnsQrfmZk=
connectrpc.com/connect v1.17.0/go.mod h1:0292hj1rnx8oFrStN7cB4jjVBeqs+Yx5yDIC2prWDO8=
connectrpc.com/otelconnect v0.7.1 h1:scO5pOb0i4yUE66CnNrHeK1x51yq0bE0ehPg6WvzXJY=
connectrpc.com/otelconnect v0.7.1/go.mod h1:dh3bFgHBTb2bkqGCeVVOtHJreSns7uu9wwL2Tbz17ms=
-github.com/IBM/sarama v1.44.0 h1:puNKqcScjSAgVLramjsuovZrS0nJZFVsrvuUymkWqhE=
-github.com/IBM/sarama v1.44.0/go.mod h1:MxQ9SvGfvKIorbk077Ff6DUnBlGpidiQOtU2vuBaxVw=
+github.com/IBM/sarama v1.45.0 h1:IzeBevTn809IJ/dhNKhP5mpxEXTmELuezO2tgHD9G5E=
+github.com/IBM/sarama v1.45.0/go.mod h1:EEay63m8EZkeumco9TDXf2JT3uDnZsZqFgV46n4yZdY=
github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df h1:GSoSVRLoBaFpOOds6QyY1L8AX7uoY+Ln3BHc22W40X0=
github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df/go.mod h1:hiVxq5OP2bUGBRNS3Z/bt/reCLFNbdcST6gISi1fiOM=
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
@@ -91,8 +91,8 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
-github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
-github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
+github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=
+github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM=
github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
@@ -200,8 +200,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
-golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
-golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
+golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc=
+golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc=
golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc h1:O9NuF4s+E/PvMIy+9IUZB9znFwUIXEWSstNjek6VpVg=
golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
@@ -218,8 +218,8 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
-golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
+golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0=
+golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -235,8 +235,8 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
-golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
+golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
diff --git a/src/checkoutservice/kafka/producer.go b/src/checkout/kafka/producer.go
similarity index 100%
rename from src/checkoutservice/kafka/producer.go
rename to src/checkout/kafka/producer.go
diff --git a/src/checkoutservice/main.go b/src/checkout/main.go
similarity index 88%
rename from src/checkoutservice/main.go
rename to src/checkout/main.go
index 3f9c169199..feea6937d5 100644
--- a/src/checkoutservice/main.go
+++ b/src/checkout/main.go
@@ -42,9 +42,9 @@ import (
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
- pb "github.com/open-telemetry/opentelemetry-demo/src/checkoutservice/genproto/oteldemo"
- "github.com/open-telemetry/opentelemetry-demo/src/checkoutservice/kafka"
- "github.com/open-telemetry/opentelemetry-demo/src/checkoutservice/money"
+ pb "github.com/open-telemetry/opentelemetry-demo/src/checkout/genproto/oteldemo"
+ "github.com/open-telemetry/opentelemetry-demo/src/checkout/kafka"
+ "github.com/open-telemetry/opentelemetry-demo/src/checkout/money"
)
//go:generate go install google.golang.org/protobuf/cmd/protoc-gen-go
@@ -119,7 +119,7 @@ func initMeterProvider() *sdkmetric.MeterProvider {
return mp
}
-type checkoutService struct {
+type checkout struct {
productCatalogSvcAddr string
cartSvcAddr string
currencySvcAddr string
@@ -139,7 +139,7 @@ type checkoutService struct {
func main() {
var port string
- mustMapEnv(&port, "CHECKOUT_SERVICE_PORT")
+ mustMapEnv(&port, "CHECKOUT_PORT")
tp := initTracerProvider()
defer func() {
@@ -163,16 +163,16 @@ func main() {
openfeature.SetProvider(flagd.NewProvider())
openfeature.AddHooks(otelhooks.NewTracesHook())
- tracer = tp.Tracer("checkoutservice")
+ tracer = tp.Tracer("checkout")
- svc := new(checkoutService)
+ svc := new(checkout)
mustMapEnv(&svc.shippingSvcAddr, "SHIPPING_ADDR")
c := mustCreateClient(svc.shippingSvcAddr)
svc.shippingSvcClient = pb.NewShippingServiceClient(c)
defer c.Close()
- mustMapEnv(&svc.productCatalogSvcAddr, "PRODUCT_CATALOG_SERVICE_ADDR")
+ mustMapEnv(&svc.productCatalogSvcAddr, "PRODUCT_CATALOG_ADDR")
c = mustCreateClient(svc.productCatalogSvcAddr)
svc.productCatalogSvcClient = pb.NewProductCatalogServiceClient(c)
defer c.Close()
@@ -231,15 +231,15 @@ func mustMapEnv(target *string, envKey string) {
*target = v
}
-func (cs *checkoutService) Check(ctx context.Context, req *healthpb.HealthCheckRequest) (*healthpb.HealthCheckResponse, error) {
+func (cs *checkout) Check(ctx context.Context, req *healthpb.HealthCheckRequest) (*healthpb.HealthCheckResponse, error) {
return &healthpb.HealthCheckResponse{Status: healthpb.HealthCheckResponse_SERVING}, nil
}
-func (cs *checkoutService) Watch(req *healthpb.HealthCheckRequest, ws healthpb.Health_WatchServer) error {
+func (cs *checkout) Watch(req *healthpb.HealthCheckRequest, ws healthpb.Health_WatchServer) error {
return status.Errorf(codes.Unimplemented, "health check via Watch not implemented")
}
-func (cs *checkoutService) PlaceOrder(ctx context.Context, req *pb.PlaceOrderRequest) (*pb.PlaceOrderResponse, error) {
+func (cs *checkout) PlaceOrder(ctx context.Context, req *pb.PlaceOrderRequest) (*pb.PlaceOrderResponse, error) {
span := trace.SpanFromContext(ctx)
span.SetAttributes(
attribute.String("app.user.id", req.UserId),
@@ -332,7 +332,7 @@ type orderPrep struct {
shippingCostLocalized *pb.Money
}
-func (cs *checkoutService) prepareOrderItemsAndShippingQuoteFromCart(ctx context.Context, userID, userCurrency string, address *pb.Address) (orderPrep, error) {
+func (cs *checkout) prepareOrderItemsAndShippingQuoteFromCart(ctx context.Context, userID, userCurrency string, address *pb.Address) (orderPrep, error) {
ctx, span := tracer.Start(ctx, "prepareOrderItemsAndShippingQuoteFromCart")
defer span.End()
@@ -385,7 +385,7 @@ func mustCreateClient(svcAddr string) *grpc.ClientConn {
return c
}
-func (cs *checkoutService) quoteShipping(ctx context.Context, address *pb.Address, items []*pb.CartItem) (*pb.Money, error) {
+func (cs *checkout) quoteShipping(ctx context.Context, address *pb.Address, items []*pb.CartItem) (*pb.Money, error) {
shippingQuote, err := cs.shippingSvcClient.
GetQuote(ctx, &pb.GetQuoteRequest{
Address: address,
@@ -396,7 +396,7 @@ func (cs *checkoutService) quoteShipping(ctx context.Context, address *pb.Addres
return shippingQuote.GetCostUsd(), nil
}
-func (cs *checkoutService) getUserCart(ctx context.Context, userID string) ([]*pb.CartItem, error) {
+func (cs *checkout) getUserCart(ctx context.Context, userID string) ([]*pb.CartItem, error) {
cart, err := cs.cartSvcClient.GetCart(ctx, &pb.GetCartRequest{UserId: userID})
if err != nil {
return nil, fmt.Errorf("failed to get user cart during checkout: %+v", err)
@@ -404,14 +404,14 @@ func (cs *checkoutService) getUserCart(ctx context.Context, userID string) ([]*p
return cart.GetItems(), nil
}
-func (cs *checkoutService) emptyUserCart(ctx context.Context, userID string) error {
+func (cs *checkout) emptyUserCart(ctx context.Context, userID string) error {
if _, err := cs.cartSvcClient.EmptyCart(ctx, &pb.EmptyCartRequest{UserId: userID}); err != nil {
return fmt.Errorf("failed to empty user cart during checkout: %+v", err)
}
return nil
}
-func (cs *checkoutService) prepOrderItems(ctx context.Context, items []*pb.CartItem, userCurrency string) ([]*pb.OrderItem, error) {
+func (cs *checkout) prepOrderItems(ctx context.Context, items []*pb.CartItem, userCurrency string) ([]*pb.OrderItem, error) {
out := make([]*pb.OrderItem, len(items))
for i, item := range items {
@@ -430,7 +430,7 @@ func (cs *checkoutService) prepOrderItems(ctx context.Context, items []*pb.CartI
return out, nil
}
-func (cs *checkoutService) convertCurrency(ctx context.Context, from *pb.Money, toCurrency string) (*pb.Money, error) {
+func (cs *checkout) convertCurrency(ctx context.Context, from *pb.Money, toCurrency string) (*pb.Money, error) {
result, err := cs.currencySvcClient.Convert(ctx, &pb.CurrencyConversionRequest{
From: from,
ToCode: toCurrency})
@@ -440,7 +440,7 @@ func (cs *checkoutService) convertCurrency(ctx context.Context, from *pb.Money,
return result, err
}
-func (cs *checkoutService) chargeCard(ctx context.Context, amount *pb.Money, paymentInfo *pb.CreditCardInfo) (string, error) {
+func (cs *checkout) chargeCard(ctx context.Context, amount *pb.Money, paymentInfo *pb.CreditCardInfo) (string, error) {
paymentService := cs.paymentSvcClient
if cs.isFeatureFlagEnabled(ctx, "paymentUnreachable") {
badAddress := "badAddress:50051"
@@ -457,7 +457,7 @@ func (cs *checkoutService) chargeCard(ctx context.Context, amount *pb.Money, pay
return paymentResp.GetTransactionId(), nil
}
-func (cs *checkoutService) sendOrderConfirmation(ctx context.Context, email string, order *pb.OrderResult) error {
+func (cs *checkout) sendOrderConfirmation(ctx context.Context, email string, order *pb.OrderResult) error {
emailPayload, err := json.Marshal(map[string]interface{}{
"email": email,
"order": order,
@@ -479,7 +479,7 @@ func (cs *checkoutService) sendOrderConfirmation(ctx context.Context, email stri
return err
}
-func (cs *checkoutService) shipOrder(ctx context.Context, address *pb.Address, items []*pb.CartItem) (string, error) {
+func (cs *checkout) shipOrder(ctx context.Context, address *pb.Address, items []*pb.CartItem) (string, error) {
resp, err := cs.shippingSvcClient.ShipOrder(ctx, &pb.ShipOrderRequest{
Address: address,
Items: items})
@@ -489,7 +489,7 @@ func (cs *checkoutService) shipOrder(ctx context.Context, address *pb.Address, i
return resp.GetTrackingId(), nil
}
-func (cs *checkoutService) sendToPostProcessor(ctx context.Context, result *pb.OrderResult) {
+func (cs *checkout) sendToPostProcessor(ctx context.Context, result *pb.OrderResult) {
message, err := proto.Marshal(result)
if err != nil {
log.Errorf("Failed to marshal message to protobuf: %+v", err)
@@ -582,7 +582,7 @@ func createProducerSpan(ctx context.Context, msg *sarama.ProducerMessage) trace.
return span
}
-func (cs *checkoutService) isFeatureFlagEnabled(ctx context.Context, featureFlagName string) bool {
+func (cs *checkout) isFeatureFlagEnabled(ctx context.Context, featureFlagName string) bool {
client := openfeature.NewClient("checkout")
// Default value is set to false, but you could also make this a parameter.
@@ -596,7 +596,7 @@ func (cs *checkoutService) isFeatureFlagEnabled(ctx context.Context, featureFlag
return featureEnabled
}
-func (cs *checkoutService) getIntFeatureFlag(ctx context.Context, featureFlagName string) int {
+func (cs *checkout) getIntFeatureFlag(ctx context.Context, featureFlagName string) int {
client := openfeature.NewClient("checkout")
// Default value is set to 0, but you could also make this a parameter.
diff --git a/src/checkoutservice/money/money.go b/src/checkout/money/money.go
similarity index 97%
rename from src/checkoutservice/money/money.go
rename to src/checkout/money/money.go
index 883b405a15..ba21cd8886 100644
--- a/src/checkoutservice/money/money.go
+++ b/src/checkout/money/money.go
@@ -5,7 +5,7 @@ package money
import (
"errors"
- pb "github.com/open-telemetry/opentelemetry-demo/src/checkoutservice/genproto/oteldemo"
+ pb "github.com/open-telemetry/opentelemetry-demo/src/checkout/genproto/oteldemo"
)
const (
diff --git a/src/checkoutservice/money/money_test.go b/src/checkout/money/money_test.go
similarity index 98%
rename from src/checkoutservice/money/money_test.go
rename to src/checkout/money/money_test.go
index 55da1226cb..8c2c3d7f51 100644
--- a/src/checkoutservice/money/money_test.go
+++ b/src/checkout/money/money_test.go
@@ -7,7 +7,7 @@ import (
"reflect"
"testing"
- pb "github.com/open-telemetry/opentelemetry-demo/src/checkoutservice/genproto/oteldemo"
+ pb "github.com/open-telemetry/opentelemetry-demo/src/checkout/genproto/oteldemo"
)
func mmc(u int64, n int32, c string) *pb.Money { return &pb.Money{Units: u, Nanos: n, CurrencyCode: c} }
diff --git a/src/checkoutservice/tools.go b/src/checkout/tools.go
similarity index 100%
rename from src/checkoutservice/tools.go
rename to src/checkout/tools.go
diff --git a/src/checkoutservice/Dockerfile b/src/checkoutservice/Dockerfile
deleted file mode 100644
index ca37f623b4..0000000000
--- a/src/checkoutservice/Dockerfile
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright The OpenTelemetry Authors
-# SPDX-License-Identifier: Apache-2.0
-
-
-FROM golang:1.22-alpine AS builder
-
-WORKDIR /usr/src/app/
-
-RUN --mount=type=cache,target=/go/pkg/mod/ \
- --mount=type=bind,source=./src/checkoutservice/go.sum,target=go.sum \
- --mount=type=bind,source=./src/checkoutservice/go.mod,target=go.mod \
- go mod download
-
-RUN --mount=type=cache,target=/go/pkg/mod/ \
- --mount=type=cache,target=/root/.cache/go-build \
- --mount=type=bind,rw,source=./src/checkoutservice,target=. \
- go build -ldflags "-s -w" -o /go/bin/checkoutservice/ ./
-
-FROM alpine
-
-WORKDIR /usr/src/app/
-
-COPY --from=builder /go/bin/checkoutservice/ ./
-
-EXPOSE ${CHECKOUT_SERVICE_PORT}
-ENTRYPOINT [ "./checkoutservice" ]
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